validate_inputs {ML2Pvae}R Documentation

Give error messages for invalid inputs in exported functions.

Description

Give error messages for invalid inputs in exported functions.

Usage

validate_inputs(
  num_items,
  num_skills,
  Q_matrix,
  model_type = 2,
  mean_vector = rep(0, num_skills),
  covariance_matrix = diag(num_skills),
  enc_hid_arch = c(ceiling((num_items + num_skills)/2)),
  hid_enc_activations = rep("sigmoid", length(enc_hid_arch)),
  output_activation = "sigmoid",
  kl_weight = 1,
  learning_rate = 0.001
)

Arguments

num_items

the number of items on the assessment; also the number of nodes in the input/output layers of the VAE

num_skills

the number of skills being evaluated; also the size of the distribution learned by the VAE

Q_matrix

a binary, num_skills by num_items matrix relating the assessment items with skills

model_type

either 1 or 2, specifying a 1 parameter (1PL) or 2 parameter (2PL) model

mean_vector

a vector of length num_skills specifying the mean of each latent trait

covariance_matrix

a symmetric, positive definite, num_skills by num_skills, matrix giving the covariance of the latent traits

enc_hid_arch

a vector detailing the number an size of hidden layers in the encoder

hid_enc_activations

a vector specifying the activation function in each hidden layer in the encoder; must be the same length as enc_hid_arch

output_activation

a string specifying the activation function in the output of the decoder; the ML2P model alsways used 'sigmoid'

kl_weight

an optional weight for the KL divergence term in the loss function

learning_rate

an optional parameter for the adam optimizer


[Package ML2Pvae version 1.0.0.1 Index]