utils

utils#

utility functions used within various components of initialization, inference, and interpretation.

Functions

drop_keys_with_substring(dct, drop_s)

Drop keys from a dictionary if they contain a specified substring.

flatten_list_parameters(samples)

Flatten plated parameters into separate keys in the samples dictionary.

identify_distribution_indexes(parameters)

Identify the locations and site names of numpyro samples.

vectorize_objects(objs, target[, filter])

Given a list of objects, return a list of the target attribute for each object, optionally applying a filter.