tfp.experimental.inference_gym.targets.ItemResponseTheory

One-parameter logistic item-response theory (IRT) model.

Inherits From: BayesianModel

train_student_ids Integer Tensor with shape [num_train_points]. training student ids, ranging from 0 to num_students.
train_question_ids Integer Tensor with shape [num_train_points]. training question ids, ranging from 0 to num_questions.
train_correct Integer Tensor with shape [num_train_points]. Whether the student in the training set answered the question correctly, either 0 or 1.
test_student_ids Integer Tensor with shape [num_test_points]. Testing student ids, ranging from 0 to num_students. Can be None, in which case test-related sample transformations are not computed.
test_question_ids Integer Tensor with shape [num_test_points]. Testing question ids, ranging from 0 to num_questions. Can be None, in which case test-related sample transformations are not computed.
test_correct Integer Tensor with shape [num_test_points]. Whether the student in the testing set answered the question correctly, either 0 or

  1. Can be None, in which case test-related sample transformations are not computed.
name Python str name prefixed to Ops created by this class.
pretty_name A Python str. The pretty name of this model.

ValueError If test_student_ids, test_question_ids or test_correct are not either all None or are all specified.
ValueError If the parallel arrays are not all of the same size.

default_event_space_bijector Bijector mapping the reals (R**n) to the event space of this model.
dtype The DType of Tensors handled by this model.
event_shape Shape of a single sample from as a TensorShape.

May be partially defined or unknown.

name Python str name prefixed to Ops created by this class.
sample_transformations A dictionary of names to SampleTransformations.

Child Classes

class SampleTransformation

Methods

log_likelihood

View source

Evaluates the log_likelihood at value.

prior_distribution

View source

The prior distribution over the model parameters.

unnormalized_log_prob

View source

The un-normalized log density of evaluated at a point.

This corresponds to the target distribution associated with the model, often its posterior.

Args
value A (nest of) Tensor to evaluate the log density at.
name Python str name prefixed to Ops created by this method.

Returns
unnormalized_log_prob A floating point Tensor.