Class Variance

Object
org.apache.spark.mllib.tree.impurity.Variance

public class Variance extends Object
Class for calculating variance during regression
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    calculate(double[] counts, double totalCount)
    information calculation for multiclass classification
    static double
    calculate(double count, double sum, double sumSquares)
    variance calculation
    static org.apache.spark.mllib.tree.impurity.Variance$
    Get this impurity instance.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Variance

      public Variance()
  • Method Details

    • calculate

      public static double calculate(double[] counts, double totalCount)
      information calculation for multiclass classification
      Parameters:
      counts - Array[Double] with counts for each label
      totalCount - sum of counts for all labels
      Returns:
      information value, or 0 if totalCount = 0
    • calculate

      public static double calculate(double count, double sum, double sumSquares)
      variance calculation
      Parameters:
      count - number of instances
      sum - sum of labels
      sumSquares - summation of squares of the labels
      Returns:
      information value, or 0 if count = 0
    • instance

      public static org.apache.spark.mllib.tree.impurity.Variance$ instance()
      Get this impurity instance. This is useful for passing impurity parameters to a Strategy in Java.
      Returns:
      (undocumented)