text_plain_output_1.png
from sklearn.ensemble import RandomForestClassifier

from sklearn.metrics import accuracy_score, confusion_matrix

from sklearn.tree import DecisionTreeClassifier

import pandas as pd

train_df_final = pd.read_csv('../input/pumpitup-challenge-dataset/train_df_final.csv')
X_test_final = pd.read_csv('../input/pumpitup-challenge-dataset/X_test_final.csv')

X_test_final.shape

sc = ss()
X_train = sc.fit_transform(X_train)
X_valid = sc.transform(X_valid)
X_test = sc.transform(X_test_final)

decision_tree = DecisionTreeClassifier()
decision_tree.fit(X_train, y_train)
y_pred = decision_tree.predict(X_valid)
acc_decision_tree = round(accuracy_score(y_valid, y_pred) * 100, 2)
acc_decision_tree

extra_tree = DecisionTreeClassifier()
extra_tree.fit(X_train, y_train)
y_pred = extra_tree.predict(X_valid)
acc_extra_tree = round(accuracy_score(y_valid, y_pred) * 100, 2)
acc_extra_tree

rfc = RandomForestClassifier(criterion='entropy', n_estimators=1000, min_samples_split=8, random_state=42, verbose=5)
rfc.fit(X_train, y_train)
y_pred = rfc.predict(X_valid)
acc_rfc = round(accuracy_score(y_valid, y_pred) * 100, 2)
acc_rfc