Package elki.svm.qmatrix
Class SVR_Q
- java.lang.Object
-
- elki.svm.qmatrix.SVR_Q
-
- All Implemented Interfaces:
QMatrix
public class SVR_Q extends java.lang.Object implements QMatrix
Q matrix used for regression byEpsilonSVRandNuSVR.This uses two "copies" of the data, one for upper bounding and one for lower bounding of the data, yielding a virtual size of 2*l.
To save memory, we cache inside, to avoid duplication.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidget_Q(int i, 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.
-
-
-
Field Detail
-
l
private final int l
-
sign
private final byte[] sign
-
index
private final int[] index
-
inner
private CachedQMatrix inner
-
QD
private final double[] QD
-
-
Constructor Detail
-
SVR_Q
public SVR_Q(DataSet x, double cache_size)
-
-
Method Detail
-
initialize
public void initialize()
Description copied from interface:QMatrixInitialize the Q Matrix.- Specified by:
initializein interfaceQMatrix
-
get_QD
public double[] get_QD()
Description copied from interface:QMatrixGet the diagonal values, as reference.
-
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
-
get_Q
public void get_Q(int i, int len, float[] out)Description copied from interface:QMatrixGet a column of the matrix.
-
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
-
-