Fit a BKT (Bayesian Knowledge Tracing) model.
This function fits the BKT model using the provided data and various options, such as
skill filtering, forget model, and parallelization. The function uses the model object
created by bkt() and fits the data according to the specified parameters.
fit(
object,
data_path = NULL,
data = NULL,
parallel = FALSE,
seed = NULL,
num_fits = 1,
forgets = FALSE,
fixed = NULL,
model_type = NULL,
...
)A fitted BKT model object, which can be used for predictions, cross-validation, or parameter analysis.
A BKT model object. The model to be cross-validated.
Character. The file path to the dataset. This will be used if data is not provided.
Data frame. The dataset to be used for cross-validation. If data is not provided,
data_path should be used to load the dataset from a file.
Logical. Indicates whether to use parallel computation.
If set to TRUE, multithreading will be used to speed up model training.
Numeric. Seed for the random number generator, which ensures reproducibility of results.
Integer. Number of fit iterations. The best model is selected from the total iterations.
Logical. Whether to include a forgetting factor in the model.
If set to TRUE, the model will account for the possibility that learners may forget knowledge.
List. A nested list specifying which parameters to fix for specific skills during
model fitting. Each skill can have certain parameters, such as "guesses" and "slips", set to
TRUE (to fix) or FALSE (to let them vary). For example:
list("skill_name" = list("guesses" = TRUE, "slips" = TRUE)).
Logical vector. Specifies model variants to use. There are four possible variants: 'multilearn', 'multiprior', 'multipair', and 'multigs'. Each corresponds to a different modeling strategy.
Other parameters.
# \donttest{
model <- bkt(seed = 42, parallel = FALSE, num_fits = 1)
result <- fit(
model,
data_path = "data.csv"
)
# }
Run the code above in your browser using DataLab