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
Improve Evaluator/Visualizer library #158
Conversation
@tiffanymtang I'm going to remove the upstream dependency on |
* Before: evaluators would compute global and within-group metrics; After: evaluators only compute within group metrics if `group_cols` is specified.
* Fix bug when retrieving cached results when functions are used in `*_params` (e.g., `dgp_params`). * Bug was due to differences in source bytecodes for functions. This caused issues in `dplyr::*_join`. Workaround is to use `duplicated` which ignores these source bytecodes. * Also need to `removeSource()` for functions (`.dgp_fun`, `.method_fun`) that involve global assignment (`<<-`). [See test-checkpointing example]
* Refactor main evaluator and visualizer constructors: `eval_constructor`, `eval_summarizer`, `plot_eval_constructor`, `plot_fit_constructor` * Rename arguments for more uniformity * Streamline evaluator and visualizer library functions using the main constructor functions
* Fix bug if NULL arguments are passed to Visualizer library functions * Don't remove original vary_param columns if 2+ parameters are varied across
Yup that sounds good to me. Thanks! |
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.
@tiffanymtang I took a quick look over it and lgtm to merge into main
. Let's let the tests run and then feel free to merge in unless something real fails (i.e., that isn't just the GitHub runner being stubborn).
Streamline main developer functions:
eval_constructor()
: Constructs an Evaluator that evaluates some function (e.g., metric) for each row infit_results
. Also unnests and groups columns if specified.eval_summarizer()
: Takes a grouped data.frame and summarizes output using common summary statistics (i.e., mean, median, min, max, sd, raw) or custom summary functions.plot_eval_constructor()
: Constructs a Visualizer that takes in either the data or the name of the Evaluator to plot and creates basic plot summaries (e.g., boxplot, scatter plot, line plot, bar plot, with/without error bars) with convenient defaults for what to plot on the x, y, facets, etc.plot_fit_constructor()
: Constructs a Visualizer that makes a plot (given some plotting function) of the fit results from a given replicateOther improvements:
Bug fixes
group
argumentadd_vary_across()
due to confusion betweenf
andfield_name
in.check_each_vary_across()