memModel.rotate¶
In [ ]:
memModel.rotate(gamma: float = 1.0,
q: int = 20,
tol: float = 1e-6)
Performs a Oblimin (Varimax, Quartimax) rotation on the model's PCA matrix.
Parameters¶
| Name | Type | Optional | Description |
|---|---|---|---|
gamma | float | ✓ | Oblimin rotation factor, determines the type of rotation. It must be between 0.0 and 1.0. gamma = 0.0 results in a Quartimax rotation. gamma = 1.0 results in a Varimax rotation. |
q | int | ✓ | Maximum number of iterations. |
tol | float | ✓ | The algorithm stops when the Frobenius norm of gradient is less than tol. |
Returns¶
self : memModel.
Example¶
In [22]:
from verticapy.learn.memmodel import memModel
model = memModel("PCA", {"principal_components": [[0.4, 0.5], [0.3, 0.2],],
"mean": [0.1, 0.3]})
model.get_attributes()["principal_components"]
Out[22]:
In [23]:
model.rotate()
model.get_attributes()["principal_components"]
Out[23]:
