Giter VIP home page Giter VIP logo

svdd.jl's Introduction

SVDD.jl

A Julia package for Support Vector Data Description.

Actions Status: test codecov

This package implements one-class classifiers and based on support vector data description. The package has been developed as part of a benchmark suite for active-learning strategies for one-class classification. For more information about this research project, see the OCAL project website, and the companion paper.

Holger Trittenbach, Adrian Englhardt, Klemens Böhm, "An overview and a benchmark of active learning for outlier detection with one-class classifiers", DOI: 10.1016/j.eswa.2020.114372, Expert Systems with Applications, 2021.

Installation

This package works with Julia 1.0 or newer. This package is not registered yet. Please use the following command to add the package with Pkg3.

using Pkg
Pkg.add("https://github.com/englhardt/SVDD.jl.git")

Overview

One-class classifiers learn to identify if objects belong to a specific class, often used for outlier detection. The package implements several one-class classifiers, and strategies to initialize parameters. We other visualizations in our example notebooks, see Examples

SVDD

Classifiers

Currently, the classifiers have been implemented as optimization problems based on JuMP. The package includes:

  • Vanilla Support Vector Data Description (VanillaSVDD) [1]
  • SVDD with negative examples (SVDDNeg) [1]
  • Semi-supervised Anomaly Detection (SSAD) [2]
  • Subspace SVDD (SubSVDD) [3]

Parameter Initialization

There are two types of parameters to estimate for the classifiers: cost parameters and a kernel function. The packages includes the following strategies to initialize parameters.

  • Gauss Kernel gamma
    • Rule of Scott [4]
    • Rule of Silverman [5]
    • Mean criterion [6]
    • Modified mean criterion [7]
    • Wang data shifting [8]
    • Fixed Gamma
  • Cost parameters C
    • Rule of Tax [1]
    • Binary Search
    • Fixed C

Conventions

  • Classification scores: The classifiers return scores by the following convention:
    • score > 0 for outliers
    • score <= 0 for inliers
  • Data Format: The data is expected to be in column major order, i.e., first array dimension is the attribute, second is the observation.
    • [1 2 3 4; 5 6 7 8] is a 2x4 Array with 2 attributes and 4 observations

Examples

There are two notebooks that show to train a SVDD (here) and how to use the parametrization methods (here). Execute the following commands to run the example notebooks:

git clone https://github.com/englhardt/SVDD.jl
cd SVDD/examples
julia -e "using Pkg; Pkg.instantiate()"
julia -e "using IJulia; notebook()"

You can then access the jupyter notebook server at http://localhost:8888/ and run the notebooks.

Authors

We welcome contributions and bug reports.

This package is developed and maintained by Holger Trittenbach and Adrian Englhardt.

References

[1] Tax, David MJ, and Robert PW Duin. "Support vector data description." Machine learning 54.1 (2004): 45-66.
[2] Görnitz, Nico, et al. "Toward supervised anomaly detection." Journal of Artificial Intelligence Research 46 (2013): 235-262.
[4] Scott, David W. Multivariate density estimation: theory, practice, and visualization. John Wiley & Sons, 2015.
[3] Trittenbach, Holger, and Klemens Böhm. "One-Class Active Learning for Outlier Detection with Multiple Subspaces." ACM International Conference on Information and Knowledge Management (CIKM), 2019.
[5] Silverman, Bernard W. Density estimation for statistics and data analysis. Routledge, 2018.
[6] Chaudhuri, Arin, et al. "The mean and median criteria for kernel bandwidth selection for support vector data description." 2017 IEEE International Conference on Data Mining Workshops (ICDMW). IEEE, 2017.
[7] Liao, Yuwei, et al. "A new bandwidth selection criterion for using SVDD to analyze hyperspectral data." Algorithms and Technologies for Multispectral, Hyperspectral, and Ultraspectral Imagery XXIV. Vol. 10644. International Society for Optics and Photonics, 2018.
[8] Wang, Siqi, et al. "Hyperparameter selection of one-class support vector machine by self-adaptive data shifting." Pattern Recognition 74 (2018): 198-211.

svdd.jl's People

Contributors

englhardt avatar holtri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

svdd.jl's Issues

OptimizerFactory not defined

Hi! I've just installed SVDD in Julia 1.4.2 (Ubuntu) and I found the following error:

julia> using SVDD
[ Info: Precompiling SVDD [83536b18-e0df-11e8-1e3f-f991e449cee4]
ERROR: LoadError: LoadError: UndefVarError: OptimizerFactory not defined
Stacktrace:
 [1] getproperty(::Module, ::Symbol) at ./Base.jl:26
 [2] top-level scope at /home/elin/.julia/packages/SVDD/Ed7xK/src/classifiers/sub/classifier_sub_svdd.jl:76
 [3] include(::Module, ::String) at ./Base.jl:377
 [4] include(::String) at /home/elin/.julia/packages/SVDD/Ed7xK/src/SVDD.jl:1
 [5] top-level scope at /home/elin/.julia/packages/SVDD/Ed7xK/src/SVDD.jl:8
 [6] include(::Module, ::String) at ./Base.jl:377
 [7] top-level scope at none:2
 [8] eval at ./boot.jl:331 [inlined]
 [9] eval(::Expr) at ./client.jl:449
 [10] top-level scope at ./none:3
in expression starting at /home/elin/.julia/packages/SVDD/Ed7xK/src/classifiers/sub/classifier_sub_svdd.jl:76
in expression starting at /home/elin/.julia/packages/SVDD/Ed7xK/src/SVDD.jl:8
ERROR: Failed to precompile SVDD [83536b18-e0df-11e8-1e3f-f991e449cee4] to /home/elin/.julia/compiled/v1.4/SVDD/B3Nr9_9qXKP.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1272
 [3] _require(::Base.PkgId) at ./loading.jl:1029
 [4] require(::Base.PkgId) at ./loading.jl:927
 [5] require(::Module, ::Symbol) at ./loading.jl:922

Thanks in advance,

Best regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.