gemmr.estimators.NIPALSCCA¶
-
class
gemmr.estimators.NIPALSCCA(n_components=2, *, scale=True, max_iter=500, tol=1e-06, copy=True)¶ Identical to sklearn.cross_decomposition.CCA, except that fit creates additional attributes for compatibility with SVDPLS and SVDCCA:
-
corrs_¶ contains the canonical correlations. This is the quantity that’s maximized by CCA
Type: np.ndarray (n_components,)
-
assocs_¶ Identical to corrs_. assocs_` is the common identifier used in in
SVDPLS,SVDCCA,NIPALSPLSandNIPALSCCAfor the association strength that is optimized by each particular methodType: np.ndarray (n_components,)
-
__init__(n_components=2, *, scale=True, max_iter=500, tol=1e-06, copy=True)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__([n_components, scale, max_iter, …])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.
-