Repository navigation
[FAQ Bot] NEW: Homework 4 Q5: For 5-fold cross-validation, should KFold split `df_tra - #467
Open
github-actions[bot] wants to merge 1 commit into
Open
github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
3 tasks done
|
For Homework 4 Q5, call kfold.split(...) on df_full_train, not df_train. The reason is that cross-validation replaces the usual train/validation split. df_full_train is the full 80% training portion, and 5-fold CV repeatedly splits that same 80% into training and validation folds. Then separate the target inside each fold, Also fit a new DictVectorizer inside each fold. Note that: Do not fit the vectorizer once outside the CV loop, because that would expose validation-fold categories to training and create leakage. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✨ FAQ NEW
Course: machine-learning-zoomcamp
Section: module-4 (This is about how to set up cross-validation folds for classification evaluation, which fits the Module 4 section on cross-validation and ROC AUC.)
Related Issue: #466
Question
Homework 4 Q5: For 5-fold cross-validation, should
KFoldsplitdf_trainordf_full_train?Decision Rationale
No existing FAQ explicitly answers which dataframe to split for 5-fold cross-validation in Homework 4 Q5 (whether to use
df_trainordf_full_train).Placement Details
module-4homework-4-q5-kfold-split-df-full-train-vs-df-train🤖 Generated by FAQ Bot
Closes #466