Home > Mateda2.0 > knowledge_extraction > Realized_heritability.m

# Realized_heritability

## PURPOSE

[b] = Realized_heritability(AllFunVals,AllSelFunVals)

## SYNOPSIS

function[b] = Realized_heritability(AllFunVals,AllSelFunVals)

## DESCRIPTION

     [b] = Realized_heritability(AllFunVals,AllSelFunVals)
     Response_to_selection: Computes the Realized heritability for every
                            objective $b(t) = \frac{R(t)}{S(t)}$

     INPUT
     AllFunVals{maxgen} = FunVals(PopSize,n_objectives): Cell array that stores the evaluations of all the objectives
                                                         for all the individuals in every generation
     AllSelFunVals{maxgen} = FunVals(PopSize,n_objectives): Cell array that stores the evaluations of all the objectives
                                                         for the selected  individuals in every generation
      OUTPUT
      b: Realized heritability at each generation k>1
      Example:
      for i=1:ngen, auxr{1,i} = Cache{4,i}; auxs{1,i} = Cache{5,i}; end,
      [b] = Realized_heritability(auxr,auxs)

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

## CROSS-REFERENCE INFORMATION

This function calls:

- Amount_of_selection [S] = Amount_of_selection(AllFunVals,AllSelFunVals)
- Response_to_selection [RS] = Response_to_selection(AllFunVals)

This function is called by:

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

## SOURCE CODE

    0001 function[b] = Realized_heritability(AllFunVals,AllSelFunVals)
    0002 % [b] = Realized_heritability(AllFunVals,AllSelFunVals)
    0003 % Response_to_selection: Computes the Realized heritability for every
    0004 %                        objective $b(t) = \frac{R(t)}{S(t)}$
    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 % AllSelFunVals{maxgen} = FunVals(PopSize,n_objectives): Cell array that stores the evaluations of all the objectives
    0010 %                                                     for the selected  individuals in every generation
    0011 %  OUTPUT
    0012 %  b: Realized heritability at each generation k>1
    0013 %  Example:
    0014 %  for i=1:ngen, auxr{1,i} = Cache{4,i}; auxs{1,i} = Cache{5,i}; end,
    0015 %  [b] = Realized_heritability(auxr,auxs)
    0016 %
    0017 % Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es)
    0018
    0019 S = Amount_of_selection(AllFunVals,AllSelFunVals);
    0020 RS = Response_to_selection(AllFunVals);
    0021
    0022 k = size(AllFunVals,2);                % Number of generations
    0023
    0024 for i=2:k,
    0025   b{i} = RS{i} ./ S{i};
    0026 end
    0027
    0028