|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object weka.filters.Filter weka.filters.unsupervised.attribute.PotentialClassIgnorer weka.filters.unsupervised.attribute.Discretize net.sf.bddbddb.order.MyDiscretize
public class MyDiscretize
Discretizes numeric attributes using equal frequency binning where the number of bins is equal to the square root of the number of non-missing values.
Valid filter-specific options are:
-R col1,col2-col4,...
Specifies list of columns to Discretize. First
and last are valid indexes. (default: first-last)
-V
Invert matching sense.
-D
Make binary nominal attributes.
Field Summary |
---|
Fields inherited from class weka.filters.unsupervised.attribute.Discretize |
---|
m_CutPoints, m_DefaultCols, m_DesiredWeightOfInstancesPerInterval, m_DiscretizeCols, m_FindNumBins, m_MakeBinary, m_NumBins, m_UseEqualFrequency |
Fields inherited from class weka.filters.unsupervised.attribute.PotentialClassIgnorer |
---|
m_ClassIndex, m_IgnoreClass |
Fields inherited from class weka.filters.Filter |
---|
m_NewBatch |
Constructor Summary | |
---|---|
MyDiscretize()
|
|
MyDiscretize(double p)
|
Method Summary | |
---|---|
java.lang.String |
binsTipText()
Returns the tip text for this property |
protected void |
findNumBins(int index)
Finds the number of bins to use and creates the cut points. |
java.lang.String |
findNumBinsTipText()
Returns the tip text for this property |
int |
getBins()
Ignored |
boolean |
getFindNumBins()
Get the value of FindNumBins. |
java.lang.String[] |
getOptions()
Gets the current settings of the filter. |
boolean |
getUseEqualFrequency()
Get the value of UseEqualFrequency. |
java.lang.String |
globalInfo()
Returns a string describing this filter |
java.util.Enumeration |
listOptions()
Gets an enumeration describing the available options. |
static void |
main(java.lang.String[] argv)
Main method for testing this class. |
void |
setBins(int numBins)
Ignored |
void |
setFindNumBins(boolean newFindNumBins)
Set the value of FindNumBins. |
boolean |
setInputFormat(weka.core.Instances instanceInfo)
Sets the format of the input instances. |
void |
setOptions(java.lang.String[] options)
Parses the options for this object. |
void |
setUseEqualFrequency(boolean newUseEqualFrequency)
Set the value of UseEqualFrequency. |
java.lang.String |
useEqualFrequencyTipText()
Returns the tip text for this property |
Methods inherited from class weka.filters.unsupervised.attribute.Discretize |
---|
attributeIndicesTipText, batchFinished, calculateCutPoints, calculateCutPointsByEqualFrequencyBinning, calculateCutPointsByEqualWidthBinning, convertInstance, desiredWeightOfInstancesPerIntervalTipText, getAttributeIndices, getCutPoints, getDesiredWeightOfInstancesPerInterval, getInvertSelection, getMakeBinary, input, invertSelectionTipText, makeBinaryTipText, setAttributeIndices, setAttributeIndicesArray, setDesiredWeightOfInstancesPerInterval, setInvertSelection, setMakeBinary, setOutputFormat |
Methods inherited from class weka.filters.unsupervised.attribute.PotentialClassIgnorer |
---|
getOutputFormat, setIgnoreClass |
Methods inherited from class weka.filters.Filter |
---|
batchFilterFile, bufferInput, copyStringValues, copyStringValues, filterFile, flushInput, getInputFormat, getInputStringIndex, getOutputStringIndex, getStringIndices, inputFormat, inputFormatPeek, isOutputFormatDefined, numPendingOutput, output, outputFormat, outputFormatPeek, outputPeek, push, resetQueue, setOutputFormat, useFilter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MyDiscretize()
public MyDiscretize(double p)
Method Detail |
---|
public boolean setInputFormat(weka.core.Instances instanceInfo) throws java.lang.Exception
setInputFormat
in class weka.filters.unsupervised.attribute.Discretize
instanceInfo
- an Instances object containing the input instance
structure (any instances contained in the object are ignored - only the
structure is required).
java.lang.Exception
- if the input format can't be set successfullyprotected void findNumBins(int index)
findNumBins
in class weka.filters.unsupervised.attribute.Discretize
index
- the attribute indexpublic java.util.Enumeration listOptions()
listOptions
in interface weka.core.OptionHandler
listOptions
in class weka.filters.unsupervised.attribute.Discretize
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-R col1,col2-col4,...
Specifies list of columns to Discretize. First
and last are valid indexes. (default none)
-V
Invert matching sense.
-D
Make binary nominal attributes.
setOptions
in interface weka.core.OptionHandler
setOptions
in class weka.filters.unsupervised.attribute.Discretize
options
- 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.OptionHandler
getOptions
in class weka.filters.unsupervised.attribute.Discretize
public java.lang.String globalInfo()
globalInfo
in class weka.filters.unsupervised.attribute.Discretize
public java.lang.String findNumBinsTipText()
findNumBinsTipText
in class weka.filters.unsupervised.attribute.Discretize
public boolean getFindNumBins()
getFindNumBins
in class weka.filters.unsupervised.attribute.Discretize
public void setFindNumBins(boolean newFindNumBins)
setFindNumBins
in class weka.filters.unsupervised.attribute.Discretize
newFindNumBins
- Value to assign to FindNumBins.public java.lang.String useEqualFrequencyTipText()
useEqualFrequencyTipText
in class weka.filters.unsupervised.attribute.Discretize
public boolean getUseEqualFrequency()
getUseEqualFrequency
in class weka.filters.unsupervised.attribute.Discretize
public void setUseEqualFrequency(boolean newUseEqualFrequency)
setUseEqualFrequency
in class weka.filters.unsupervised.attribute.Discretize
newUseEqualFrequency
- Value to assign to UseEqualFrequency.public java.lang.String binsTipText()
binsTipText
in class weka.filters.unsupervised.attribute.Discretize
public int getBins()
getBins
in class weka.filters.unsupervised.attribute.Discretize
public void setBins(int numBins)
setBins
in class weka.filters.unsupervised.attribute.Discretize
numBins
- the number of binspublic static void main(java.lang.String[] argv)
argv
- should contain arguments to the filter: use -h for help
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |