sage.core.math
Filename : math.py Description : Short description of the file
Created on 2026-01-21 07:59:05
__author__ = Narenraju Nagarajan __copyright__ = Copyright 2026, ProjectName __license__ = MIT Licence __version__ = 0.0.1 __maintainer__ = Narenraju Nagarajan __affiliation__ = N/A __email__ = N/A __status__ = [‘inProgress’, ‘Archived’, ‘inUsage’, ‘Debugging’]
GitHub Repository: NULL
Documentation: NULL
Classes
Min-max normalisation to the unit interval |
|
Z-score standardisation to zero mean and unit variance. |
Functions
|
Generate matrices for rotation by some angle around some axis. |
Module Contents
- class Normalise(min_val, max_val)[source]
Min-max normalisation to the unit interval
[0, 1].Maps
vallinearly so thatmin_val→ 0 andmax_val→ 1. Provides a symmetricunnorm()inverse. Used byDistributionSamplerto normalise waveform parameters to a common scale before regression targets are passed to the network.- Parameters:
- class Standardise(mean, std, eps=1e-08)[source]
Z-score standardisation to zero mean and unit variance.
Maps
valso that the distribution has mean 0 and std 1. The smallepsguard prevents division by zero for constant-valued parameters.- Parameters:
- rotation_matrix(angle_in_rad, axis=2)[source]
Generate matrices for rotation by some angle around some axis. This version ONLY supports x,y,z axes; general axis version removed
- Parameters:
angle (angle-like) – The amount of rotation the matrices should represent. Can be an array.
axis (int) – Only x,y,z supported. {x,y,z} -> {0,1,2}
- Returns:
rmat – A unitary rotation matrix.
- Return type:
torch.tensor