predict_bkt {BKT}R Documentation

Predict

Description

Predict outcomes using a fitted BKT model. This function uses a trained Bayesian Knowledge Tracing (BKT) model to make predictions on new data. The predictions include both the likelihood of a correct response (correct_predictions) and the estimated hidden state of the learner's knowledge (state_predictions).

Usage

predict_bkt(model, data_path = NULL, data = NULL)

Arguments

model

A trained BKT model object. The model must have been previously fitted using the fit() function. If the model is not fitted, an error will be raised.

data_path

Character. The file path to the dataset on which predictions will be made. If this is provided, the function will read data from the file.

data

Data frame. A pre-loaded dataset to be used for predictions. This can be used instead of specifying data_path.

Value

A data frame containing the original data with two additional columns: correct_predictions and state_predictions.

Examples


model <- bkt(seed = 42)
fit_model <- fit(model, data_path = "ct.csv")
predictions <- predict_bkt(fit_model, data_path = "ct_test.csv")
head(predictions)


[Package BKT version 0.1.0 Index]