Package elki.svm.qmatrix
Interface QMatrix
-
- All Known Implementing Classes:
CachedQMatrix,Kernel,R2_Qq,SVC_Q,SVR_Q
public interface QMatrixAPI to get kernel similarity values.- Since:
- 0.8.0
- Author:
- Erich Schubert
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidget_Q(int column, int len, float[] out)Get a column of the matrix.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.
-
-
-
Method Detail
-
get_Q
default void get_Q(int column, int len, float[] out)Get a column of the matrix.- Parameters:
column- Column numberlen- Number of entries to getout- Output array for similarity values
-
get_QD
double[] get_QD()
Get the diagonal values, as reference.- Returns:
- Diagonal values
-
swap_index
void swap_index(int i, int j)Reorganize the data by swapping two entries.This also must modify the QD array!
- Parameters:
i- First entryj- Second entry
-
similarity
double similarity(int i, int j)(Slow) compute the similarity (not distance) of objects i and j.If you need many, use
get_Q(int, int, float[])instead.- Parameters:
i- First objectj- Second object- Returns:
- Similarity
-
initialize
void initialize()
Initialize the Q Matrix.
-
-