Skip to content

Commit

Permalink
DOC fix cross-decomposition docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
larsmans committed Oct 30, 2013
1 parent abe3d05 commit 2f998ca
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 deletions.
8 changes: 0 additions & 8 deletions sklearn/cross_decomposition/cca_.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,6 @@ class CCA(_PLS):
Parameters
----------
X : array-like of predictors, shape = [n_samples, p]
Training vectors, where n_samples is the number of samples and
p is the number of predictors.
Y : array-like of response, shape = [n_samples, q]
Training vectors, where n_samples is the number of samples and
q is the number of response variables.
n_components : int, (default 2).
number of components to keep.
Expand Down
23 changes: 13 additions & 10 deletions sklearn/cross_decomposition/pls_.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,6 @@ class _PLS(six.with_metaclass(ABCMeta), BaseEstimator, TransformerMixin,
with two algo. (a) the inner loop of the original NIPALS algo. or (b) a
SVD on residuals cross-covariance matrices.
Parameters
----------
X : array-like of predictors, shape = [n_samples, p]
Training vectors, where n_samples in the number of samples and
p is the number of predictors.
Y : array-like of response, shape = [n_samples, q]
Training vectors, where n_samples in the number of samples and
q is the number of response variables.
n_components : int, number of components to keep. (default 2).
scale : boolean, scale data? (default True)
Expand Down Expand Up @@ -225,6 +215,19 @@ def __init__(self, n_components=2, scale=True, deflation_mode="regression",
self.copy = copy

def fit(self, X, Y):
"""Fit model to data.
Parameters
----------
X : array-like, shape = [n_samples, n_features]
Training vectors, where n_samples in the number of samples and
n_features is the number of predictors.
Y : array-like of response, shape = [n_samples, n_targets]
Target vectors, where n_samples in the number of samples and
n_targets is the number of response variables.
"""

# copy since this will contains the residuals (deflated) matrices
X, Y = check_arrays(X, Y, dtype=np.float, copy=self.copy,
sparse_format='dense')
Expand Down

0 comments on commit 2f998ca

Please sign in to comment.