|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.core.Instance
weka.core.SoftClassifiedFullInstance
An Instance that has a probability distribution across class values. Particularly useful for EM using a SoftClassifier
Field Summary | |
protected double[] |
m_ClassDistribution
An array of probabilities giving the probability of each class for this Instance |
Fields inherited from class weka.core.Instance |
m_AttValues, m_Dataset, m_Weight, MISSING_VALUE |
Constructor Summary | |
SoftClassifiedFullInstance()
|
|
SoftClassifiedFullInstance(Instance instance)
Constructor that copies the attribute values and the weight from the given instance and gives SoftInstance random class probabilities that assign all probability (1) to the instance's given class |
|
SoftClassifiedFullInstance(Instance instance,
java.util.Random randomizer)
Constructor that copies the attribute values and the weight from the given instance and gives SoftInstance random class probabilities generated by the given randomizer. |
Method Summary | |
java.lang.Object |
copy()
Produces a shallow copy of this instance. |
double[] |
getClassDistribution()
Get the class distribution for this instance |
double |
getClassProbability(int classNum)
Return the probability the instance is in the given class |
protected double[] |
randomClassDistribution(java.util.Random randomizer)
Return a random class distribution |
void |
setClassDistribution(double[] dist)
Set the class distribution for this instance |
void |
setClassProbability(int classNum,
double prob)
Set the probability the instance is in the given class |
Methods inherited from class weka.core.Instance |
attribute, attributeSparse, classAttribute, classIndex, classIsMissing, classValue, dataset, deleteAttributeAt, enumerateAttributes, equalHeaders, index, insertAttributeAt, isMissing, isMissing, isMissingSparse, isMissingValue, main, mergeInstance, missingValue, numAttributes, numClasses, numValues, replaceMissingValues, setClassMissing, setClassValue, setClassValue, setDataset, setMissing, setMissing, setValue, setValue, setValue, setValue, setValueArray, setValueSparse, setWeight, stringValue, stringValue, toDoubleArray, toString, toString, toString, value, value, valueSparse, weight |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected double[] m_ClassDistribution
Constructor Detail |
public SoftClassifiedFullInstance(Instance instance, java.util.Random randomizer)
public SoftClassifiedFullInstance(Instance instance)
public SoftClassifiedFullInstance()
Method Detail |
protected double[] randomClassDistribution(java.util.Random randomizer)
public double getClassProbability(int classNum)
getClassProbability
in interface SoftClassifiedInstance
public void setClassProbability(int classNum, double prob)
setClassProbability
in interface SoftClassifiedInstance
public double[] getClassDistribution()
getClassDistribution
in interface SoftClassifiedInstance
public void setClassDistribution(double[] dist) throws java.lang.Exception
setClassDistribution
in interface SoftClassifiedInstance
java.lang.Exception
public java.lang.Object copy()
new Instance(instance)
copy
in interface Copyable
copy
in class Instance
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |