public class RandomDecision extends Object
Modifier and Type | Field and Description |
---|---|
int |
feature
Feature index
|
int |
threshold
Feature threshold
|
Constructor and Description |
---|
RandomDecision()
Emtpy contructor provided to allow reading of the decision
|
RandomDecision(int featureLength,
int[] minVal,
int[] maxVal) |
RandomDecision(int featureLength,
int[] minVal,
int[] maxVal,
Random r) |
Modifier and Type | Method and Description |
---|---|
RandomDecision |
readBinary(DataInput dis)
Read decision
|
RandomDecision |
readString(String line)
Read decision from a string
|
void |
setRandomSeed(int randomSeed)
Random seed upon which a java
Random object is seeded and used to choose
random indecies and thresholds. |
String |
toString() |
void |
write(DataOutput o)
Write decision to a binary stream, threshold followed by feature.
|
void |
writeASCII(PrintWriter writer)
write decision in a human readable form
|
public int threshold
public int feature
public RandomDecision(int featureLength, int[] minVal, int[] maxVal)
featureLength
- The number of entries in this featurevectorminVal
- the min values of each featurevector entrymaxVal
- the max values of each featurevector entrypublic RandomDecision(int featureLength, int[] minVal, int[] maxVal, Random r)
featureLength
- The number of entries in this featurevectorminVal
- the min values of each featurevector entrymaxVal
- the max values of each featurevector entryr
- random seed to set before constructionpublic RandomDecision()
public void write(DataOutput o) throws IOException
o
- IOException
public void writeASCII(PrintWriter writer)
writer
- public RandomDecision readBinary(DataInput dis) throws IOException
dis
- IOException
public RandomDecision readString(String line)
line
- public void setRandomSeed(int randomSeed)
Random
object is seeded and used to choose
random indecies and thresholds.randomSeed
-