View source: R/plotting_utils.R
plot_residuals_distribution | R Documentation |
The plot_residuals_distribution() function generates histograms of residual distributions for both training and test data in regression problems. This visualization enables evaluation of error normality and detection of systematic patterns in model residuals. The function uses patchwork to combine training and test plots in a single display for direct comparison.
plot_residuals_distribution(analysis_object)
analysis_object |
Fitted analysis_object with 'fine_tuning()'. |
analysis_object
# Note: For obtaining the residuals distribution plot the user needs to
# complete till fine_tuning( ) function of the MLwrap pipeline.
wrap_object <- preprocessing(df = sim_data,
formula = psych_well ~ depression + emot_intel + resilience,
task = "regression")
wrap_object <- build_model(wrap_object, "Random Forest")
wrap_object <- fine_tuning(wrap_object, "Bayesian Optimization")
# And then, you can obtain the residuals distribution plot.
plot_residuals_distribution(wrap_object)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.