weka.classifiers.bayes.net.search.fixed
Class FromFile

java.lang.Object
  extended byweka.classifiers.bayes.net.search.SearchAlgorithm
      extended byweka.classifiers.bayes.net.search.fixed.FromFile
All Implemented Interfaces:
OptionHandler, java.io.Serializable

public class FromFile
extends SearchAlgorithm

The FromFile reads the structure of a Bayes net from a file in BIFF format.

Version:
$Revision: 1.4 $
Author:
Remco Bouckaert
See Also:
Serialized Form

Constructor Summary
FromFile()
           
 
Method Summary
 void buildStructure(BayesNet bayesNet, Instances instances)
          buildStructure determines the network structure/graph of the network.
 java.lang.String getBIFFile()
          Get name of network in BIF file to read structure from
 java.lang.String[] getOptions()
          Gets the current settings of the search algorithm.
 java.util.Enumeration listOptions()
          Returns an enumeration describing the available options.
 void setBIFFile(java.lang.String sBIFFile)
          Set name of network in BIF file to read structure from
 void setOptions(java.lang.String[] options)
          Parses a given list of options.
 
Methods inherited from class weka.classifiers.bayes.net.search.SearchAlgorithm
getMarkovBlanketClassifier, initAsNaiveBayesTipText, markovBlanketClassifierTipText, maxNrOfParentsTipText, setMarkovBlanketClassifier, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FromFile

public FromFile()
Method Detail

buildStructure

public void buildStructure(BayesNet bayesNet,
                           Instances instances)
                    throws java.lang.Exception
Description copied from class: SearchAlgorithm
buildStructure determines the network structure/graph of the network. The default behavior is creating a network where all nodes have the first node as its parent (i.e., a BayesNet that behaves like a naive Bayes classifier). This method can be overridden by derived classes to restrict the class of network structures that are acceptable.

Overrides:
buildStructure in class SearchAlgorithm
Throws:
java.lang.Exception

setBIFFile

public void setBIFFile(java.lang.String sBIFFile)
Set name of network in BIF file to read structure from

Parameters:
sBIFFile -

getBIFFile

public java.lang.String getBIFFile()
Get name of network in BIF file to read structure from

Returns:
BIF file name

listOptions

public java.util.Enumeration listOptions()
Returns an enumeration describing the available options.

Specified by:
listOptions in interface OptionHandler
Overrides:
listOptions in class SearchAlgorithm
Returns:
an enumeration of all the available options.

setOptions

public void setOptions(java.lang.String[] options)
                throws java.lang.Exception
Parses a given list of options. Valid options are:

-B Set the random order to true (default false).

Specified by:
setOptions in interface OptionHandler
Overrides:
setOptions in class SearchAlgorithm
Parameters:
options - the list of options as an array of strings
Throws:
java.lang.Exception - if an option is not supported

getOptions

public java.lang.String[] getOptions()
Gets the current settings of the search algorithm.

Specified by:
getOptions in interface OptionHandler
Overrides:
getOptions in class SearchAlgorithm
Returns:
an array of strings suitable for passing to setOptions