Skip to content
Browse files

DOC fix cross-decomposition docstrings

  • Loading branch information...
1 parent abe3d05 commit 2f998cae7e9cf8cedabe16217f1677d46f201f45 @larsmans larsmans committed Oct 30, 2013
Showing with 13 additions and 18 deletions.
  1. +0 −8 sklearn/cross_decomposition/cca_.py
  2. +13 −10 sklearn/cross_decomposition/pls_.py
View
8 sklearn/cross_decomposition/cca_.py
@@ -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.
View
23 sklearn/cross_decomposition/pls_.py
@@ -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)
@@ -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')

0 comments on commit 2f998ca

Please sign in to comment.
Something went wrong with that request. Please try again.