UtilsΒΆ

torch_openreml.utils.get_device(*args)

Validate and return the shared device of a collection of tensors.

torch_openreml.utils.get_dtype(*args)

Validate and return the shared dtype of a collection of tensors.

torch_openreml.utils.numeric_to_design_matrix(*args)

Construct a design matrix from one or more numeric vectors or tensors.

torch_openreml.utils.categorical_to_design_matrix(x)

Construct a one-hot encoded design matrix from a categorical vector.

torch_openreml.utils.augment(*args)

Horizontally concatenate two or more design matrices.

torch_openreml.utils.interaction(*args[, sep])

Construct an interaction term from two or more categorical vectors.