Class Kernel

  • All Implemented Interfaces:
    QMatrix
    Direct Known Subclasses:
    R2_Qq, SVC_Q

    public class Kernel
    extends java.lang.Object
    implements QMatrix
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private double[] QD  
      protected DataSet x  
    • Constructor Summary

      Constructors 
      Constructor Description
      Kernel​(DataSet x)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double[] get_QD()
      Get the diagonal values, as reference.
      void initialize()
      Initialize the Q Matrix.
      double similarity​(int i, int j)
      (Slow) compute the similarity (not distance) of objects i and j.
      void swap_index​(int i, int j)
      Reorganize the data by swapping two entries.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface elki.svm.qmatrix.QMatrix

        get_Q
    • Field Detail

      • QD

        private final double[] QD
    • Constructor Detail

      • Kernel

        public Kernel​(DataSet x)
    • Method Detail

      • initialize

        public void initialize()
        Description copied from interface: QMatrix
        Initialize the Q Matrix.
        Specified by:
        initialize in interface QMatrix
      • similarity

        public double similarity​(int i,
                                 int j)
        Description copied from interface: QMatrix
        (Slow) compute the similarity (not distance) of objects i and j.

        If you need many, use QMatrix.get_Q(int, int, float[]) instead.

        Specified by:
        similarity in interface QMatrix
        Parameters:
        i - First object
        j - Second object
        Returns:
        Similarity
      • swap_index

        public void swap_index​(int i,
                               int j)
        Description copied from interface: QMatrix
        Reorganize the data by swapping two entries.

        This also must modify the QD array!

        Specified by:
        swap_index in interface QMatrix
        Parameters:
        i - First entry
        j - Second entry
      • get_QD

        public final double[] get_QD()
        Description copied from interface: QMatrix
        Get the diagonal values, as reference.
        Specified by:
        get_QD in interface QMatrix
        Returns:
        Diagonal values