Learn R Programming

SLOS (version 1.0.1)

predict_and_evaluate: Predict using the SLOS model

Description

This function makes predictions using the pre-trained SLOS model and evaluates it based on RMSE, MAE, and R2 values.

Usage

predict_and_evaluate(data)

Value

A list containing the predictions made on the input data, a data frame combining the observed values and predictions side by side, and the RMSE, MAE, and R2.

Arguments

data

A data frame or matrix of new data for prediction.

Examples

Run this code
# \donttest{
# Load example data
data(SampledData)

# Make predictions and evaluate
results <- predict_and_evaluate(sampled_data)

# View results
print(results$RMSE)
print(results$MAE)
print(results$R2)
# }

Run the code above in your browser using DataLab