public class RandomDecisionTree extends Object
RandomDecision
nodes used for constructing a string of bits which represent a cluster
point for a single data pointConstructor and Description |
---|
RandomDecisionTree()
A convenience function allowing the RandomDecisionTree to be written and read.
|
RandomDecisionTree(int nDecisions,
int featureLength,
int[] minVal,
int[] maxVal)
Construct a new RandomDecisionTree setting the number of decisions and the values needed
to choose a random index and min/max values for each feature vector index.
|
RandomDecisionTree(int nDecisions,
int featureLength,
int[] minVal,
int[] maxVal,
Random r)
Construct a new RandomDecisionTree setting the number of decisions and the values needed
to choose a random index and min/max values for each feature vector index.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
boolean[] |
getLetter(int[] feature)
The function which finds the path down this random tree for a given feature.
|
RandomDecisionTree |
readASCII(Scanner br)
Read/Write RandomDecisionTree (including decision nodes)
|
RandomDecisionTree |
readBinary(DataInput dis)
Read/Write RandomDecisionTree (including decision nodes)
|
String |
toString() |
void |
write(DataOutput o)
Read/Write RandomDecisionTree (including decision nodes)
|
void |
writeASCII(PrintWriter writer)
Read/Write RandomDecisionTree (including decision nodes)
|
public RandomDecisionTree(int nDecisions, int featureLength, int[] minVal, int[] maxVal)
nDecisions
- featureLength
- minVal
- maxVal
- public RandomDecisionTree(int nDecisions, int featureLength, int[] minVal, int[] maxVal, Random r)
nDecisions
- featureLength
- minVal
- maxVal
- r
- public RandomDecisionTree()
public boolean[] getLetter(int[] feature)
feature
- public void write(DataOutput o) throws IOException
o
- IOException
public void writeASCII(PrintWriter writer)
writer
- public RandomDecisionTree readBinary(DataInput dis) throws IOException
dis
- IOException
public RandomDecisionTree readASCII(Scanner br) throws IOException
br
- IOException