程序包 weka.estimators

类 EstimatorUtils

java.lang.Object
weka.estimators.EstimatorUtils
所有已实现的接口:
RevisionHandler

public class EstimatorUtils extends Object implements RevisionHandler
Contains static utility functions for Estimators.

版本:
$Revision: 1.4 $
作者:
Gabi Schmidberger (gabi@cs.waikato.ac.nz)
  • 构造器详细资料

    • EstimatorUtils

      public EstimatorUtils()
  • 方法详细资料

    • findMinDistance

      public static double findMinDistance(Instances inst, int attrIndex)
      Find the minimum distance between values
      参数:
      inst - sorted instances, sorted
      attrIndex - index of the attribute, they are sorted after
      返回:
      the minimal distance
    • getMinMax

      public static int getMinMax(Instances inst, int attrIndex, double[] minMax) throws Exception
      Find the minimum and the maximum of the attribute and return it in the last parameter..
      参数:
      inst - instances used to build the estimator
      attrIndex - index of the attribute
      minMax - the array to return minimum and maximum in
      返回:
      number of not missing values
      抛出:
      Exception - if parameter minMax wasn't initialized properly
    • getInstancesFromClass

      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.
      参数:
      data - dataset to select the instances from
      attrIndex - index of the relevant attribute
      classIndex - index of the class attribute
      classValue - the relevant class value
      返回:
      a dataset with only
    • getInstancesFromClass

      public static Instances getInstancesFromClass(Instances data, int classIndex, double classValue)
      Returns a dataset that contains of all instances of a certain class value.
      参数:
      data - dataset to select the instances from
      classIndex - index of the class attribute
      classValue - the class value
      返回:
      a dataset with only instances of one class value
    • writeCurve

      public static void writeCurve(String f, Estimator est, double min, double max, int numPoints) throws Exception
      Output of an n points of a density curve. Filename is parameter f + ".curv".
      参数:
      f - string to build filename
      est -
      min -
      max -
      numPoints -
      抛出:
      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
      Output of an n points of a density curve. Filename is parameter f + ".curv".
      参数:
      f - string to build filename
      est -
      classEst -
      classIndex -
      min -
      max -
      numPoints -
      抛出:
      Exception - if something goes wrong
    • getInstancesFromValue

      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.
      参数:
      data - dataset to select the instances from
      index - the index of the attribute
      v - the value
      返回:
      a subdataset with only instances of one value for the attribute
    • cutpointsToString

      public static String cutpointsToString(double[] cutPoints, boolean[] cutAndLeft)
      Returns a string representing the cutpoints
    • getRevision

      public String getRevision()
      Returns the revision string.
      指定者:
      getRevision 在接口中 RevisionHandler
      返回:
      the revision