predict_lkt {LKT} | R Documentation |
Predict for LKT Models
Description
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.
Usage
predict_lkt(
modelob,
data,
fold = NULL,
return_stats = FALSE,
min_pred_limit = 1e-05,
max_pred_limit = 0.99999
)
Arguments
modelob |
An LKT model object containing necessary model coefficients and predictors for generating predictions. |
data |
A dataset including predictor variables, the outcome variable |
fold |
Optional. Numeric vector specifying which folds to include for prediction. If NULL or empty, uses all data. |
return_stats |
Logical. If TRUE, returns both predictions and evaluation statistics (Log-Likelihood, AUC, RMSE, R^2). If FALSE, returns only the predictions. |
min_pred_limit |
Minimum prediction limit. Default is 0.00001. |
max_pred_limit |
Maximum prediction limit. Default is 0.99999. |
Value
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.