Enum CovarFlagsEnum

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<CovarFlagsEnum>

    public enum CovarFlagsEnum
    extends java.lang.Enum<CovarFlagsEnum>
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      COVAR_COLS
      If the flag is specified, all the input vectors are stored as columns of the samples matrix.
      COVAR_NORMAL
      The output covariance matrix is calculated as: \f[\texttt{scale} \cdot [ \texttt{vects} [0]- \texttt{mean} , \texttt{vects} [1]- \texttt{mean} ,...] \cdot [ \texttt{vects} [0]- \texttt{mean} , \texttt{vects} [1]- \texttt{mean} ,...]^T,\f] covar will be a square matrix of the same size as the total number of elements in each input vector.
      COVAR_ROWS
      If the flag is specified, all the input vectors are stored as rows of the samples matrix.
      COVAR_SCALE
      If the flag is specified, the covariance matrix is scaled.
      COVAR_SCRAMBLED
      The output covariance matrix is calculated as: \f[\texttt{scale} \cdot [ \texttt{vects} [0]- \texttt{mean} , \texttt{vects} [1]- \texttt{mean} ,...]^T \cdot [ \texttt{vects} [0]- \texttt{mean} , \texttt{vects} [1]- \texttt{mean} ,...],\f] The covariance matrix will be nsamples x nsamples.
      COVAR_USE_AVG
      If the flag is specified, the function does not calculate mean from the input vectors but, instead, uses the passed mean vector.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int value  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static CovarFlagsEnum valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static CovarFlagsEnum[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • COVAR_SCRAMBLED

        public static final CovarFlagsEnum COVAR_SCRAMBLED
        The output covariance matrix is calculated as: \f[\texttt{scale} \cdot [ \texttt{vects} [0]- \texttt{mean} , \texttt{vects} [1]- \texttt{mean} ,...]^T \cdot [ \texttt{vects} [0]- \texttt{mean} , \texttt{vects} [1]- \texttt{mean} ,...],\f] The covariance matrix will be nsamples x nsamples. Such an unusual covariance matrix is used for fast PCA of a set of very large vectors (see, for example, the EigenFaces technique for face recognition). Eigenvalues of this "scrambled" matrix match the eigenvalues of the true covariance matrix. The "true" eigenvectors can be easily calculated from the eigenvectors of the "scrambled" covariance matrix.
      • COVAR_NORMAL

        public static final CovarFlagsEnum COVAR_NORMAL
        The output covariance matrix is calculated as: \f[\texttt{scale} \cdot [ \texttt{vects} [0]- \texttt{mean} , \texttt{vects} [1]- \texttt{mean} ,...] \cdot [ \texttt{vects} [0]- \texttt{mean} , \texttt{vects} [1]- \texttt{mean} ,...]^T,\f] covar will be a square matrix of the same size as the total number of elements in each input vector. One and only one of COVAR_SCRAMBLED and COVAR_NORMAL must be specified.
      • COVAR_USE_AVG

        public static final CovarFlagsEnum COVAR_USE_AVG
        If the flag is specified, the function does not calculate mean from the input vectors but, instead, uses the passed mean vector. This is useful if mean has been pre-calculated or known in advance, or if the covariance matrix is calculated by parts. In this case, mean is not a mean vector of the input sub-set of vectors but rather the mean vector of the whole set.
      • COVAR_SCALE

        public static final CovarFlagsEnum COVAR_SCALE
        If the flag is specified, the covariance matrix is scaled. In the "normal" mode, scale is 1./nsamples . In the "scrambled" mode, scale is the reciprocal of the total number of elements in each input vector. By default (if the flag is not specified), the covariance matrix is not scaled ( scale=1 ).
      • COVAR_ROWS

        public static final CovarFlagsEnum COVAR_ROWS
        If the flag is specified, all the input vectors are stored as rows of the samples matrix. mean should be a single-row vector in this case.
      • COVAR_COLS

        public static final CovarFlagsEnum COVAR_COLS
        If the flag is specified, all the input vectors are stored as columns of the samples matrix. mean should be a single-column vector in this case.
    • Field Detail

      • value

        public final int value
    • Method Detail

      • values

        public static CovarFlagsEnum[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (CovarFlagsEnum c : CovarFlagsEnum.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CovarFlagsEnum valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null