gemmr.estimators.NIPALSPLS¶
-
class
gemmr.estimators.
NIPALSPLS
(n_components=2, *, scale=True, algorithm='nipals', max_iter=500, tol=1e-06, copy=True)¶ Identical to sklearn.cross_decomposition.PLSCanonical, except that fit creates additional attributes for compatibility with SVDPLS and SVDCCA:
-
corrs_
¶ contains the canonical correlations
Type: np.ndarray (n_components,)
-
covs_
¶ - contains the covariances between scores. This is the quantity that is
- maximized by PLS
Type: np.ndarray (n_components,)
-
assocs_
¶ Identical to corrs_. assocs_` is the common identifier used in in
SVDPLS
,SVDCCA
,NIPALSPLS
andNIPALSCCA
for the association strength that is optimized by each particular methodType: np.ndarray (n_components,)
-
__init__
(n_components=2, *, scale=True, algorithm='nipals', max_iter=500, tol=1e-06, copy=True)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
([n_components, scale, algorithm, …])Initialize self. fit
(X, Y)Fit model to data. fit_transform
(X[, y])Learn and apply the dimension reduction on the train data. get_params
([deep])Get parameters for this estimator. inverse_transform
(X)Transform data back to its original space. predict
(X[, copy])Apply the dimension reduction learned on the train data. score
(X, y[, sample_weight])Return the coefficient of determination R^2 of the prediction. set_params
(**params)Set the parameters of this estimator. transform
(X[, Y, copy])Apply the dimension reduction learned on the train data. -
fit
(X, Y)¶ Fit model to data.
Parameters: - X (array-like of shape (n_samples, n_features)) – Training vectors, where n_samples is the number of samples and n_features is the number of predictors.
- Y (array-like of shape (n_samples, n_targets)) – Target vectors, where n_samples is the number of samples and n_targets is the number of response variables.
-