Learn R Programming

ML2Pvae (version 1.0.0.1)

get_item_parameter_estimates: Get trainable variables from the decoder, which serve as item parameter estimates.

Description

Get trainable variables from the decoder, which serve as item parameter estimates.

Usage

get_item_parameter_estimates(decoder, model_type = 2)

Arguments

decoder

a trained keras model; can either be the decoder or vae returned from build_vae_independent() or build_vae_correlated

model_type

either 1 or 2, specifying a 1 parameter (1PL) or 2 parameter (2PL) model; if 1PL, then only the difficulty parameter estimates (output layer bias) will be returned; if 2PL, then the discrimination parameter estimates (output layer weights) will also be returned

Value

a list which contains item parameter estimates; the length of this list is equal to model_type - the first entry in the list holds the difficulty parameter estimates, and the second entry (if 2PL) contains discrimination parameter estimates

Examples

Run this code
# NOT RUN {
Q <- matrix(c(1,0,1,1,0,1,1,0), nrow = 2, ncol = 4)
models <- build_vae_independent(4, 2, Q, model_type = 2)
decoder <- models[[2]]
item_parameter_estimates <- get_item_parameter_estimates(decoder, model_type = 2)
difficulty_est <- item_parameter_estimates[[1]]
discrimination_est <- item_parameter_estimates[[2]]
# }

Run the code above in your browser using DataLab