Giter Club home page Giter Club logo

stranger's Introduction

stranger package

stranger is a framework for unsupervised anomalies detection that simplifies the user experience because the one does not need to be concerned with the many packages and functions that are required. It acts as a wrapper around existing packages ("a la Caret") and provides in a clean and uniform toolkit for evaluation explaination reporting routines. Hence the name stranger taht stands for "Simple Toolkit in R for Anomalies Get Explain and Report".

stranger provides wrapper around several packages that contain anomaly detection routines. One approach is called a weird. Currently implemented methods (weirds) can be obtained by using weird_list function. Underlying methods deal with: Angle-based Outlier Factor, autoencode, isolation Forest, kmeans (), k-Nearest Neighbour, Local Outlier Factor, Mahalanobis distance, Semi-robust principal components > distances, randomforest outlier metric.

Obviously, to be able to exploit stranger, user will need to have various packages installed -- those ones containing computational routines.

stranger basics

Using stranger, user has at disposal an analysis workflow.


![Analysis workflow](https://raw.githubusercontent.com/welovedatascience/stranger/master/man/figures/stranger_process_flow.png)
Main functions associated with proposed analysis workflow deal with:
  • Data preparation with crazyfy: treating missing values, factors/charaters variables (methods usually require numeric values), deduplicate data (but keeping a matching table to restore all records), scaling (important!)...
  • Metrics computations (using weirds) is performed by strange (using one weird) or stranger (using many weirds at once).
  • Once some metrics are available, one has to make them comparables (standardize) and eventually to aggregate them (stack). This is the purpose of singularize.
  • Based on all that is then available, once can derive anomalies (flags), which is done with get_anomalies
  • Merging back any object with source data (or any other data assumed there is an id) is possible with dedicated fortify methods.

In addition, those steps lead to objects having a specific S3 class and some visualization is possible thanks to dedicated plot methods.

Guide to use stranger package

We did write some vignette to accompany you in the discovery of anomalies using stranger. We recommend to read vignettes in the following order:

  • stranger for the impatient (vignette) will introduce you to quick workflows to get and visualize some anomalies.
  • Working with weirds () introduce the usage of stranger function, the possibility to merge, stack (aggregate) methods and normalize metics with singularize and also derive your own anomalies based on manual filtering.
  • Stranger weirds methods (vignette) list all available weirds with some information on them.
  • Extending stranger () is only suitable if you want to add some weirdness. In the case you want an additional weird method you can read this guide or contact us!.

Installation

stranger is not currently available on CRAN. Install it from github:

# install.packages(devtools)
devtools::install_github("welovedatascience/stranger")

TODO

  • Vignettes
  • sample analyis (Sven)
  • Extending stranger (Eric)
  • Shiny small interface for anomalies exploration
  • Add weird for H2O autoencode
  • add install_weirdness to install all weird packages
  • add get_info methods for every class
  • submit to CRAN

stranger's People

Contributors

ericlecoutre avatar

Watchers

James Cloos avatar CRAN robot avatar  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.