| java.lang.Object weka.estimators.EstimatorUtils
EstimatorUtils | public class EstimatorUtils (Code) | | Contains static utility functions for Estimators.
author: Gabi Schmidberger (gabi@cs.waikato.ac.nz) version: $Revision: 1.3 $ |
Method Summary | |
public static String | cutpointsToString(double[] cutPoints, boolean[] cutAndLeft) | public static double | findMinDistance(Instances inst, int attrIndex) | public static Vector | getInstancesFromClass(Instances data, int attrIndex, int classIndex, double classValue, Instances workData) Returns a dataset that contains all instances of a certain class value. | public static Instances | getInstancesFromClass(Instances data, int classIndex, double classValue) Returns a dataset that contains of all instances of a certain class value. | public 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. | public 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.. | public static void | writeCurve(String f, Estimator est, double min, double max, int numPoints) Output of an n points of a density curve. | public static void | writeCurve(String f, Estimator est, Estimator classEst, double classIndex, double min, double max, int numPoints) Output of an n points of a density curve. |
cutpointsToString | public static String cutpointsToString(double[] cutPoints, boolean[] cutAndLeft)(Code) | | Returns a string representing the cutpoints
|
findMinDistance | public static double findMinDistance(Instances inst, int attrIndex)(Code) | | Find the minimum distance between values
Parameters: inst - sorted instances, sorted Parameters: attrIndex - index of the attribute, they are sorted after the minimal distance |
getInstancesFromClass | public static Vector getInstancesFromClass(Instances data, int attrIndex, int classIndex, double classValue, Instances workData)(Code) | | Returns a dataset that contains all instances of a certain class value.
Parameters: data - dataset to select the instances from Parameters: attrIndex - index of the relevant attribute Parameters: classIndex - index of the class attribute Parameters: classValue - the relevant class value a dataset with only |
getInstancesFromClass | public static Instances getInstancesFromClass(Instances data, int classIndex, double classValue)(Code) | | Returns a dataset that contains of all instances of a certain class value.
Parameters: data - dataset to select the instances from Parameters: classIndex - index of the class attribute Parameters: classValue - the class value a dataset with only instances of one class value |
getInstancesFromValue | public static Instances getInstancesFromValue(Instances data, int index, double v)(Code) | | Returns a dataset that contains of all instances of a certain value
for the given attribute.
Parameters: data - dataset to select the instances from Parameters: index - the index of the attribute Parameters: v - the value a subdataset with only instances of one value for the attribute |
getMinMax | public static int getMinMax(Instances inst, int attrIndex, double[] minMax) throws Exception(Code) | | Find the minimum and the maximum of the attribute and return it in
the last parameter..
Parameters: inst - instances used to build the estimator Parameters: attrIndex - index of the attribute Parameters: minMax - the array to return minimum and maximum in number of not missing values exception: Exception - if parameter minMax wasn't initialized properly |
writeCurve | public static void writeCurve(String f, Estimator est, double min, double max, int numPoints) throws Exception(Code) | | Output of an n points of a density curve.
Filename is parameter f + ".curv".
Parameters: f - string to build filename Parameters: est - Parameters: min - Parameters: max - Parameters: numPoints - throws: Exception - if something goes wrong |
writeCurve | public static void writeCurve(String f, Estimator est, Estimator classEst, double classIndex, double min, double max, int numPoints) throws Exception(Code) | | Output of an n points of a density curve.
Filename is parameter f + ".curv".
Parameters: f - string to build filename Parameters: est - Parameters: classEst - Parameters: classIndex - Parameters: min - Parameters: max - Parameters: numPoints - throws: Exception - if something goes wrong |
|
|