weka.core.metrics
Class RandomPairwiseSelector

java.lang.Object
  extended byweka.core.metrics.PairwiseSelector
      extended byweka.core.metrics.RandomPairwiseSelector
All Implemented Interfaces:
OptionHandler, java.io.Serializable

public class RandomPairwiseSelector
extends PairwiseSelector
implements java.io.Serializable, OptionHandler

RandomPairwiseSelector class. Given a metric and training data, create a set of random instance pairs that correspond to metric training data

See Also:
Serialized Form

Field Summary
 
Fields inherited from class weka.core.metrics.PairwiseSelector
m_classInstanceMap, m_classValueList, m_numPotentialNegatives, m_numPotentialPositives
 
Constructor Summary
RandomPairwiseSelector()
          A default constructor
 
Method Summary
 java.util.ArrayList createPairList(Instances instances, int numPosPairs, int numNegPairs, Metric metric)
          Provide an array of metric pairs metric using given training instances
 java.lang.String[] getOptions()
          Gets the current settings of WeightedDotP.
 java.util.Enumeration listOptions()
          Returns an enumeration describing the available options.
 void setOptions(java.lang.String[] options)
          Parses a given list of options.
 
Methods inherited from class weka.core.metrics.PairwiseSelector
forName, initSelector
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomPairwiseSelector

public RandomPairwiseSelector()
A default constructor

Method Detail

createPairList

public java.util.ArrayList createPairList(Instances instances,
                                          int numPosPairs,
                                          int numNegPairs,
                                          Metric metric)
                                   throws java.lang.Exception
Provide an array of metric pairs metric using given training instances

Specified by:
createPairList in class PairwiseSelector
Parameters:
metric - the metric to train
instances - data to train the metric on
Throws:
java.lang.Exception - if training has gone bad.

getOptions

public java.lang.String[] getOptions()
Gets the current settings of WeightedDotP.

Specified by:
getOptions in interface OptionHandler
Returns:
an array of strings suitable for passing to setOptions()

setOptions

public void setOptions(java.lang.String[] options)
                throws java.lang.Exception
Parses a given list of options. Valid options are:

Specified by:
setOptions in interface OptionHandler
Parameters:
options - the list of options as an array of strings
Throws:
java.lang.Exception - if an option is not supported

listOptions

public java.util.Enumeration listOptions()
Returns an enumeration describing the available options.

Specified by:
listOptions in interface OptionHandler
Returns:
an enumeration of all the available options.