predict_lkt | R Documentation |
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
)
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. |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.