public class ARFFFile
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.lang.String[] |
attributes
Array of attributes
|
int |
noOfTests
The number of samples
|
Constructor and Description |
---|
ARFFFile(java.lang.String fileName,
int v)
Opens an ARFF file for reading.
|
ARFFFile(java.lang.String fileName,
int v,
int csvInterval,
CSVFile csvFile)
Opens an ARFF file for reading in increments of a given number of lines.
|
Modifier and Type | Method and Description |
---|---|
ContinuousData |
cdataFromARFF(java.util.TreeSet<java.lang.Integer> inputIndexes,
java.util.TreeSet<java.lang.Integer> outputIndexes,
int verbose)
Returns the continuous data for the given high and low features.
|
static Observations |
computeObservationsFromARFF(java.lang.String fileName,
java.util.TreeSet<java.lang.String> highFeaturesSet,
java.util.TreeSet<java.lang.String> lowFeaturesSet)
Computes the observations from a given ARFF file and given features.
|
java.util.TreeSet<java.lang.Integer> |
getFeatureIndices(java.util.TreeSet<java.lang.Integer> features,
java.util.TreeSet<java.lang.String> featuresSet)
Computes the a tree set of feature indices that appear in
the given string set.
|
java.lang.String[][] |
getSamples()
Returns the samples array.
|
Observations |
obsFromARFF(java.util.TreeSet<java.lang.Integer> inputIndexes,
java.util.TreeSet<java.lang.Integer> outputIndexes)
Returns the observation for specified high and low features.
|
void |
printFeatures(java.util.TreeSet<java.lang.Integer> highFeatures,
java.util.TreeSet<java.lang.Integer> lowFeatures,
int verbose)
Print the features that are selected to be investigated.
|
void |
setTerminateWhenStabilised(boolean flag)
Controls whether the obsFromARFF() method should terminate
before it has finished reading all of the available samples, if the
corrected leakage value stabilises.
|
public java.lang.String[] attributes
public int noOfTests
public ARFFFile(java.lang.String fileName, int v)
fileName
- ARFF file namev
- verbosepublic ARFFFile(java.lang.String fileName, int v, int csvInterval, CSVFile csvFile)
fileName
- ARFF file namev
- Verbosity levelcsvInterval
- Number of lines to read from the file during each
incrementcsvFile
- The CSV file to write intermediate leakage estimates topublic ContinuousData cdataFromARFF(java.util.TreeSet<java.lang.Integer> inputIndexes, java.util.TreeSet<java.lang.Integer> outputIndexes, int verbose)
inputIndexes
- Tree set of high feature attribute indexesoutputIndexes
- Tree set of low feature attribute indexesverbose
- verbosepublic static Observations computeObservationsFromARFF(java.lang.String fileName, java.util.TreeSet<java.lang.String> highFeaturesSet, java.util.TreeSet<java.lang.String> lowFeaturesSet)
fileName
- name of an ARFF filehighFeaturesSet
- set of strings representing high featureslowFeaturesSet
- set of strings representing low featurespublic java.util.TreeSet<java.lang.Integer> getFeatureIndices(java.util.TreeSet<java.lang.Integer> features, java.util.TreeSet<java.lang.String> featuresSet)
features
- tree set of integers each representing a selected featurefeaturesSet
- tree set of strings each representing a selected featurepublic java.lang.String[][] getSamples()
public Observations obsFromARFF(java.util.TreeSet<java.lang.Integer> inputIndexes, java.util.TreeSet<java.lang.Integer> outputIndexes)
inputIndexes
- tree set of high feature attribute indexesoutputIndexes
- tree set of low feature attribute indexespublic void printFeatures(java.util.TreeSet<java.lang.Integer> highFeatures, java.util.TreeSet<java.lang.Integer> lowFeatures, int verbose)
highFeatures
- the set of indeces representing high featureslowFeatures
- the set of indeces representing low featuresverbose
- verbosepublic void setTerminateWhenStabilised(boolean flag)
flag
- true to terminate early; false to read all
of the samples regardless.