public class K2NetworkLearner extends DiscreteBayesNetwork
learnNetwork(jsat.classifiers.ClassificationDataSet)
directly.
cpts, dag, DEFAULT_USE_PRIORS, predicting, priors
Constructor and Description |
---|
K2NetworkLearner() |
Modifier and Type | Method and Description |
---|---|
double |
f(int i,
Set<Integer> pi,
ClassificationDataSet D) |
int |
getMaxParents()
Returns the maximum number of parents allowed when learning a network structure, or zero if any number of parents are valid.
|
void |
learnNetwork(ClassificationDataSet D)
Learns the network structure from the given data set.
|
void |
setMaxParents(int maxParents)
Sets the maximum number of parents to allow a node when learning the network structure.
|
void |
trainC(ClassificationDataSet dataSet)
Trains the classifier and constructs a model for classification using the
given data set.
|
classify, clone, depends, supportsWeightedData, trainC
public void setMaxParents(int maxParents)
maxParents
- sets the maximum number of parents a node may learnpublic int getMaxParents()
public void learnNetwork(ClassificationDataSet D)
D
- the data set to learn the network frompublic void trainC(ClassificationDataSet dataSet)
Classifier
trainC
in interface Classifier
trainC
in class DiscreteBayesNetwork
dataSet
- the data set to train onpublic double f(int i, Set<Integer> pi, ClassificationDataSet D)
Copyright © 2017. All rights reserved.