Class MCTreeNode
- java.lang.Object
-
- ai.libs.jaicore.ml.weka.classification.learner.reduction.AMCTreeNode<java.lang.Integer>
-
- ai.libs.jaicore.ml.weka.classification.learner.reduction.MCTreeNode
-
- All Implemented Interfaces:
ITreeClassifier,java.io.Serializable,java.lang.Iterable<MCTreeNode>,weka.classifiers.Classifier
- Direct Known Subclasses:
MCTreeNodeLeaf
public class MCTreeNode extends AMCTreeNode<java.lang.Integer> implements ITreeClassifier, java.lang.Iterable<MCTreeNode>
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.concurrent.atomic.AtomicIntegercacheRetrievals
-
Constructor Summary
Constructors Constructor Description MCTreeNode(java.util.List<java.lang.Integer> containedClasses)MCTreeNode(java.util.List<java.lang.Integer> containedClasses, EMCNodeType nodeType, java.lang.String classifierID)MCTreeNode(java.util.List<java.lang.Integer> containedClasses, EMCNodeType nodeType, weka.classifiers.Classifier baseClassifier)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChild(MCTreeNode newNode)voidbuildClassifier(weka.core.Instances data)static voidclearCache()double[]distributionForInstance(weka.core.Instance instance)voiddistributionForInstance(weka.core.Instance instance, double[] distribution)weka.core.CapabilitiesgetCapabilities()java.util.List<MCTreeNode>getChildren()weka.classifiers.ClassifiergetClassifier()static java.util.Map<java.lang.String,weka.classifiers.Classifier>getClassifierCache()intgetDepthOfFirstCommonParent(java.util.List<java.lang.Integer> classes)intgetHeight()EMCNodeTypegetNodeType()booleanisCompletelyConfigured()java.util.Iterator<MCTreeNode>iterator()voidsetBaseClassifier(weka.classifiers.Classifier classifier)voidsetNodeType(EMCNodeType nodeType)java.lang.StringtoString()java.lang.StringtoStringWithOffset()java.lang.StringtoStringWithOffset(java.lang.String offset)-
Methods inherited from class ai.libs.jaicore.ml.weka.classification.learner.reduction.AMCTreeNode
classifyInstance, getContainedClasses
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ai.libs.jaicore.ml.weka.classification.learner.reduction.ITreeClassifier
classifyInstance
-
-
-
-
Constructor Detail
-
MCTreeNode
public MCTreeNode(java.util.List<java.lang.Integer> containedClasses)
-
MCTreeNode
public MCTreeNode(java.util.List<java.lang.Integer> containedClasses, EMCNodeType nodeType, java.lang.String classifierID) throws java.lang.Exception- Throws:
java.lang.Exception
-
MCTreeNode
public MCTreeNode(java.util.List<java.lang.Integer> containedClasses, EMCNodeType nodeType, weka.classifiers.Classifier baseClassifier)
-
-
Method Detail
-
getNodeType
public EMCNodeType getNodeType()
-
addChild
public void addChild(MCTreeNode newNode)
-
getChildren
public java.util.List<MCTreeNode> getChildren()
-
isCompletelyConfigured
public boolean isCompletelyConfigured()
-
buildClassifier
public void buildClassifier(weka.core.Instances data) throws java.lang.Exception- Specified by:
buildClassifierin interfaceweka.classifiers.Classifier- Throws:
java.lang.Exception
-
distributionForInstance
public void distributionForInstance(weka.core.Instance instance, double[] distribution) throws java.lang.Exception- Throws:
java.lang.Exception
-
distributionForInstance
public double[] distributionForInstance(weka.core.Instance instance) throws java.lang.Exception- Specified by:
distributionForInstancein interfaceweka.classifiers.Classifier- Throws:
java.lang.Exception
-
getCapabilities
public weka.core.Capabilities getCapabilities()
- Specified by:
getCapabilitiesin interfaceweka.classifiers.Classifier
-
getHeight
public int getHeight()
- Specified by:
getHeightin interfaceITreeClassifier
-
getDepthOfFirstCommonParent
public int getDepthOfFirstCommonParent(java.util.List<java.lang.Integer> classes)
- Specified by:
getDepthOfFirstCommonParentin interfaceITreeClassifier
-
clearCache
public static void clearCache()
-
getClassifierCache
public static java.util.Map<java.lang.String,weka.classifiers.Classifier> getClassifierCache()
-
getClassifier
public weka.classifiers.Classifier getClassifier()
-
setBaseClassifier
public void setBaseClassifier(weka.classifiers.Classifier classifier)
-
setNodeType
public void setNodeType(EMCNodeType nodeType)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toStringWithOffset
public java.lang.String toStringWithOffset()
-
toStringWithOffset
public java.lang.String toStringWithOffset(java.lang.String offset)
-
iterator
public java.util.Iterator<MCTreeNode> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<MCTreeNode>
-
-