Giter Site home page Giter Site logo

varunpillai / ocrf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ngoix/ocrf

0.0 2.0 0.0 114.36 MB

License: Other

Makefile 1.12% Python 88.22% PowerShell 0.23% Batchfile 0.05% Shell 0.17% R 0.13% JavaScript 0.01% CSS 0.17% CMake 0.22% C++ 4.39% C 5.30%

ocrf's Introduction

Travis AppVeyor Coveralls CircleCI Python27 Python35 PyPi

One Class Splitting Criteria for Random Forests

This repository provide the code corresponding to the article One Class Splitting Criteria for Random Forests, and other anomaly detection algorithms.

Abstract

Random Forests (RFs) are strong machine learning tools for classification and regression. However, they remain supervised algorithms, and no extension of RFs to the one-class setting has been proposed, except for techniques based on second-class sampling. This work fills this gap by proposing a natural methodology to extend standard splitting criteria to the one-class setting, structurally generalizing RFs to one-class classification. An extensive benchmark of seven state-of-the-art anomaly detection algorithms is also presented. This empirically demonstrates the relevance of our approach.

Install

The implementation is based on a fork of scikit-learn. To have a working version of both scikit-learn and OCRF scikit-learn one can use conda to create a virtual environment specific to OCRF while keeping the original version of scikit-learn clean.

This package uses distutils, which is the default way of installing python modules. To install in your home directory, use:

python setup.py build_ext --inplace

and run your personal code inside the folder OCRF. To use OCRF outside of the OCRF folder change the environment variable PYTHONPATH or create a virtual environment with Conda.

Install with Conda

First install conda Conda and update it:

conda update conda
conda update --all

Then create a virtual environment for OCRF, activate it and install OCRF and its dependencies on the new virtual environment:

conda create -n OCRF_env python=2.7 anaconda
source activate OCRF_env
conda install -n OCRF_env numpy scipy cython matplotlib

git clone https://github.com/ngoix/OCRF

cd OCRF
pip install --upgrade pip
pip install pyper
python setup.py install
cd ..

Now OCRF is installed. To check it run the script benchmark_oneclassrf.py:

python benchmarks/benchmark_oneclassrf.py

To quit the environment and revert to the original scikit-learn use:

source deactivate

To return to the OCRF environment use:

source activate OCRF_env

scikit-learn

scikit-learn is a Python module for machine learning built on top of SciPy and distributed under the 3-Clause BSD license.

The project was started in 2007 by David Cournapeau as a Google Summer of Code project, and since then many volunteers have contributed. See the AUTHORS.rst file for a complete list of contributors.

It is currently maintained by a team of volunteers.

Note scikit-learn was previously referred to as scikits.learn.

ocrf's People

Contributors

ogrisel avatar amueller avatar larsmans avatar agramfort avatar glouppe avatar pprett avatar mblondel avatar vene avatar arjoly avatar jnothman avatar jakevdp avatar mechcoder avatar robertlayton avatar nellev avatar ahojnnes avatar weilinear avatar raghavrv avatar clayw avatar kemaleren avatar oddskool avatar alexanderfabisch avatar alextp avatar bthirion avatar virgilefritsch avatar hamsal avatar dsullivan7 avatar ibayer avatar ronw avatar florianwilhelm avatar satra avatar

Watchers

James Cloos avatar Varun Pillai avatar

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.