|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfeature_filtering.DiscretizationFilterCreation
public class DiscretizationFilterCreation
This class is used for learning a discretization filter using Weka's Discretize class that supports both equal width and equal frequency binning. In our paper we use only equal width binning.
Nested Class Summary | |
---|---|
static class |
DiscretizationFilterCreation.discretizationTypes
The supported discretization types. |
Field Summary | |
---|---|
private DiscretizationFilterCreation.discretizationTypes |
descretizationType
The desired discretization type. |
private weka.filters.unsupervised.attribute.Discretize |
discretizationFilter
The learned discretization filter. |
private int |
numBins
The desired number of bins. |
Constructor Summary | |
---|---|
DiscretizationFilterCreation(DiscretizationFilterCreation.discretizationTypes discretizationType,
int numBins)
Constructor with 2 arguments, the discretization type and the number of bins. |
Method Summary | |
---|---|
void |
createAndWriteFilter(java.lang.String learningArffFileName,
java.lang.String normalizationType,
boolean writeDiscretizedInstances,
boolean writeSerializedInstancesObject)
This methods creates and serializes a discretization filter from the given arff file. |
static void |
main(java.lang.String[] args)
This method uses the DiscretizationFilterCreation class to learn a discretization filter from an arff formatted dataset file containing real-valued features (e.g. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private weka.filters.unsupervised.attribute.Discretize discretizationFilter
private DiscretizationFilterCreation.discretizationTypes descretizationType
private int numBins
Constructor Detail |
---|
public DiscretizationFilterCreation(DiscretizationFilterCreation.discretizationTypes discretizationType, int numBins)
discretizationType
- numBins
- Method Detail |
---|
public void createAndWriteFilter(java.lang.String learningArffFileName, java.lang.String normalizationType, boolean writeDiscretizedInstances, boolean writeSerializedInstancesObject) throws java.lang.Exception
learningArffFileName
- Full path to the arff file that will be used for learning the discretization filter.normalizationType
- The type of normalization to apply on the local features prior to discretization
(no/l2/power+l2).writeDiscretizedInstances
- If true writes a new arff file with the discetized features.writeSerializedInstancesObject
- If true writes a serialized Instance object which has 0 Instances but contains the header
information of the learning dataset. This serialized object will be needed by the method
that uses the learned discretization filter in order to create a correct Instances object
from an image's feature vectors.
java.lang.Exception
public static void main(java.lang.String[] args) throws java.lang.Exception
args
- [0] Full path to the arff formatted dataset file (use backslashes).args
- [1] Number of bins (e.g. 128), use 128.args
- [2] normalization type (no/l2/power+l2), use l2.
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |