Home > Mateda2.0 > knowledge_extraction > Mean_Var_Objectives.m

# Mean_Var_Objectives

## PURPOSE

[mean_objs,var_objs] = Mean_Var_Objectives(AllFunVals)

## SYNOPSIS

function[mean_objs,var_objs] = Mean_Var_Objectives(AllFunVals)

## DESCRIPTION

     [mean_objs,var_objs] = Mean_Var_Objectives(AllFunVals)
     Mean_Var_Objectives: Computes the mean and variance for all the objectives

     INPUT
     AllFunVals{maxgen} = FunVals(PopSize,n_objectives): Cell array that stores the evaluations of all the objectives
                                                         for all the individuals in every generation
     mean_objs:   Mean of the objectives
     var_objs:    Variance of the objectives

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

## CROSS-REFERENCE INFORMATION

This function calls:

This function is called by:

- FitnessMeasuresComp %%%%%%%%%%%%%%% COMPUTATION OF FITNESS RELATED MEASURES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

## SOURCE CODE

    0001 function[mean_objs,var_objs] = Mean_Var_Objectives(AllFunVals)
    0002 % [mean_objs,var_objs] = Mean_Var_Objectives(AllFunVals)
    0003 % Mean_Var_Objectives: Computes the mean and variance for all the objectives
    0004 %
    0005 %
    0006 % INPUT
    0007 % AllFunVals{maxgen} = FunVals(PopSize,n_objectives): Cell array that stores the evaluations of all the objectives
    0008 %                                                     for all the individuals in every generation
    0009 % mean_objs:   Mean of the objectives
    0010 % var_objs:    Variance of the objectives
    0011 %
    0012 % Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es)
    0013
    0014 k = size(AllFunVals,2);                % Number of generations
    0015 n_objectives = size(AllFunVals{1},2);  % Number of objectives
    0016 PopSize =  size(AllFunVals{1},1);      % Population size
    0017
    0018 for i=1:k,
    0019  mean_objs{i} = mean(AllFunVals{i});
    0020  var_objs{i} = var(AllFunVals{i});
    0021 end