DECOMPOSITION
logm
Compute matrix logarithm.
Example of usage
Factorise a labelled industrial sensor calibration matrix and verify reconstruction.
Usage / limitations
+Use when: Recover generators from matrix transitions.
−Limitations: Matrix shape, symmetry, conditioning and numerical precision constrain validity.
Mathematical formula
exp(log(A)) = A (principal log).
Sample dataShow
{
"variable": "measurement_matrix",
"domain": "Industrial sensor calibration",
"feature_names": [
"temperature_c",
"vibration_mm_s"
],
"matrix": [
[
2.0,
0.0
],
[
0.0,
3.0
]
]
}
Code example (Python)
# DataLens.ai sample data — industrial sensor calibration
import numpy as np
A = np.diag([2., 3.])
# DataLens.ai example
# Factorise the named two- or three-sensor calibration matrix.
from scipy.linalg import logm
from scipy.linalg import expm
result = logm(A)
assert np.allclose(expm(result), A)
print("Expected output verified")
# DataLens.ai example
# Factorise the named two- or three-sensor calibration matrix.
from scipy.linalg import logm
from scipy.linalg import expm
result = logm(A)
assert np.allclose(expm(result), A)
print("Expected output verified")