fit {BKT}R Documentation

fit bkt model

Description

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.

Usage

fit(
  object,
  data_path = NULL,
  data = NULL,
  parallel = FALSE,
  seed = NULL,
  num_fits = 1,
  forgets = FALSE,
  fixed = NULL,
  model_type = NULL,
  ...
)

Arguments

object

A BKT model object. The model to be cross-validated.

data_path

Character. The file path to the dataset. This will be used if data is not provided.

data

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.

parallel

Logical. Indicates whether to use parallel computation. If set to TRUE, multithreading will be used to speed up model training.

seed

Numeric. Seed for the random number generator, which ensures reproducibility of results.

num_fits

Integer. Number of fit iterations. The best model is selected from the total iterations.

forgets

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.

fixed

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)).

model_type

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.

Value

A fitted BKT model object, which can be used for predictions, cross-validation, or parameter analysis.

Examples


model <- bkt(seed = 42, parallel = FALSE, num_fits = 1)
result <- fit(
  model,
  data_path = "data.csv"
)


[Package BKT version 0.1.0 Index]