MCPcopy Create free account
hub / github.com/AssemblyAI-Community/Machine-Learning-From-Scratch / transform

Method transform

07 PCA/pca.py:32–35  ·  view source on GitHub ↗
(self, X)

Source from the content-addressed store, hash-verified

30 self.components = eigenvectors[:self.n_components]
31
32 def transform(self, X):
33 # projects data
34 X = X - self.mean
35 return np.dot(X, self.components.T)
36
37
38# Testing

Callers 1

pca.pyFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected