@Deprecated public class OptIgSplit extends IgSplit
Optimized implementation of IgSplit. This class can be used when the criterion variable is the categorical attribute.
This code was changed in MAHOUT-1419 to deal in sampled splits among numeric features to fix a performance problem. To generate some synthetic data that exercises the issue, try for example generating 4 features of Normal(0,1) values with a random boolean 0/1 categorical feature. In Scala:
val r = new scala.util.Random()
val pw = new java.io.PrintWriter("random.csv")
(1 to 10000000).foreach(e =>
pw.println(r.nextDouble() + "," +
r.nextDouble() + "," +
r.nextDouble() + "," +
r.nextDouble() + "," +
(if (r.nextBoolean()) 1 else 0))
)
pw.close()
Constructor and Description |
---|
OptIgSplit()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Split |
computeSplit(Data data,
int attr)
Deprecated.
Computes the best split for the given attribute
|
public Split computeSplit(Data data, int attr)
IgSplit
computeSplit
in class IgSplit
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.