Home > Mateda2.0 > learning > LearnFDA.m

# LearnFDA

## PURPOSE

[model] = LearnFDA(k,NumbVar,Card,SelPop,AuxFunVal,learning_params)

## SYNOPSIS

function[model] = LearnFDA(k,NumbVar,Card,SelPop,AuxFunVal,learning_params)

## DESCRIPTION

     [model] = LearnFDA(k,NumbVar,Card,SelPop,AuxFunVal,learning_params)
     LearnFDA:  Creates a factorized model from the structure
     k: Current generation
     NumbVar: Number of variables
     Card: Vector with the dimension of all the variables.
     SelPop:  Population from which the model is learned
     AuxFunVal: Evaluation of the data set (required for some learning algorithms, not for this one)
     learning_params{1}(1) = Cliques
        Each row of Cliques is a clique. The first value is the number of neighbor for variable i.
        The second, is the number of new variables (one new variable, i).
        Then, neighbor variables are listed and  finally new variables
        (variable i) are listed
     OUTPUTS
     model: Markov network model containing the structure (model{1} = Cliques)
            and the parameters (model{2} = Tables)
            Cliques is the structure of the model in a list of cliques that defines the
            Tables: Probability tables for each variable conditioned on its neighbors

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

## CROSS-REFERENCE INFORMATION

This function calls:

- LearnFDAParameters [Tables] = LearnFDAParameters(Cliques,SelPop,NumbVar,Card)

This function is called by:

## SOURCE CODE

    0001 function[model] = LearnFDA(k,NumbVar,Card,SelPop,AuxFunVal,learning_params)
    0002 % [model] = LearnFDA(k,NumbVar,Card,SelPop,AuxFunVal,learning_params)
    0003 % LearnFDA:  Creates a factorized model from the structure
    0004 % k: Current generation
    0005 % NumbVar: Number of variables
    0006 % Card: Vector with the dimension of all the variables.
    0007 % SelPop:  Population from which the model is learned
    0008 % AuxFunVal: Evaluation of the data set (required for some learning algorithms, not for this one)
    0009 % learning_params{1}(1) = Cliques
    0010 %    Each row of Cliques is a clique. The first value is the number of neighbor for variable i.
    0011 %    The second, is the number of new variables (one new variable, i).
    0012 %    Then, neighbor variables are listed and  finally new variables
    0013 %    (variable i) are listed
    0014 % OUTPUTS
    0015 % model: Markov network model containing the structure (model{1} = Cliques)
    0016 %        and the parameters (model{2} = Tables)
    0017 %        Cliques is the structure of the model in a list of cliques that defines the
    0018 %        Tables: Probability tables for each variable conditioned on its neighbors
    0019 %
    0020 % Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es)
    0021
    0022
    0023 Cliques =  cell2num(learning_params{1}(1));
    0024 Tables = LearnFDAParameters(Cliques,SelPop,NumbVar,Card);
    0025
    0026 model{1} = Cliques;
    0027 model{2} = Tables;
    0028 return;
    0029