Class FromFile
java.lang.Object
weka.classifiers.bayes.net.search.SearchAlgorithm
weka.classifiers.bayes.net.search.fixed.FromFile
- All Implemented Interfaces:
Serializable,OptionHandler,RevisionHandler
The FromFile reads the structure of a Bayes net
from a file in BIFF format.
Valid options are:
-B <BIF File> Name of file containing network structure in BIF format
- Version:
- $Revision: 10154 $
- Author:
- Remco Bouckaert
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildStructure(BayesNet bayesNet, Instances instances) buildStructure determines the network structure/graph of the network.Get name of network in BIF file to read structure fromString[]Gets the current settings of the search algorithm.Returns the revision string.Returns a string describing this objectReturns an enumeration describing the available options.voidsetBIFFile(String sBIFFile) Set name of network in BIF file to read structure fromvoidsetOptions(String[] options) Parses a given list of options.Methods inherited from class weka.classifiers.bayes.net.search.SearchAlgorithm
initAsNaiveBayesTipText, maxNrOfParentsTipText, toString
-
Constructor Details
-
FromFile
public FromFile()
-
-
Method Details
-
globalInfo
Returns a string describing this object- Returns:
- a description of the classifier suitable for displaying in the explorer/experimenter gui
-
buildStructure
Description copied from class:SearchAlgorithmbuildStructure 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:
buildStructurein classSearchAlgorithm- Parameters:
bayesNet-instances- the instances to work with- Throws:
Exception- if attribute from BIF file could not be found
-
setBIFFile
Set name of network in BIF file to read structure from- Parameters:
sBIFFile- the name of the BIF file
-
getBIFFile
Get name of network in BIF file to read structure from- Returns:
- BIF file name
-
listOptions
Returns an enumeration describing the available options.- Specified by:
listOptionsin interfaceOptionHandler- Overrides:
listOptionsin classSearchAlgorithm- Returns:
- an enumeration of all the available options.
-
setOptions
Parses a given list of options. Valid options are:-B <BIF File> Name of file containing network structure in BIF format
- Specified by:
setOptionsin interfaceOptionHandler- Overrides:
setOptionsin classSearchAlgorithm- Parameters:
options- the list of options as an array of strings- Throws:
Exception- if an option is not supported
-
getOptions
Gets the current settings of the search algorithm.- Specified by:
getOptionsin interfaceOptionHandler- Overrides:
getOptionsin classSearchAlgorithm- Returns:
- an array of strings suitable for passing to setOptions
-
getRevision
Returns the revision string.- Specified by:
getRevisionin interfaceRevisionHandler- Overrides:
getRevisionin classSearchAlgorithm- Returns:
- the revision
-