MCPcopy Create free account
hub / github.com/abess-team/abess / transform

Method transform

python/abess/decomposition.py:148–161  ·  view source on GitHub ↗

r""" For PCA model, apply dimensionality reduction to given data. Parameters ---------- X : array-like, shape (n_samples, p_features) Sample matrix to be transformed.

(self, X)

Source from the content-addressed store, hash-verified

146 return tags
147
148 def transform(self, X):
149 r"""
150 For PCA model, apply dimensionality reduction
151 to given data.
152
153 Parameters
154 ----------
155 X : array-like, shape (n_samples, p_features)
156 Sample matrix to be transformed.
157
158 """
159 X = new_data_check(self, X)
160
161 return X.dot(self.coef_)
162
163 def ratio(self, X):
164 r"""

Callers 3

test_PCAMethod · 0.95
superconduct.pyFile · 0.80

Calls 2

new_data_checkFunction · 0.85
dotMethod · 0.45

Tested by 1

test_PCAMethod · 0.76