Home > Mateda2.0 > learning > LearnTModel.m

# LearnTModel

## PURPOSE

[model] = LearnTModel(k,NumbVar,Card,AuxPop,AuxFunVal,learning_params)

## SYNOPSIS

function [model] = LearnTModel(k,NumbVar,Card,AuxPop,AuxFunVal,learning_params)

## DESCRIPTION

     [model] = LearnTModel(k,NumbVar,Card,AuxPop,AuxFunVal,learning_params)
     LearnTModel:     Learns the correlation matrix from the data
     INPUTS
     k: Current generation
     NumbVar: Number of variables
     Card: Vector with the range of values for all the variables.
     AuxPop:  Population from which the model is learned
     AuxFunVal: Evaluation of the data set (required for some learning algorithms, not for this one)
     OUTPUTS
     model: model{1} = mean of the variables
            model{2} = covariance of the variables

     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 [model] = LearnTModel(k,NumbVar,Card,AuxPop,AuxFunVal,learning_params)
    0002 % [model] = LearnTModel(k,NumbVar,Card,AuxPop,AuxFunVal,learning_params)
    0003 % LearnTModel:     Learns the correlation matrix from the data
    0004 % INPUTS
    0005 % k: Current generation
    0006 % NumbVar: Number of variables
    0007 % Card: Vector with the range of values for all the variables.
    0008 % AuxPop:  Population from which the model is learned
    0009 % AuxFunVal: Evaluation of the data set (required for some learning algorithms, not for this one)
    0010 % OUTPUTS
    0011 % model: model{1} = mean of the variables
    0012 %        model{2} = covariance of the variables
    0013 %
    0014 % Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es)
    0015
    0016      model{1} =  mean(AuxPop); % Vector of means
    0017      model{2} =  corr(AuxPop);   % Matrix of correlation
    0018
    0019      return;
    0020
    0021
    0022