py_irt.models package¶
Submodules¶
py_irt.models.one_param_logistic module¶
- class py_irt.models.one_param_logistic.OneParamLog(*, priors: str, num_items: int, num_subjects: int, verbose: bool = False, device: str = 'cpu', vocab_size: Optional[int] = None, dropout: Optional[float] = None, hidden: Optional[int] = None, **kwargs)¶
Bases:
IrtModel1PL IRT model
- export()¶
- fit(models, items, responses, num_epochs)¶
Fit the IRT model with variational inference
- fit_MCMC(models, items, responses, num_epochs)¶
Fit the IRT model with MCMC
- get_guide()¶
- get_model()¶
- guide_hierarchical(models, items, obs)¶
Initialize a 1PL guide with hierarchical priors
- guide_vague(models, items, obs)¶
Initialize a 1PL guide with vague priors
- model_hierarchical(models, items, obs)¶
Initialize a 1PL model with hierarchical priors
- model_vague(models, items, obs)¶
Initialize a 1PL model with vague priors
- predict(subjects, items, params_from_file=None)¶
predict p(correct | params) for a specified list of model, item pairs
- summary(traces, sites)¶
Aggregate marginals for MCM
py_irt.models.two_param_logistic module¶
- class py_irt.models.two_param_logistic.TwoParamLog(*, priors: str, num_items: int, num_subjects: int, verbose=False, device: str = 'cpu', **kwargs)¶
Bases:
IrtModel2PL IRT model
- export()¶
- fit_MCMC(models, items, responses, num_epochs)¶
Fit the IRT model with MCMC
- get_guide()¶
- get_model()¶
- guide_hierarchical(subjects, items, obs)¶
Initialize a 2PL guide with hierarchical priors
- guide_vague(subjects, items, obs)¶
Initialize a 2PL guide with vague priors
- model_hierarchical(subjects, items, obs)¶
Initialize a 2PL model with hierarchical priors
- model_vague(subjects, items, obs)¶
Initialize a 2PL model with vague priors
- predict(subjects, items, params_from_file=None)¶
predict p(correct | params) for a specified list of model, item pairs
- summary(traces, sites)¶
Aggregate marginals for MCM