Giter VIP home page Giter VIP logo

enron-data-analysis's Introduction

Data Analysis and Machine Learning on Enron Dataset

This notebook shows how data analysis on enron dataset can be done. The goal of the analysis is to find the best machine learning algorithm with the best precision and recal metric values. Each algorithms' job on the way is to correctly classify poi(person of interest) from the dataset. POIs are who I am interested in since I think they are strongly related to Enron Scandal. POIs are chosen mannually and provided by Udacity's "Intro to Machine Learning" course. You can think of this notebook as a part of the assignment for the final project from the course.

The way it is organized

  1. Choose features of my interest
  2. Perform basic data analysis
  3. Find outliers, and remove them when needed
  4. Perform various machine learning algorithms
  5. Compare each results
  6. Confirm the best result

Machine Learning Part

  1. Perform basic DecisionTree classifier on raw data
  2. Perform basic DecisionTree classifier on data that outliers are removed
  3. Define a function to measure accuracy, precision, and recall metrics
  4. Define a function to run Pipeline with SelectKBest, and GridSearchCV
  5. Run different kinds of ML algorithms with a number of different parameters
  • Decision Tree Classifier
  • Adaboost Classifier
  • Random Forest Classifier
  • Support Vector Machine Classifier
  • Gaussian Naive Bayse Classifier

Result

F1 Score Result

F1 Score Result


Accuracy Score Result

Accuracy Score Result

Conclusion

The best model I could find is 'Adaboost'. The parameters with the below, it did the best job.

  • feature list: 'poi', 'bonus'
  • algotirthm: 'SAMME.R'
  • learning rate: 0.05
  • number of estimators: 30

And the scores are

  • accuracy: 0.827
  • f1: 0.7159

This model achieved the best f1 score comparing to other models, DecisionTree, Gaussian Naive Bayes, Random Forest, and Support Vector Machine. While having the best f1 score, the number of feature used is only 2. I think it could mean this model is not overfitted much. Furthermore, it achieved the best accuracy as well in the group of other models under the same number of features.

Reference

conceptual study

programming reference

error reference

enron-data-analysis's People

Contributors

deep-diver 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.