SMILE.NET Learning: PC

From DSL
Jump to: navigation, search

This class implements the PC structure learning algorithm.

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_pc C++ object wrapped by PC. The IDisposable.Dispose() method provides means to ensure that wrapped object is deleted before garbage collection occurs:

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

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

  using (PC pc = new PC()) {
    // use pc here
  }


Properties

  • int MaxAdjacency (get, set)

The maximum adjacency size (default = 8).


  • double Significance (get, set)

The significance level (default = 0.05).


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