Package elki.svm.qmatrix
Class Kernel
- java.lang.Object
-
- elki.svm.qmatrix.Kernel
-
-
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.
-
-
-
Field Detail
-
x
protected final DataSet x
-
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 interfaceQMatrix
-
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 interfaceQMatrix
- Parameters:
i
- First objectj
- 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 interfaceQMatrix
- Parameters:
i
- First entryj
- Second entry
-
-