Git Product home page Git Product logo

classification-exercises's Introduction

Methodologies I >> Classification

  • a. Lesson Notes
  • b. Exercises

01 Data Acquisition

Acquiring and importing the data we will be using

  • aquire.py file

02 Data Preparation

Preparing and cleaning our imported data

  • prepare.py file

03 Tidy Data

  • data should be tabular (made up of rows and columns)
  • there should only be one value per cell
  • each variable should be one column
  • each observation shpould be one row Melt required when one variable is spread across multiple columns Pivot required when one column contains multiple variables

04 Exploratory Analysis

EDA | In this step we determine which features to feed into our model

  • initial investigations
  • discover patterns
  • spot anomolies
  • formulate and test hypothesis
  • check assumptions
    • summary statistics
    • graphical representations

X_train: Feature variable columns, drop target variable column
y_train: Series with our target variable column

05 Modeling

06-01 Decision Tree

06-02 Random Forest

06-03 KNN

06-04 Logistic Regression

06 Model Evaluation

How we evaluate our classification model's performance

06-i. Baseline Accuracy

06-ii. Create Object

06-iii. Fit the Model

Visualize (Decision Tree) Feature Importance (Random Forest)

06-iv. Use the Model (Make Predictions)

06-v. Classification Report

99 Imports

******ignore warnings
import warnings
warnings.filterwarnings("ignore")

import numpy as np
import pandas as pd
from scipy import stats
import os

******files/data
from pydataset import data
import env
import acquire
import prepare

******visualizations
import matplotlib.pyplot as plt
%matplotlib inline
import seaborn as sns

******sklearn
from sklearn.model_selection import train_test_split
from sklearn.tree import DecisionTreeClassifier
from sklearn.tree import export_graphviz
from sklearn.metrics import classification_report
from sklearn.metrics import confusion_matrix

np.random.seed(123)

classification-exercises's People

Contributors

stephanie-jones78 avatar

Watchers

 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.