|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.estimators.EstimatorUtils
public class EstimatorUtils
Contains static utility functions for Estimators.
Constructor Summary | |
---|---|
EstimatorUtils()
|
Method Summary | |
---|---|
static java.lang.String |
cutpointsToString(double[] cutPoints,
boolean[] cutAndLeft)
Returns a string representing the cutpoints |
static double |
findMinDistance(Instances inst,
int attrIndex)
Find the minimum distance between values |
static Instances |
getInstancesFromClass(Instances data,
int classIndex,
double classValue)
Returns a dataset that contains of all instances of a certain class value. |
static java.util.Vector |
getInstancesFromClass(Instances data,
int attrIndex,
int classIndex,
double classValue,
Instances workData)
Returns a dataset that contains all instances of a certain class value. |
static Instances |
getInstancesFromValue(Instances data,
int index,
double v)
Returns a dataset that contains of all instances of a certain value for the given attribute. |
static int |
getMinMax(Instances inst,
int attrIndex,
double[] minMax)
Find the minimum and the maximum of the attribute and return it in the last parameter.. |
java.lang.String |
getRevision()
Returns the revision string. |
static void |
writeCurve(java.lang.String f,
Estimator est,
double min,
double max,
int numPoints)
Output of an n points of a density curve. |
static void |
writeCurve(java.lang.String f,
Estimator est,
Estimator classEst,
double classIndex,
double min,
double max,
int numPoints)
Output of an n points of a density curve. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EstimatorUtils()
Method Detail |
---|
public static double findMinDistance(Instances inst, int attrIndex)
inst
- sorted instances, sortedattrIndex
- index of the attribute, they are sorted after
public static int getMinMax(Instances inst, int attrIndex, double[] minMax) throws java.lang.Exception
inst
- instances used to build the estimatorattrIndex
- index of the attributeminMax
- the array to return minimum and maximum in
java.lang.Exception
- if parameter minMax wasn't initialized properlypublic static java.util.Vector getInstancesFromClass(Instances data, int attrIndex, int classIndex, double classValue, Instances workData)
data
- dataset to select the instances fromattrIndex
- index of the relevant attributeclassIndex
- index of the class attributeclassValue
- the relevant class value
public static Instances getInstancesFromClass(Instances data, int classIndex, double classValue)
data
- dataset to select the instances fromclassIndex
- index of the class attributeclassValue
- the class value
public static void writeCurve(java.lang.String f, Estimator est, double min, double max, int numPoints) throws java.lang.Exception
f
- string to build filenameest
- min
- max
- numPoints
-
java.lang.Exception
- if something goes wrongpublic static void writeCurve(java.lang.String f, Estimator est, Estimator classEst, double classIndex, double min, double max, int numPoints) throws java.lang.Exception
f
- string to build filenameest
- classEst
- classIndex
- min
- max
- numPoints
-
java.lang.Exception
- if something goes wrongpublic static Instances getInstancesFromValue(Instances data, int index, double v)
data
- dataset to select the instances fromindex
- the index of the attributev
- the value
public static java.lang.String cutpointsToString(double[] cutPoints, boolean[] cutAndLeft)
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |