You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extracted from #11 (comment), because I now believe this is a separate standalone issue.
split_to_rset() calls rsample::mc_cv() just to get the structure of that rset subclass, but then we override the results with x. HOWEVER, it relies on randomness to generate the object that we overwrite. This causes some confusion with reproducibility between last_fit() and direct usage of fit()/predict().
Since we really just need to generate the structure the rset object, we should consider using the below rewrite instead. It is still suboptimal because it hardcodes the structure of an mc_cv rset, but I can live with that.
# Manually construct an `mc_cv()` rset.# Don't call `mc_cv()` directly, as that will mess with the random seedsplit_to_rset<-function(x) {
times<-1Lprop<- length(x$in_id) / nrow(x$data)
strata<-FALSEattrib<-list(prop=prop, times=times, strata=strata)
splits<-list(x)
ids<-"Resample1"rsample::new_rset(
splits=list(x),
ids=ids,
attrib=attrib,
subclass= c("mc_cv", "rset")
)
}
The text was updated successfully, but these errors were encountered:
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.
Extracted from #11 (comment), because I now believe this is a separate standalone issue.
split_to_rset()
callsrsample::mc_cv()
just to get the structure of that rset subclass, but then we override the results withx
. HOWEVER, it relies on randomness to generate the object that we overwrite. This causes some confusion with reproducibility betweenlast_fit()
and direct usage offit()/predict()
.Since we really just need to generate the structure the rset object, we should consider using the below rewrite instead. It is still suboptimal because it hardcodes the structure of an mc_cv rset, but I can live with that.
The text was updated successfully, but these errors were encountered: