A simple python class to handle the uncontrolled manifold (UCM) analysis.
In the literature, the uses of the UCM analysis are myriad and the descriptions all fairly opaque. In general, the UCM analysis proceeds through the selection of i.) elemental variables, and ii.) performance variables. In principle, elemental variables are body-level variables whereas the performance variable is framed as a function of elemental variables.
In short, the UCM analyzes the composition of elemental variance aligned with the null space of the gradient between elemental and performance variables. To be more precise, define the following as
Using this package, the entire UCM analysis can be completed by entering the jacobian matrix UCM()
object,
import numpy as np
from ucm import UCM
# simulating elements and jacobian matrix
X = np.random.rand(30,3)
J = np.random.rand(2,3)
# using simulated data to perform the UCM analysis
ucm = UCM(jacobian=J,elements=X)
Once observed, the elemental variables are projected onto an orthonormal basis
where
The UCM represents the space where changes in elemental variables result in no change in performance, whereas the ORT space represents the space where changes in elemental variables result in maximal change in performance. (In another language, gradient descent algorithms use movement along the negative ORT direction to minimize some function represented by the gradient.)
Once the orthonormal basis
where
The corresponding elements along the diagonal of
All of the above is completed in the single call to UCM()
.
# The orthonormal basis S
print(ucm.onb_)
# Variances along the UCM and ORT subspaces
print(ucm.vucm_)
print(ucm.vort_)
# The synergy index
print(ucm.synergy_index_)