Package elki.outlier.svm
Class OCSVM<V>
- java.lang.Object
-
- elki.outlier.svm.OCSVM<V>
-
- Type Parameters:
V
- Object type
- All Implemented Interfaces:
Algorithm
,OutlierAlgorithm
@Reference(authors="B. Sch\u00f6lkopf, J. C. Platt, J. Shawe-Taylor, A. J. Smola, R. C. Williamson", title="Estimating the support of a high-dimensional distribution", booktitle="Neural computation 13.7", url="https://doi.org/10.1162/089976601750264965", bibkey="DBLP:journals/neco/ScholkopfPSSW01") public class OCSVM<V> extends java.lang.Object implements OutlierAlgorithm
Outlier-detection using one-class support vector machines.Important note: from literature, the one-class SVM is trained as if 0 was the only counterexample. Outliers will only be detected when they are close to the origin in kernel space! In our experience, results from this method are rather mixed, in particular as you would likely need to tune hyperparameters. Results may be better if you have a training data set with positive examples only, then apply it only to new data (which is currently not supported in this implementation, it assumes a single-dataset scenario).
Reference:
B. Schölkopf, J. C. Platt, J. Shawe-Taylor, A. J. Smola, R. C. Williamson
Estimating the support of a high-dimensional distribution
Neural computation 13.7- Since:
- 0.7.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface elki.Algorithm
Algorithm.Utils
-
-
Constructor Summary
Constructors Constructor Description OCSVM(PrimitiveSimilarity<? super V> kernel, double nu)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeInformation[]
getInputTypeRestriction()
Get the input type restriction used for negotiating the data query.OutlierResult
run(Relation<V> relation)
Run one-class SVM.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.outlier.OutlierAlgorithm
autorun
-
-
-
-
Field Detail
-
LOG
private static final Logging LOG
Class logger.
-
kernel
PrimitiveSimilarity<? super V> kernel
Kernel function.
-
nu
double nu
Nu parameter.
-
-
Constructor Detail
-
OCSVM
public OCSVM(PrimitiveSimilarity<? super V> kernel, double nu)
Constructor.- Parameters:
kernel
- Kernel to use with SVM.nu
- Nu parameter
-
-
Method Detail
-
getInputTypeRestriction
public TypeInformation[] getInputTypeRestriction()
Description copied from interface:Algorithm
Get the input type restriction used for negotiating the data query.- Specified by:
getInputTypeRestriction
in interfaceAlgorithm
- Returns:
- Type restriction
-
run
public OutlierResult run(Relation<V> relation)
Run one-class SVM.- Parameters:
relation
- Data relation- Returns:
- Outlier result.
-
-