prfmodel.utils

Utility functions.

Classes

TensorFrame

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

Functions

as_tensor_frame(→ TensorFrame)

Convert user-supplied parameters into the tensor-holding representation.

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: “float16”, “float32”, and “float64”.