Home > Mateda2.0 > sampling > SampleGaussianFullModel.m

SampleGaussianFullModel

PURPOSE ^

[NewPop] = SampleGaussianFullModel(NumbVar,model,RangeValues,AuxPop,AuxFunVal,sampling_params)

SYNOPSIS ^

function [NewPop] = SampleGaussianFullModel(NumbVar,model,RangeValues,AuxPop,AuxFunVal,sampling_params)

DESCRIPTION ^

 [NewPop] = SampleGaussianFullModel(NumbVar,model,RangeValues,AuxPop,AuxFunVal,sampling_params)
 SampleGaussianFullModel:         Samples a population of individuals from
                                  a full multivariate Gaussian  model
 INPUTS
 NumbVar: Number of variables
 model: model{1} = mean of the variables
        model{2} = matrix of covariances between the variables 
 RangeValues: Matrix of two vectors with the minimum and maximum real values 
              each variable can take 
 AuxPop: Auxiliary (selected) population (May be use for partial sampling or resampling)
 AuxFunVal: Evaluation of the data set (required for some sampling algorithms, not for this one)
 sampling_params{1,1} = N: Number of generated individuals 
 sampling_params{1,2} = var_scaling: Scaling for the covariance values. A
                        very low variance tends to move the algorith to stagnation. Scaling is a partial 
                        solution to this problem. Dynamic scaling should
                        be implemented as a more robust solution
 OUTPUTS
 NewPop: Sampled individuals

 Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [NewPop] =  SampleGaussianFullModel(NumbVar,model,RangeValues,AuxPop,AuxFunVal,sampling_params)
0002 % [NewPop] = SampleGaussianFullModel(NumbVar,model,RangeValues,AuxPop,AuxFunVal,sampling_params)
0003 % SampleGaussianFullModel:         Samples a population of individuals from
0004 %                                  a full multivariate Gaussian  model
0005 % INPUTS
0006 % NumbVar: Number of variables
0007 % model: model{1} = mean of the variables
0008 %        model{2} = matrix of covariances between the variables
0009 % RangeValues: Matrix of two vectors with the minimum and maximum real values
0010 %              each variable can take
0011 % AuxPop: Auxiliary (selected) population (May be use for partial sampling or resampling)
0012 % AuxFunVal: Evaluation of the data set (required for some sampling algorithms, not for this one)
0013 % sampling_params{1,1} = N: Number of generated individuals
0014 % sampling_params{1,2} = var_scaling: Scaling for the covariance values. A
0015 %                        very low variance tends to move the algorith to stagnation. Scaling is a partial
0016 %                        solution to this problem. Dynamic scaling should
0017 %                        be implemented as a more robust solution
0018 % OUTPUTS
0019 % NewPop: Sampled individuals
0020 %
0021 % Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es)
0022 
0023 PopSize = cell2num(sampling_params{1}(1)); 
0024 var_scaling = cell2num(sampling_params{1}(2)); 
0025 
0026 vars_means = model{1};
0027 vars_cov = model{2}*var_scaling;
0028 
0029  % Generate the new population
0030 
0031   NewPop = mvnrnd(vars_means,vars_cov,PopSize); 
0032   
0033      
0034 return;

Generated on Fri 04-Dec-2009 13:38:29 by m2html © 2003