-
Notifications
You must be signed in to change notification settings - Fork 3
[wip] starting point for folds #153
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
base: main
Are you sure you want to change the base?
Conversation
projects/book_chapter/folds.jl
Outdated
hybrid_model, | ||
ds, | ||
(); | ||
folds = folds, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure, maybe is better to do an outer loop over the folds? That way we could use pmap
, distributed
over them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be pmap-able, see the for loop in the last commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean that we can pass the k_fold
split directly into train
, no need for the new folds
argument.
|
||
for val_fold in 1:k | ||
@info "Split data outside of train function. Training fold $val_fold of $k" | ||
sdata = split_data(ds, hybrid_model; val_fold = val_fold, folds = folds) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we can also do the split outside of train. I guess then we don't blow up train with more keyword arguments and can get rid of the additional ones I added for kfold. @lazarusA
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, please.
# ? split training and validation data | ||
(x_train, y_train), (x_val, y_val) = split_data(data, hybridModel; split_by_id=split_by_id, shuffleobs=shuffleobs, split_data_at=split_data_at) | ||
|
||
(x_train, y_train), (x_val, y_val) = split_data(data, hybridModel; kwargs...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pass everything for data handling via kwargs...?
shuffleobs=false, | ||
split_by_id=nothing, | ||
split_data_at=0.8, | ||
# Data handling parameters are now passed via kwargs... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would not blow up the length of train arguments further but even decrease it
No description provided.