Documentation of 'smile.feature.SumSquaresRatio' Java class
SumSquaresRatio
smile.feature

Class SumSquaresRatio

  • All Implemented Interfaces:
    FeatureRanking


    public class SumSquaresRatio
    extends java.lang.Object
    implements FeatureRanking
    The ratio of between-groups to within-groups sum of squares is a univariate feature ranking metric, which can be used as a feature selection criterion for multi-class classification problems. For each variable j, this ratio is BSS(j) / WSS(j) = ΣI(yi = k)(xkj - x·j)2 / ΣI(yi = k)(xij - xkj)2; where x·j denotes the average of variable j across all samples, xkj denotes the average of variable j across samples belonging to class k, and xij is the value of variable j of sample i. Clearly, features with larger sum squares ratios are better for classification.

    References

    1. S. Dudoit, J. Fridlyand and T. Speed. Comparison of discrimination methods for the classification of tumors using gene expression data. J Am Stat Assoc, 97:77-87, 2002.
    • Constructor Summary

      Constructors 
      Constructor and Description
      SumSquaresRatio() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double[] rank(double[][] x, int[] y)
      Univariate feature ranking.
      • Methods inherited from class java.lang.Object

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

      • SumSquaresRatio

        public SumSquaresRatio()
    • Method Detail

      • rank

        public double[] rank(double[][] x,
                             int[] y)
        Description copied from interface: FeatureRanking
        Univariate feature ranking. Note that this method actually does NOT rank the features. It just returns the metric values of each feature. The caller can then rank and select features.
        Specified by:
        rank in interface FeatureRanking
        Parameters:
        x - a n-by-p matrix of n instances with p features.
        y - class labels in [0, k), where k is the number of classes.
        Returns:
        the metric values of each feature.

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.