stanbkt.models.MultiPriors#
- class stanbkt.models.MultiPriors(pi_b0_know_mu=<stanbkt.models.priors._UnsetType object>, pi_b0_know_std=<stanbkt.models.priors._UnsetType object>, pi_b1_know_mu=<stanbkt.models.priors._UnsetType object>, pi_b1_know_std=<stanbkt.models.priors._UnsetType object>, pi_sigma_lambda=<stanbkt.models.priors._UnsetType object>, use_defaults=True, learn_mu=<stanbkt.models.priors._UnsetType object>, learn_std=<stanbkt.models.priors._UnsetType object>, forget_mu=<stanbkt.models.priors._UnsetType object>, forget_std=<stanbkt.models.priors._UnsetType object>, guess_mu=<stanbkt.models.priors._UnsetType object>, guess_std=<stanbkt.models.priors._UnsetType object>, slip_mu=<stanbkt.models.priors._UnsetType object>, slip_std=<stanbkt.models.priors._UnsetType object>, pi_know_mu=<stanbkt.models.priors._UnsetType object>, pi_know_std=<stanbkt.models.priors._UnsetType object>)#
Bases:
PriorsBaseBayesian priors for joint estimation of initial knowledge and other parameters.
Adds b0 and b1 parameters for modeling the linear relationship between initial knowledge logit and additional data used in the InitKnowledgeStrategy.JOINT estimation strategy.
- Parameters:
- expected_class()#
Return the expected BKT model class type for these priors.
- Return type:
- static get_default_priors(estimation_type, return_none=False, n_groups=0)#
Return default priors dictionary used for MultiBKT parameters.
- Parameters:
estimation_type (
InitKnowledgeStrategy) – The strategy used for estimating initial knowledge, which determines which priors are relevant.return_none (
bool) – If True, return a dict with all keys set to None (improper and non-informative). If False, return a dict with default scalar values.n_groups (
int) – The number of groups used for the learn, forget, guess, and slip parameters.
- Return type:
Union[dict[str,float|None],dict[str,list[float|None]]]
Notes
BKT specific priors are modeled as a Normal distributions with means and standard deviations specified on the logit scale for learn and forget probability parameters. Guess and slip are modeled on the half-logit scale to constrain them to [0, 0.5] on the probability scale.
In cases where estimation_type =
stanbkt.models.model_types.InitKnowledgeStrategy.JOINT, the b0 and b1 parameters are modeled as Normal distributions. Additionally, the regression residuals is modeled as a positive-valued parameter (pi_sigma_lambda) with a Exponential prior.A non-centered parameterization is used:
logit_pi_know ~ pi_b0_know + pi_b1_know * pretest + pi_sigma * logit_pi_know_z
- Where,
pi_b0_know ~ Normal(pi_b0_know_mu, pi_b0_know_std)
pi_b1_know ~ Normal(pi_b1_know_mu, pi_b1_know_std)
pi_sigma ~ Exponential(pi_sigma_lambda)
logit_pi_know_z ~ N(0, 1).
This model is mathematically equivalent to:
logit_pi_know ~ Normal(pi_b0_know + pi_b1_know * pretest, pi_sigma)
but the former (non-centered) parameterization is computationally more efficient and has better convergence properties in Stan.
- to_dict(estimation_type)#
Serialize priors to a dictionary.