Git Product home page Git Product logo

ml_homework_supervised's Introduction

Homework 1 Machine Learning: Supervised Learning

Datasets

The datasets are located in the data/ directory.

Credit Card

File data/craditcard.csv contain the dataset used for this homework.

As stated on the the report, a copy can also be downloaded at: https://www.kaggle.com/dalpozz/creditcardfraud/

Starcraft II

File data/train.csv contain the dataset used for this homework.

As stated on the the report, a copy can also be downloaded at: https://www.kaggle.com/c/the-insa-starcraft-2-player-prediction-challenge/data

How to use

To get the same result as we do on our report, you must take two steps:

  • generate the data
  • generate the plots

Generate data

To generate the data you will need to run the five python scripts corresponding to the five machine learning method studied here.

The five scripts to launch are:

  • src/tree.py
  • src/perceptron.py
  • src/boost.py
  • src/svm.py
  • src/knn.py

Each of the scripts take as argument the data set to use: "creditcard" or "starcraft"

For example you can launch the decision tree classifier on the starcraft dataset with:

python3 -m src.tree starcraft

You can also get all the .pikle and csv files already generated at: https://github.com/anliec/ML_homework_supervised/tree/master/stats

Generate the plots

To generate the plot given in the report you will have to run the following jupyter notebooks:

  • plot_tree.ipynb
  • plot_perceptron.ipynb
  • plot_boost.ipynb
  • plot_svm.ipynb
  • plot_knn.ipynb

Each one generate the plot for the given machine learning method from the associated .pickle files in the stats directory and try to write the generated plot into the graphs directory.

Requirement

  • Python 3 (tested with Python 3.6)
  • Keras
  • Sklearn
  • Pandas
  • Matplotlib
  • Seaborn
  • Numpy
  • jupyter

If you do not already have them installed, it can be done quickly using pip:

pip3 install keras sklearn pandas matplotlib seaborn numpy jupyter

ml_homework_supervised's People

Contributors

anliec avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Forkers

qifanz

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.