Learn R Programming

MLwrap (version 0.1.0)

plot_scatter_predictions: Plotting Observed vs Predictions

Description

The plot_scatter_predictions() function generates scatter plots between observed and predicted values, providing direct visual assessment of model predictive accuracy. The function displays both training and test results side by side, enabling evaluation of model generalization performance and identification of potential overfitting.

Usage

plot_scatter_predictions(analysis_object)

Value

analysis_object

Arguments

analysis_object

Fitted analysis_object with 'fine_tuning()'.

Examples

Run this code
# Note: For obtaining the observed vs. predicted values plot the user needs to
# complete till fine_tuning( ) function of the MLwrap pipeline.

# \donttest{

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 observed vs predicted values plot.

plot_scatter_predictions(wrap_object)

# }

Run the code above in your browser using DataLab