Giter Club home page Giter Club logo

unifyid's Introduction

Online Outlier Detection Challenge for UnifyID

I used the Kaggle Credit Card Fraud Detection dataset. Data Exploration and Setup.ipynb contains the code I used for exploring the dataset a bit and also how I divided it to use in my models. The data files that I created have not been pushed to GitHub.

The first method I looked at was the centroid anomaly detection algorithm from Kloft M, Laskov P. Online Anomaly Detection under Adversarial Impact. Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics. 2010. pp. 405–412. It's a simple model that doesn't require much computational power. It looks at the Euclidean distance between data points and the centroid (mean) value of the training dataset. Any points past a certain distance are considered outliers. I was able to achieve 90.9% AUC with this algorithm.

The second method I looked at was the one class Support Vector Machine, based on Schölkopf B, Williamson RC, Smola AJ, Shawe-Taylor J, Platt JC. Support Vector Method for Novelty Detection. Advances in Neural Information Processing Systems 12, [NIPS Conference, Denver, Colorado, USA, November 29 - December 4, 1999]. 1999. pp. 582–588. In essence, this algorithm treats the origin in feature space as the second class and creates an appropriate decision boundary. This model is not necessarily the best for the Kaggle dataset, but it seems like a valuable model to know for real world datasets, which likely have > 100 features. I used the svm.OneClassSVM() implementation in scikit learn, with my own addition to the algorithm for making updates. I achieved 80.5% AUC.

For convenience, the final functions have been collected in the notebook Collected Fucntions.ipynb.

Future Directions

Since there was no way to know how meaningful the 'Time' feature was, I ignored it. It is possible that treating the data as a time series could improve the accuracy based on when the fraudulent transactions happened, specifically if there are several in a short time period.

There are also many more models to try. I found a review here that is a gold mine of ideas. Specifically, I'm most familiar with neural networks, so I would like to try a replicator neural network based on Hawkins S, He H, Williams G, Baxter R. Outlier Detection Using Replicator Neural Networks. Data Warehousing and Knowledge Discovery. Springer, Berlin, Heidelberg; 2002. pp. 170–180. The input and the output layers are the same, so the algorithm measures the error of trying to reconstruct the inputs. Any future inputs that it fails to reconstruct are considered outliers. The appealing part of this algorithm is that the updates are algorithmically easy and make sense conceptually.

unifyid's People

Contributors

dlmccaffrey avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

vu1seek

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.