from sklearn import metrics from sklearn.neighbors import KNeighborsClassifier import pandas as pd import numpy as np from sklearn.pipeline import make_pipeline from sklearn import preprocessing import matplotlib.pyplot as plt from datetime import datetime from joblib import dump, load from sklearn.metrics import make_scorer from sklearn.metrics import roc_auc_score # from sklearn.metrics import roc_auc_ovr from sklearn.model_selection import GridSearchCV #TODO move into preprocess pkr_data = prp.pkr_data() pkr_data.clean() pkr_data.target = 'hand' pkr_data.features = pkr_data.all.columns[pkr_data.all.columns != pkr_data.target] pkr_data.init_model_data(target =['hand'],features = ['suit1','card1','suit2','card2','suit3','card3','suit4','card4']) #ab data ab_data = prp.ab_data() # ab_data.encode = ['room_type'] ab_data.clean() ab_data.target = 'room_type' ab_data.features = ab_data.all.columns[ab_data.all.columns != ab_data.target] ab_data.init_model_data(target=ab_data.target,features=ab_data.features) print("Models Initiated")
from sklearn.model_selection import learning_curve import pandas as pd from sklearn.pipeline import make_pipeline from sklearn import preprocessing from sklearn.dummy import DummyClassifier import matplotlib.pyplot as plt from datetime import datetime import seaborn as sns from seaborn import distplot from sklearn.multiclass import OneVsRestClassifier from sklearn.model_selection import GridSearchCV #pkr_data #TODO move into preprocess pkr_data = prp.pkr_data() pkr_data.clean() pkr_data.init_model_data(target=['hand'], features=[ 'suit1', 'card1', 'suit2', 'card2', 'suit3', 'card3', 'suit4', 'card4' ]) # #ab data ab_data = prp.ab_data() ab_data.clean() ab_data.target = 'room_type' ab_data.features = ab_data.all.columns[ab_data.all.columns != ab_data.target] ab_data.init_model_data(target=ab_data.target, features=ab_data.features) # x_vars=list(ab_data.features)