public class SVR<T> extends Object implements Regression<T>
Modifier and Type | Class and Description |
---|---|
static class |
SVR.Trainer<T>
Trainer for support vector regression.
|
Constructor and Description |
---|
SVR(T[] x,
double[] y,
double[] weight,
MercerKernel<T> kernel,
double eps,
double C)
Constructor.
|
SVR(T[] x,
double[] y,
double[] weight,
MercerKernel<T> kernel,
double eps,
double C,
double tol)
Constructor.
|
SVR(T[] x,
double[] y,
MercerKernel<T> kernel,
double eps,
double C)
Constructor.
|
SVR(T[] x,
double[] y,
MercerKernel<T> kernel,
double eps,
double C,
double tol)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
getC()
Returns the soft margin penalty parameter.
|
double |
getEpsilon()
Returns the loss function error threshold.
|
double |
getTolerance()
Returns the tolerance of convergence test.
|
double |
predict(T x)
Predicts the dependent variable of an instance.
|
public SVR(T[] x, double[] y, MercerKernel<T> kernel, double eps, double C)
x
- training instances.y
- response variable.kernel
- the kernel function.eps
- the loss function error threshold.C
- the soft margin penalty parameter.public SVR(T[] x, double[] y, double[] weight, MercerKernel<T> kernel, double eps, double C)
x
- training instances.y
- response variable.weight
- positive instance weight. The soft margin penalty
parameter for instance i will be weight[i] * C.kernel
- the kernel function.eps
- the loss function error threshold.C
- the soft margin penalty parameter.public SVR(T[] x, double[] y, MercerKernel<T> kernel, double eps, double C, double tol)
x
- training instances.y
- response variable.kernel
- the kernel function.eps
- the loss function error threshold.C
- the soft margin penalty parameter.tol
- the tolerance of convergence test.public SVR(T[] x, double[] y, double[] weight, MercerKernel<T> kernel, double eps, double C, double tol)
x
- training instances.y
- response variable.weight
- positive instance weight. The soft margin penalty
parameter for instance i will be weight[i] * C.kernel
- the kernel function.eps
- the loss function error threshold.C
- the soft margin penalty parameter.tol
- the tolerance of convergence test.public double predict(T x)
Regression
predict
in interface Regression<T>
x
- the instance.public double getC()
public double getEpsilon()
public double getTolerance()
Copyright © 2015. All rights reserved.