Class LibSVMOneClassOutlierDetection<V extends NumberVector>

  • Type Parameters:
    V - vector 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",
    public class LibSVMOneClassOutlierDetection<V extends NumberVector>
    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).


    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

    Erich Schubert
    • Field Detail

      • LOG

        private static final Logging LOG
        Class logger.
      • nu

        double nu
        Nu parameter.
      • gamma

        double gamma
        Gamma parameter (not for linear kernel)
      • LOG_HELPER

        static final libsvm.svm_print_interface LOG_HELPER
        Setup logging helper for SVM.
    • Constructor Detail

      • LibSVMOneClassOutlierDetection

        public LibSVMOneClassOutlierDetection​(LibSVMOneClassOutlierDetection.SVMKernel kernel,
                                              double nu,
                                              double gamma)
        kernel - Kernel to use with SVM.
        nu - Nu parameter
        gamma - Gamma 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 interface Algorithm
        Type restriction
      • run

        public OutlierResult run​(Relation<V> relation)
        Run one-class SVM.
        relation - Data relation
        Outlier result.