From 7243cc3687073e0a98f00d3dd6bc57007bf401ef Mon Sep 17 00:00:00 2001 From: Falak Date: Wed, 17 Apr 2019 16:41:51 +0530 Subject: [PATCH] Fixing parameter description (for assume_centered) (#13456) * Fixing parameter description (for assume_centered) Fixing parameter description (for assume_centered) * Update shrunk_covariance_.py * Update empirical_covariance_.py --- sklearn/covariance/empirical_covariance_.py | 4 ++-- sklearn/covariance/shrunk_covariance_.py | 24 ++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/sklearn/covariance/empirical_covariance_.py b/sklearn/covariance/empirical_covariance_.py index 74365b7d9f468..21d389846f198 100644 --- a/sklearn/covariance/empirical_covariance_.py +++ b/sklearn/covariance/empirical_covariance_.py @@ -56,10 +56,10 @@ def empirical_covariance(X, assume_centered=False): Data from which to compute the covariance estimate assume_centered : boolean - If True, data are not centered before computation. + If True, data will not be centered before computation. Useful when working with data whose mean is almost, but not exactly zero. - If False, data are centered before computation. + If False, data will be centered before computation. Returns ------- diff --git a/sklearn/covariance/shrunk_covariance_.py b/sklearn/covariance/shrunk_covariance_.py index 1dbe057441375..e18d052b33990 100644 --- a/sklearn/covariance/shrunk_covariance_.py +++ b/sklearn/covariance/shrunk_covariance_.py @@ -71,10 +71,10 @@ class ShrunkCovariance(EmpiricalCovariance): Specify if the estimated precision is stored assume_centered : boolean, default False - If True, data are not centered before computation. + If True, data will not be centered before computation. Useful when working with data whose mean is almost, but not exactly zero. - If False, data are centered before computation. + If False, data will be centered before computation. shrinkage : float, 0 <= shrinkage <= 1, default 0.1 Coefficient in the convex combination used for the computation @@ -175,10 +175,10 @@ def ledoit_wolf_shrinkage(X, assume_centered=False, block_size=1000): Data from which to compute the Ledoit-Wolf shrunk covariance shrinkage. assume_centered : bool - If True, data are not centered before computation. + If True, data will not be centered before computation. Useful to work with data whose mean is significantly equal to zero but is not exactly zero. - If False, data are centered before computation. + If False, data will be centered before computation. block_size : int Size of the blocks into which the covariance matrix will be split. @@ -270,10 +270,10 @@ def ledoit_wolf(X, assume_centered=False, block_size=1000): Data from which to compute the covariance estimate assume_centered : boolean, default=False - If True, data are not centered before computation. + If True, data will not be centered before computation. Useful to work with data whose mean is significantly equal to zero but is not exactly zero. - If False, data are centered before computation. + If False, data will be centered before computation. block_size : int, default=1000 Size of the blocks into which the covariance matrix will be split. @@ -339,10 +339,10 @@ class LedoitWolf(EmpiricalCovariance): Specify if the estimated precision is stored. assume_centered : bool, default=False - If True, data are not centered before computation. + If True, data will not be centered before computation. Useful when working with data whose mean is almost, but not exactly zero. - If False (default), data are centered before computation. + If False (default), data will be centered before computation. block_size : int, default=1000 Size of the blocks into which the covariance matrix will be split @@ -448,10 +448,10 @@ def oas(X, assume_centered=False): Data from which to compute the covariance estimate. assume_centered : boolean - If True, data are not centered before computation. + If True, data will not be centered before computation. Useful to work with data whose mean is significantly equal to zero but is not exactly zero. - If False, data are centered before computation. + If False, data will be centered before computation. Returns ------- @@ -525,10 +525,10 @@ class OAS(EmpiricalCovariance): Specify if the estimated precision is stored. assume_centered : bool, default=False - If True, data are not centered before computation. + If True, data will not be centered before computation. Useful when working with data whose mean is almost, but not exactly zero. - If False (default), data are centered before computation. + If False (default), data will be centered before computation. Attributes ----------