程序包 weka.experiment

类 Stats

java.lang.Object
weka.experiment.Stats
所有已实现的接口:
Serializable, RevisionHandler

public class Stats extends Object implements Serializable, RevisionHandler
A class to store simple statistics
版本:
$Revision: 1.12 $
作者:
Len Trigg (trigg@cs.waikato.ac.nz)
另请参阅:
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    double
    The number of values seen
    double
    The maximum value seen, or Double.NaN if no values seen
    double
    The mean of values at the last calculateDerived() call
    double
    The minimum value seen, or Double.NaN if no values seen
    double
    The std deviation of values at the last calculateDerived() call
    double
    The sum of values seen
    double
    The sum of values squared seen
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    add(double value)
    Adds a value to the observed values
    void
    add(double value, double n)
    Adds a value that has been seen n times to the observed values
    void
    Tells the object to calculate any statistics that don't have their values automatically updated during add.
    Returns the revision string.
    static void
    main(String[] args)
    Tests the paired stats object from the command line.
    void
    subtract(double value)
    Removes a value to the observed values (no checking is done that the value being removed was actually added).
    void
    subtract(double value, double n)
    Subtracts a value that has been seen n times from the observed values
    Returns a string summarising the stats so far.

    从类继承的方法 java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 字段详细资料

    • count

      public double count
      The number of values seen
    • sum

      public double sum
      The sum of values seen
    • sumSq

      public double sumSq
      The sum of values squared seen
    • stdDev

      public double stdDev
      The std deviation of values at the last calculateDerived() call
    • mean

      public double mean
      The mean of values at the last calculateDerived() call
    • min

      public double min
      The minimum value seen, or Double.NaN if no values seen
    • max

      public double max
      The maximum value seen, or Double.NaN if no values seen
  • 构造器详细资料

    • Stats

      public Stats()
  • 方法详细资料

    • add

      public void add(double value)
      Adds a value to the observed values
      参数:
      value - the observed value
    • add

      public void add(double value, double n)
      Adds a value that has been seen n times to the observed values
      参数:
      value - the observed value
      n - the number of times to add value
    • subtract

      public void subtract(double value)
      Removes a value to the observed values (no checking is done that the value being removed was actually added).
      参数:
      value - the observed value
    • subtract

      public void subtract(double value, double n)
      Subtracts a value that has been seen n times from the observed values
      参数:
      value - the observed value
      n - the number of times to subtract value
    • calculateDerived

      public void calculateDerived()
      Tells the object to calculate any statistics that don't have their values automatically updated during add. Currently updates the mean and standard deviation.
    • toString

      public String toString()
      Returns a string summarising the stats so far.
      覆盖:
      toString 在类中 Object
      返回:
      the summary string
    • getRevision

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

      public static void main(String[] args)
      Tests the paired stats object from the command line. reads line from stdin, expecting two values per line.
      参数:
      args - ignored.