public class PegasosSgdSvm extends SgdSvm implements java.io.Serializable
alpha, dataLoadingTime, isInvalid, iterations, samples, testingTime, trainingTime, w, x, xBatch, y, yBatch| Constructor and Description |
|---|
PegasosSgdSvm(double[] w,
double[][] x,
double[] y,
double alpha,
int iterations,
int features) |
PegasosSgdSvm(double[] w,
double[] x,
double y,
double alpha,
int iterations) |
PegasosSgdSvm(double[] x,
double y,
double alpha,
int iterations) |
PegasosSgdSvm(double[] w,
double alpha,
int iterations,
int features) |
| Modifier and Type | Method and Description |
|---|---|
double[] |
getW() |
void |
iterativeSgd(double[] w,
double[][] x,
double[] y)
This is the iterative Sgd based SVM for Linear Kernel
|
void |
iterativeTaskSgd(double[] w1,
double[][] x1,
double[] y1) |
<T> void |
onlineDynamicSGD(T[] w1,
T[] x1,
T y1) |
void |
onlineSGD(double[] w,
double[] x,
double y)
This is the Online Sgd based SVM for Linear Kernel
|
void |
setW(double[] w) |
void |
sgd()
Deprecated.
Use iterativeSGD for batch mode training
Use onlineSGD for streaming mode training
|
public PegasosSgdSvm(double[] x,
double y,
double alpha,
int iterations)
public PegasosSgdSvm(double[] w,
double[] x,
double y,
double alpha,
int iterations)
public PegasosSgdSvm(double[] w,
double alpha,
int iterations,
int features)
public PegasosSgdSvm(double[] w,
double[][] x,
double[] y,
double alpha,
int iterations,
int features)
@Deprecated
public void sgd()
throws NullDataSetException,
MatrixMultiplicationException
sgd in class SgdSvmNullDataSetExceptionMatrixMultiplicationExceptionpublic void iterativeSgd(double[] w,
double[][] x,
double[] y)
throws NullDataSetException,
MatrixMultiplicationException
iterativeSgd in class SgdSvmw - initial weight vector with x.length dimensionx - all data points x.length = samples x[0].length == w.length must be truey - all labels per each data pointNullDataSetExceptionMatrixMultiplicationExceptionpublic void iterativeTaskSgd(double[] w1,
double[][] x1,
double[] y1)
throws NullDataSetException,
MatrixMultiplicationException
iterativeTaskSgd in class SgdSvmNullDataSetExceptionMatrixMultiplicationExceptionpublic void onlineSGD(double[] w,
double[] x,
double y)
throws NullDataSetException,
MatrixMultiplicationException
onlineSGD in class SgdSvmw - initial weight vector with x.length dimensionx - single data point x.length = 1 x.length == w.length must be truey - label of the data pointNullDataSetExceptionMatrixMultiplicationExceptionpublic <T> void onlineDynamicSGD(T[] w1,
T[] x1,
T y1)
onlineDynamicSGD in class SgdSvm