T - Datatype of input spacepublic class SMODensity<T> extends java.lang.Object implements DensityFunction<T>, java.io.Serializable
| Constructor and Description |
|---|
SMODensity(Kernel<T> K)
Constructor using the specified kernel function for computing
similarities among samples
|
| Modifier and Type | Method and Description |
|---|---|
double[] |
getAlphas()
Tells the weights of the training samples
|
double |
getC()
Tells the hyperparameter C
|
void |
setC(double c)
Sets the hyperparameter C
|
void |
train(java.util.List<T> e)
Train the density function on the specified training set
|
void |
train(T e)
Adds a sample to the training set and train the density function
|
double |
valueOf(T e)
Value of the density function for the specified sample
|
public void train(T e)
DensityFunctiontrain in interface DensityFunction<T>e - the sample to add to the training setpublic void train(java.util.List<T> e)
DensityFunctiontrain in interface DensityFunction<T>e - the list of training samplespublic double valueOf(T e)
DensityFunctionvalueOf in interface DensityFunction<T>e - the sample to evaluatepublic double[] getAlphas()
public double getC()
public void setC(double c)
c - the hyperparameter C