|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.core.metrics.PairwiseSelector
Abstract PairwiseSelector class. Given a metric and training data, create a set of instance pairs that correspond to metric training data
Field Summary | |
protected java.util.HashMap |
m_classInstanceMap
A hashmap where class attribute values are mapped to lists of instances of that class |
protected java.util.ArrayList |
m_classValueList
A list of classes, each element is the double value of the class attribute |
protected int |
m_numPotentialNegatives
The number of possible different-class pairs |
protected int |
m_numPotentialPositives
The number of possible same-class pairs |
Constructor Summary | |
PairwiseSelector()
|
Method Summary | |
abstract java.util.ArrayList |
createPairList(Instances instances,
int numPosPairs,
int numNegPairs,
Metric metric)
Provide an array of metric pairs metric using given training instances |
static PairwiseSelector |
forName(java.lang.String pairwiseSelectorName,
java.lang.String[] options)
Creates a new instance of a metric learner given it's class name and (optional) arguments to pass to it's setOptions method. |
void |
initSelector(Instances instances)
Initialize m_classInstanceMap and m_classValueList using a given set of instances |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.HashMap m_classInstanceMap
protected java.util.ArrayList m_classValueList
protected int m_numPotentialPositives
protected int m_numPotentialNegatives
Constructor Detail |
public PairwiseSelector()
Method Detail |
public abstract java.util.ArrayList createPairList(Instances instances, int numPosPairs, int numNegPairs, Metric metric) throws java.lang.Exception
metric
- the metric to traininstances
- data to train the metric on
java.lang.Exception
- if training has gone bad.public void initSelector(Instances instances)
public static PairwiseSelector forName(java.lang.String pairwiseSelectorName, java.lang.String[] options) throws java.lang.Exception
options
- an array of options suitable for passing to setOptions. May
be null.
java.lang.Exception
- if the metric learner name is invalid, or the options
supplied are not acceptable to the metric learner
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |