Question 6 worst score?

From the solution code i get worst balances accuracy score for HistGradientBoostingClassfier. What i am doing wrong?

Hi Miwojc,
in the top image you used KFold() to define your cv when for the HistGradientBoostingClassifieryou used cv=10.
I think you have to compare the scores of the 3 classifiers in using the same cv
as:

from sklearn.experimental import enable_hist_gradient_boosting
from sklearn.ensemble import HistGradientBoostingClassifier
RFC = RandomForestClassifier(n_estimators = 300, random_state =0)
GBC = GradientBoostingClassifier(n_estimators = 300, random_state =0)
HGC = HistGradientBoostingClassifier(max_iter=1000, random_state=0, early_stopping = True)
scores_HGC = cross_val_score(
    HGC, data, target, cv=10, scoring="balanced_accuracy", n_jobs=2
)
scores_GBC = cross_val_score(
        GBC, data, target, cv=10, scoring="balanced_accuracy", n_jobs=2
    )
scores_RFC =cross_val_score(
        RFC, data, target, cv=10, scoring="balanced_accuracy", n_jobs=2
    )
print(f"score of HGBC: {scores_HGC.mean():0.3f} | score of GBC: {scores_GBC.mean():0.3f} | score of RFC: {scores_RFC.mean():0.3f}")
1 Like

I add that I have had the same issue with question 6 of Wrap Up quiz 6. How in the world am I supposed to know that we should do early_stopping, if in earlier quizzes I’m penalised for changing parameters if I’m not expressly told so in the question?
All through out the exams I find that sometimes I am penalised for not changing the parameters of the classifiers or regressors, and other times I’m penalised for trying to improve them and I miss points for no reason at all, in the end I have to have read the examiner’s brain to know whether I should go in detail (statistically robust) or not. I haven’t complained about that for the first 5 quizzes, but not I can’t take it anymore. It’s so frustrating it makes me want to give up on the other quizzes. Penalise me if you want but not this unfairly! I lost like 3 points on the Wrap-up quizzes so far because of that.
The course is amazing and all, but the quizzes… ugh!!

1 Like

We understand your frustration. This is the first time we run the mooc and we learned a lot on how to write questions for the quiz to avoid this kinds of ambiguities.

We will refactor Q6 of WQ6 for the next iteration and lower the the bar to 50% instead of 60% for this session to account for those problematic questions.

1 Like

The ensemble wrap-up quiz has been completely reworked (different dataset)