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.voidinitialize()Initialize the Q Matrix.doublesimilarity(int i, int j)(Slow) compute the similarity (not distance) of objects i and j.voidswap_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:QMatrixInitialize the Q Matrix.- Specified by:
initializein 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:
similarityin interfaceQMatrix- Parameters:
i- First objectj- Second object- Returns:
- Similarity
-
swap_index
public void swap_index(int i, int j)Description copied from interface:QMatrixReorganize the data by swapping two entries.This also must modify the QD array!
- Specified by:
swap_indexin interfaceQMatrix- Parameters:
i- First entryj- Second entry
-
-