public class SVOneClass extends SupportVectorMachine implements Serializable, Cloneable
The one-class SVM algorithm estimates the support of a high-dimensional distribution without any class information. The primal problem of one-class SVM is
$$\min_ {w, \xi, \rho} \frac{1}{2} w^Tw-\rho+\frac{1}{\nu l}\sum_{i=1}^{l} \xi _i$$
$$\text{subject to} \, \, (w^T \phi (x_i)) \geq \rho - \xi _i,$$
$$ \xi _i \geq 0, i=1, \, \ldots \,,\,l$$
SupportVectorMachine.ReflectiveOperationExceptionPredictiveModel.CloneNotSupportedException, PredictiveModel.PredictiveModelException, PredictiveModel.StateChangeException, PredictiveModel.SumOfProbabilitiesNotOneException, PredictiveModel.VariableType| Constructor and Description |
|---|
SVOneClass(double[][] xy,
int responseColumnIndex,
PredictiveModel.VariableType[] varType)
Constructs a one class support vector machine.
|
SVOneClass(double[][] xy,
int responseColumnIndex,
PredictiveModel.VariableType[] varType,
Kernel k)
Constructs a one class support vector machine.
|
SVOneClass(SVOneClass oneClassModel)
Constructs a copy of the input
SVOneClass predictive model. |
| Modifier and Type | Method and Description |
|---|---|
SVOneClass |
clone()
Clones an
SVOneClass predictive model. |
protected SVModel |
optimize(DataNode[][] x,
double[] y,
double[] w,
int len,
Kernel kernel)
Performs the one class support vector machine optimization problem.
|
protected double[] |
predictValues(SVModel model,
double[][] attributeData)
Generates the predicted values on the attribute data using the given
support vector machine model.
|
fitModel, getConvergenceTolerance, getKernel, getKernelParameters, getModel, getNuParameter, getRegularizationParameter, getWorkingArraySize, isNuFormulation, isProbability, isShrinking, predict, predict, setConfiguration, setConvergenceTolerance, setKernel, setKernelParameters, setNuFormulation, setNuParameter, setProbability, setRegularizationParameter, setShrinking, setWorkArraySizegetClassCounts, getClassErrors, getClassLabels, getClassProbabilities, getCostMatrix, getMaxNumberOfCategories, getMaxNumberOfIterations, getNumberOfClasses, getNumberOfColumns, getNumberOfMissing, getNumberOfPredictors, getNumberOfRows, getNumberOfUniquePredictorValues, getPredictorIndexes, getPredictorTypes, getPrintLevel, getPriorProbabilities, getRandomObject, getResponseColumnIndex, getResponseVariableAverage, getResponseVariableMostFrequentClass, getResponseVariableType, getTotalWeight, getVariableType, getWeights, getXY, isConstantSeries, isMustFitModel, isUserFixedNClasses, predict, setClassCounts, setClassLabels, setClassProbabilities, setCostMatrix, setMaxNumberOfCategories, setMaxNumberOfIterations, setMustFitModel, setNumberOfClasses, setPredictorIndex, setPredictorTypes, setPrintLevel, setPriorProbabilities, setRandomObject, setResponseColumnIndex, setTrainingData, setVariableType, setWeightspublic SVOneClass(double[][] xy,
int responseColumnIndex,
PredictiveModel.VariableType[] varType)
xy - a double matrix containing the training data and
associated response values
by the number of variablesresponseColumnIndex - an int, the column index of the
response variablevarType - a PredictiveModel.VariableType array of
length equal to xy[0].length containing the type of each
variablepublic SVOneClass(double[][] xy,
int responseColumnIndex,
PredictiveModel.VariableType[] varType,
Kernel k)
xy - a double matrix containing the training data and
associated response valuesresponseColumnIndex - an int, the column index of the
response variablevarType - a PredictiveModel.VariableType array of
length equal to xy[0].length containing the type of each
variablek - a Kernel, the kernel functionpublic SVOneClass(SVOneClass oneClassModel)
SVOneClass predictive model.oneClassModel - an SVOneClass predictive modelpublic SVOneClass clone()
SVOneClass predictive model.clone in class PredictiveModelSVOneClass predictive modelprotected SVModel optimize(DataNode[][] x, double[] y, double[] w, int len, Kernel kernel) throws NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException
optimize in class SupportVectorMachinex - a DataNode matrix containing the attribute datay - a double array containing the response variablelen - an int, the total possible number of support
vectorsw - a double array containing the observation weightskernel - a Kernel objectSVModel structure containing the fitted modelNoSuchMethodException - thrown when a particular method
cannot be foundInstantiationException - thrown when an application tries
to create an instance of a class using the newInstance
method in class Class, but the specified class object cannot
be instantiated.IllegalAccessException - thrown when an application tries
to reflectively create an instance (other than an array), set or get a
field, or invoke a method, but the currently executing method does not
have access to the definition of the specified class, field, method or
constructorInvocationTargetException - a checked exception
that wraps an exception thrown by an invoked method or constructorprotected double[] predictValues(SVModel model, double[][] attributeData) throws PredictiveModel.SumOfProbabilitiesNotOneException
predictValues in class SupportVectorMachinemodel - a fitted SVModel objectattributeData - a double matrix containing the
attribute (or predictor) datadouble array containing the predictions for each
row in the input attribute dataPredictiveModel.SumOfProbabilitiesNotOneException - the
sum of probabilities is not approximately oneCopyright © 2020 Rogue Wave Software. All rights reserved.