Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created October 8, 2020 11:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/e04492f45a48777d45d8571845352259 to your computer and use it in GitHub Desktop.
Save amankharwal/e04492f45a48777d45d8571845352259 to your computer and use it in GitHub Desktop.
import numpy as np # For arithmetics and arrays
import math # For inbuilt math functions
import pandas as pd # For handling data frames
import collections # used for dictionaries and counters
from itertools import permutations # used to find permutations
from sklearn.ensemble import GradientBoostingClassifier
from sklearn.ensemble import RandomForestClassifier
from sklearn.tree import DecisionTreeClassifier # Import Decision Tree Classifier
from sklearn.model_selection import train_test_split # Import train_test_split function to easily split data into training and testing samples
from sklearn.decomposition import PCA # Principal component analysis used to reduce the number of features in a model
from sklearn.preprocessing import StandardScaler # used to scale data to be used in the model
from sklearn import metrics #Import scikit-learn metrics module for accuracy calculation
from sklearn.metrics import confusion_matrix
from sklearn.metrics import classification_report
from sklearn.metrics import roc_auc_score
from sklearn.metrics import roc_curve
from sklearn.metrics import accuracy_score
from sklearn.metrics import log_loss
import pickle # To save the trained model and then read it
import seaborn as sns # Create plots
sns.set(style="ticks")
import matplotlib.pyplot as plt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment