SMILE.NET Learning: GreedyThickThinning

From DSL

Jump to: navigation, search

This class implements the GreedyThickThinning structure learning algorithm.

[edit] Interfaces

  • IDisposable

The .NET garbage collector automatically releases the memory allocated to objects when they are no longer used. It is, however, unpredictable when garbage collection will occur. Furthermore, the garbage collector has no knowledge of unmanaged resources such as the DSL_greedyThickThinning C++ object wrapped by GreedyThickThinning. The IDisposable.Dispose() method provides means to ensure that wrapped object is deleted before garbage collection occurs:

  GreedyThickThinning gtt = new GreedyThickThinning();
  try {
    // use gtt here
  }
  finally {
    if (gtt != null) gtt.Dispose();
  }

C# has the using statement, which is equivalent to the try/finally/Dispose construct in the preceding example:

  sing (GreedyThickThinning gtt = new GreedyThickThinning()) {
    // use gtt here
  }


[edit] Properties

  • int MaxParents (get, set)

The maximum number of parents (default = 5).


  • double NetWeight (get, set)

For BDeu priors it defines the weight assigned to the uniform priors (default = 1.0).


  • GreedyThickThinning.PriorsType PriorsMethod {GreedyThickThinning.PriorsType.K2, GreedyThickThinning.PriorsType.BDeu} (get, set)

Sets the priors method to use (default = K2).


[edit] Methods

  • BkKnowledge GetBkKnowledge()

Returns the background knowledge.


  • Network Learn(DataSet data)

Returns the learned network. This method can throw a SmileException.


  • void SetBkKnowledge(BkKnowledge bkk)

Sets the background knowledge.

Personal tools