approachingalmost icon indicating copy to clipboard operation
approachingalmost copied to clipboard

Fitting decision tree on wrong data frame - cross validation intro section

Open yap-alan opened this issue 4 years ago • 1 comments

Hi, I believe there is an error in the code to fit a decision tree on the red wine quality dataset.

/# train the model on the provided features /# and mapped quality from before clf.fit(df_train[cols], df_test.quality)

Shouldn't the feature column be from df_train as opposed to from df_test. This error was not repeated in the longer code section where you plot accuracies for different values of max_depth

Cheers

yap-alan avatar Aug 23 '21 21:08 yap-alan

are you reading the version downloaded from somewhere else than this repo?

abhishekkrthakur avatar Sep 01 '21 19:09 abhishekkrthakur