|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--milk.classifiers.MIClassifier
|
+--milk.classifiers.MIWrapper
|
+--milk.classifiers.SimpleMI
Avg of feature data and reduce MI data into mono-instance Valid options are:
-M method index
Set which method to use in transformation: 1.arithmatic average; 2.geometric centor
for each bag. (default: 1)
| Field Summary | |
protected Exemplars |
m_Exemplars
|
protected int |
m_TransformMethod
|
| Fields inherited from class milk.classifiers.MIWrapper |
m_Attributes, m_Classifier, m_ClassIndex, m_Debug, m_IdIndex, m_Method, m_NumClasses |
| Constructor Summary | |
SimpleMI()
|
|
| Method Summary | |
void |
buildClassifier(Exemplars train)
Builds the classifier |
double |
classifyExemplar(Exemplar exmp)
Computes the distribution for a given exemplar |
java.lang.String[] |
getOptions()
Gets the current settings of the Classifier. |
int |
getTransformMethod()
Get the method used in transformation. |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options. |
static void |
main(java.lang.String[] argv)
Main method for testing this class. |
static double[] |
minimax(weka.core.Instances data,
int attIndex)
Get the minimal and maximal value of a certain attribute in a certain data |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
void |
setTransformMethod(int newMethod)
Set the method used in transformation. |
java.lang.String |
toString()
Gets a string describing the classifier. |
weka.core.Instances |
transform(Exemplars train)
transform the given exemplars to an Instances object. |
| Methods inherited from class milk.classifiers.MIWrapper |
distributionForExemplar, getClassifier, getDebug, getMethod, setClassifier, setDebug, setMethod |
| Methods inherited from class milk.classifiers.MIClassifier |
forName, makeCopies |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected int m_TransformMethod
protected Exemplars m_Exemplars
| Constructor Detail |
public SimpleMI()
| Method Detail |
public java.util.Enumeration listOptions()
listOptions in interface weka.core.OptionHandlerlistOptions in class MIWrapper
public void setOptions(java.lang.String[] options)
throws java.lang.Exception
-M method_index
Set which method to use in transformation: 1.arithmatic average; 2.geometric centor
of a bag (default: 1)
setOptions in interface weka.core.OptionHandlersetOptions in class MIWrapperoptions - the list of options as an array of strings
java.lang.Exception - if an option is not supportedpublic java.lang.String[] getOptions()
getOptions in interface weka.core.OptionHandlergetOptions in class MIWrapperpublic void setTransformMethod(int newMethod)
newMethod - the index of method to use.public int getTransformMethod()
public weka.core.Instances transform(Exemplars train)
throws java.lang.Exception
MITransform
transform in interface MITransformtransform in class MIWrapperjava.lang.Exception - if transformation is not successful
public static double[] minimax(weka.core.Instances data,
int attIndex)
data - the dataattIndex - the index of the attribute
public void buildClassifier(Exemplars train)
throws java.lang.Exception
buildClassifier in class MIWrappertrain - the training data to be used for generating the
boosted classifier.
java.lang.Exception - if the classifier could not be built successfully
public double classifyExemplar(Exemplar exmp)
throws java.lang.Exception
classifyExemplar in class MIClassifierexmp - the exemplar for which distribution is computed
java.lang.Exception - if the distribution can't be computed successfullypublic java.lang.String toString()
toString in class MIWrapperpublic static void main(java.lang.String[] argv)
argv - should contain the command line arguments to the
scheme (see Evaluation)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||