cascade.utils

Miscellaneous utilities

Functions

autodevice

Get torch computation device automatically based on GPU availability and memory usage

check_affinity_inheritance

Check whether affinity inheritance is broken

count_occurrence

Count occurrence number of list elements

covariance

Compute covariance matrix where each column of the input matrix is treated as a variable

densify

Convert a matrix to dense format

get_random_state

Get a random state object

gp_regression_with_ci

Gaussian process regression with confidence interval

hclust

Hierarchical clustering followed by optional tree cutting

internal

Decorator to mark a function or class as internal and exclude it from autosummary.

is_notebook

Check if the code is running in a Jupyter notebook

partial_correlation

Compute partial correlation matrix

pearson_correlation

Compute Pearson correlation matrix

spearman_correlation

Compute Spearman correlation matrix

str_to_bool

Interpret string as bool

variance

Compute variance vector where each column of the input matrix is treated as a variable

Classes

Config

Global configurations

Exceptions

MissingDependencyError(name)