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
When using data frames generated from the tune_*() functions, we silently produce a single plot/analysis if the user doesn't correctly specify what they want.
We should detect this (when there is more than one config) and produce a meaningful error.
Also, the plot functions have a group argument and the estimation functions require group_by(). That's confusing.
Example:
library(tidymodels)
library(probably)
#> #> Attaching package: 'probably'#> The following objects are masked from 'package:base':#> #> as.factor, as.ordered
library(bonsai)
df_pred_res<-lgb_res %>% collect_predictions()
#> Error in collect_predictions(.): object 'lgb_res' not founddf_pred_tune_res<-lgb_tune_res %>% collect_predictions()
df_new<-df_pred_res[1:5,]
#> Error in eval(expr, envir, enclos): object 'df_pred_res' not founddf_tune_new<-df_pred_tune_res %>% dplyr::slice(1:5, .by=.config)
# Plotting issues# This produces 1 plot; should be twodf_pred_tune_res %>%
cal_plot_windowed(truth=class, estimate=.pred_class_1,
window_size=0.1, step_size=0.025)
# Using `group` makes two plotsdf_pred_tune_res %>%
cal_plot_windowed(truth=class, estimate=.pred_class_1, group=.config,
window_size=0.1, step_size=0.025)
# Estimation issues# Should have two groupsdf_pred_tune_res %>%
cal_estimate_logistic(truth=class)
#> #> ── Probability Calibration#> Method: Logistic Spline#> Type: Binary#> Source class: Data Frame#> Data points: 2,000#> Truth variable: `class`#> Estimate variables:#> `.pred_class_1` ==> class_1#> `.pred_class_2` ==> class_2# Has two groups via a different "by" mechanism:df_pred_tune_res %>%
group_by(.config) %>%
cal_estimate_logistic(truth=class)
#> #> ── Probability Calibration#> Method: Logistic Spline#> Type: Binary#> Source class: Data Frame#> Data points: 2,000, split in 2 groups#> Truth variable: `class`#> Estimate variables:#> `.pred_class_1` ==> class_1#> `.pred_class_2` ==> class_2
* plot changes for #92
* add groups to estimate function
* Revert "add groups to estimate function"
This reverts commit 558fa43.
* tuning the quosure code and update tests
* update with new pillar
When using data frames generated from the
tune_*()
functions, we silently produce a single plot/analysis if the user doesn't correctly specify what they want.We should detect this (when there is more than one config) and produce a meaningful error.
Also, the plot functions have a
group
argument and the estimation functions requiregroup_by()
. That's confusing.Example:
Created on 2023-03-21 by the reprex package (v2.0.1)
The text was updated successfully, but these errors were encountered: