Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue via Email #250

Open
whitead opened this issue Aug 28, 2024 · 0 comments
Open

Issue via Email #250

whitead opened this issue Aug 28, 2024 · 0 comments

Comments

@whitead
Copy link
Owner

whitead commented Aug 28, 2024

B. Machine Learning, Chapter 3, Regression & Model Assessment, Section 3.6.1 k-Fold Cross-Validation. In the code snippets to calculate the 10-fold cross validation across all cases, the training set is amassed incorrectly and has redundant data.

Instead of

train = pd.concat([soldata[splits[i]:], soldata[splits[i + 1]:]])

it should be

train = pd.concat([soldata[:splits[i]], soldata[splits[i + 1] :]])

The change is pretty minor when we consider the whole dataset, but switching to only looking at a subset of the data, there is a significant variation in error based on the choice of k.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant