prfmodel.utils

Utility functions.

Exceptions

UndefinedResponseWarning

Warning for when a response is undefined and contains NaNs.

Classes

ModelProtocol

Protocol for model classes.

ParamsDict

A dictionary-like object that supports dataframe-style column selection but returns Keras tensors.

Functions

batched(→ collections.abc.Callable)

Decorate a model prediction function to make batched predictions.

convert_parameters_to_tensor(→ prfmodel.typing.Tensor)

Convert model parameters in a dataframe into a tensor.

get_dtype(→ str)

Get the (default) dtype.

normalize_response(→ prfmodel.typing.Tensor)

Normalize a response.

Module Contents

prfmodel.utils.DTYPES

Accepted dtypes for prfmodel.typing.Tensor objects.

Accepted dtypes are: “bfloat16”, “float16”, “float32”, and “float64”.