plot_scatter_residuals {MLwrap} | R Documentation |
Plotting Residuals vs Predictions
Description
The plot_scatter_residuals() function produces scatter plots relating residuals to predictions, facilitating identification of heteroscedasticity and non-linear patterns in model errors. This diagnostic plot is essential for validating regression model assumptions and detecting potential issues with model specification or data quality.
Usage
plot_scatter_residuals(analysis_object)
Arguments
analysis_object |
Fitted analysis_object with 'fine_tuning()'. |
Value
analysis_object
Examples
# Note: For obtaining the residuals vs. predicted values 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 vs predicted values plot.
plot_scatter_residuals(wrap_object)
[Package MLwrap version 0.1.0 Index]