Class VectorStats


  • public class VectorStats
    extends java.lang.Object
    • Constructor Detail

      • VectorStats

        public VectorStats()
    • Method Detail

      • mean

        public static SparseVector mean​(InstanceList instances)
        Returns a SparseVector whose entries (taken from the union of those in the instances) are the expected values of those in the InstanceList. This implies the returned vector will not have binary values.
      • mean

        public static SparseVector mean​(InstanceList instances,
                                        int numIndices)
        Returns a SparseVector whose entries (dense with the given number of indices) are the expected values of those in the InstanceList. This implies the returned vector will not have binary values.
      • mean

        public static SparseVector mean​(InstanceList instances,
                                        int[] indices)
        Returns a SparseVector whose entries (the given indices) are the expected values of those in the InstanceList. This implies the returned vector will not have binary values.
      • variance

        public static SparseVector variance​(InstanceList instances,
                                            boolean unbiased)
        Returns a SparseVector whose entries (taken from the union of those in the instances) are the variance of those in the InstanceList. This implies the returned vector will not have binary values.
        Parameters:
        unbiased - Normalizes by N-1 when true, and by N otherwise.
      • variance

        public static SparseVector variance​(InstanceList instances,
                                            SparseVector mean,
                                            boolean unbiased)
        Returns a SparseVector whose entries (taken from the mean argument) are the variance of those in the InstanceList. This implies the returned vector will not have binary values.
        Parameters:
        unbiased - Normalizes by N-1 when true, and by N otherwise.