vastorbit.machine_learning.memmodel.decomposition.PCA.transform¶
- PCA.transform(X: Annotated[list | ndarray, 'Array Like Structure']) ndarray¶
Transforms and applies the
PCAmodel to the input matrix.- Parameters:
X (ArrayLike) – The data on which to make the transformation.
- Returns:
Transformed values.
- Return type:
numpy.array
Examples
Import the required module.
from vastorbit.machine_learning.memmodel.decomposition import PCA
We will use the following attributes:
principal_components = [ [0.4, 0.5], [0.3, 0.2], ] mean = [0.1, 0.3]
Let’s create a model.
model_pca = PCA(principal_components, mean)
Create a dataset.
data = [[4, 5]]
Transform the data.
model_pca.transform(data)
Note
Refer to
PCAfor more information about the different methods and usages.