Hey!
I got 89.6% accuracy in my model which I made using DecisionTreeClassifier() and then used AdaBoost . But, still I got 42% scoring on the leaderboard. I have had these problems before also even though sometimes my code is almost similiar to the solution.
I cleaned the data, replaced the missing values using .fillna method, as taught by Prateek Sir.
Please help me figure out the problem because I am unable to do the same. Also, PLEASE CLARIFY on how our projects on Coding Blocks are scored on the leaderboard.
Following is my code:
dt = DecisionTreeClassifier(criterion=‘entropy’)
dt.fit(X_train, Y_train)
dt.score(X_train, Y_train)
y_pred = dt.predict(X_test)
from sklearn.ensemble import AdaBoostClassifier
ada = AdaBoostClassifier(base_estimator=dt, n_estimators=180, random_state=1)
ada.fit(X_train, Y_train)
yp = ada.predict(X_test)
I have predicted values using both the classifiers.
PLEASE HELP ASAP.