Reference Manual: DSL em

From DSL

Jump to: navigation, search

This class implements the EM algorithm for learning the parameters of a Bayesian network.

Methods

  • DSL_em()

Constructor, that initializes the object with default values of parameters used for learning.


  • int Learn(const DSL_dataset &data, DSL_network &net);

This method performs actual learning procedure. The first argument is the input data set. Only the parameters that are in the data set will be learned. So if you want to learn hidden variables you would have to add them to the data set. The result of learning procedure is stored in the DSL_network which is the second argument. The method returns DSL_OKAY if the learning was successful and some error code otherwise.


  • void SetEquivalentSampleSize(int eqSampleSize);

Sets the equivalent sample size.


  • int GetEquivalentSampleSize();

Returns the equivalent sample size.


  • void SetRandomizeParameters(int rand);

Determines if the parameters have to be randomized when the equivalent sample size is set to 0. It defaults to true.

Personal tools