Generates predictions and evaluates logistic regression models tailored for learning data, specifically designed for Logistic Knowledge Tracing (LKT) models. This function provides flexibility in returning either just the predicted probabilities or both the predictions and key evaluation statistics.
predict_lkt(
modelob,
data,
fold = NULL,
return_stats = FALSE,
min_pred_limit = 1e-05,
max_pred_limit = 0.99999
)If return_stats is FALSE, returns a list containing:
predictions: The predicted probabilities for each observation in the specified fold(s).
If return_stats is TRUE, returns a list containing:
predictions: The predicted probabilities for each observation in the specified fold(s).
LL: Log-Likelihood of the model given the actual outcomes.
AUC: Area Under the ROC Curve.
RMSE: Root Mean Squared Error.
R2: R-squared value, indicating the proportion of variance explained by the model.
An LKT model object containing necessary model coefficients and predictors for generating predictions.
A dataset including predictor variables, the outcome variable CF..ansbin., and fold information.
Optional. Numeric vector specifying which folds to include for prediction. If NULL or empty, uses all data.
Logical. If TRUE, returns both predictions and evaluation statistics (Log-Likelihood, AUC, RMSE, R^2). If FALSE, returns only the predictions.
Minimum prediction limit. Default is 0.00001.
Maximum prediction limit. Default is 0.99999.