Home > Mateda2.0 > ScriptsMateda > OptimizationScripts > MixtureGaussianEDAs_OfflineHP.m

# MixtureGaussianEDAs_OfflineHP

## PURPOSE

EXAMPLE 14: Mixtures of full Gaussian distributions

## SYNOPSIS

This is a script file.

## DESCRIPTION

     EXAMPLE 14:   Mixtures of full Gaussian distributions
                   for  the Offline HP Model continuous function (see
                   previous examples for explanation on the Offline HP Model)

## CROSS-REFERENCE INFORMATION

This function calls:

- RunEDA [AllStat,Cache]=RunEDA(PopSize,n,F,Card,cache,edaparams)
- CreateFibbInitConf Translates the vector to the positions in the grid

This function is called by:

## SOURCE CODE

    0001  % EXAMPLE 14:   Mixtures of full Gaussian distributions
    0002  %               for  the Offline HP Model continuous function (see
    0003  %               previous examples for explanation on the Offline HP Model)
    0004
    0005
    0006  Fibbonacci_n = 9; % Fibbonacci_n: Value n for the construction of the Fibbonacci sequence. NumbVar = F(n)
    0007  global HPInitConf;
    0008  HPInitConf = CreateFibbInitConf(Fibbonacci_n); % HP Fibbonacci configuration
    0009  NumbVar = size(HPInitConf,2);
    0010  PopSize = 200;
    0011  F = 'EvaluateOffHPProtein';
    0012  cache  = [1,1,1,1,1]; Card = [zeros(1,NumbVar);2*pi*ones(1,NumbVar)];
    0013  learning_params(1:5) = {'vars','ClusterPointsKmeans',5,'sqEuclidean',1};
    0014  edaparams{1} = {'learning_method','LearnMixtureofFullGaussianModels',learning_params};
    0015  edaparams{2} = {'sampling_method','SampleMixtureofFullGaussianModels',{PopSize,1}};
    0016  edaparams{3} = {'replacement_method','best_elitism',{'fitness_ordering'}};
    0017  selparams(1:2) = {0.5,'fitness_ordering'};
    0018  edaparams{4} = {'selection_method','truncation_selection',selparams};
    0019  edaparams{5} = {'repairing_method',' Trigom_repairing',{}};
    0020  edaparams{6} = {'stop_cond_method','max_gen',{100}};
    0021  edaparams{7} = {'local_opt_method','local_search_OffHP',{}};
    0022   [AllStat,Cache]=RunEDA(PopSize,NumbVar,F,Card,cache,edaparams)
    0023  % To draw the resulting solution use function OffPrintProtein(vector),
    0024  % where vector is the best solution found.