@@ -240,17 +240,15 @@ def ledoit_wolf(X, assume_centered=False, block_size=1000):
240240 X : array-like, shape (n_samples, n_features)
241241 Data from which to compute the covariance estimate
242242
243- assume_centered : Boolean
243+ assume_centered : boolean, default=False
244244 If True, data are not centered before computation.
245245 Useful to work with data whose mean is significantly equal to
246246 zero but is not exactly zero.
247247 If False, data are centered before computation.
248248
249- block_size : int,
249+ block_size : int, default=1000
250250 Size of the blocks into which the covariance matrix will be split.
251- If n_features > `block_size`, an error will be raised since the
252- shrunk covariance matrix will be considered as too large regarding
253- the available memory.
251+ This is purely a memory optimization and does not affect results.
254252
255253 Returns
256254 -------
@@ -286,10 +284,6 @@ def ledoit_wolf(X, assume_centered=False, block_size=1000):
286284 else :
287285 n_samples , n_features = X .shape
288286
289- if n_features > block_size :
290- raise MemoryError ("LW: n_features is too large, " +
291- "try increasing block_size" )
292-
293287 # get Ledoit-Wolf shrinkage
294288 shrinkage = ledoit_wolf_shrinkage (
295289 X , assume_centered = assume_centered , block_size = block_size )
@@ -312,21 +306,19 @@ class LedoitWolf(EmpiricalCovariance):
312306
313307 Parameters
314308 ----------
315- store_precision : bool
309+ store_precision : bool, default=True
316310 Specify if the estimated precision is stored.
317311
318- assume_centered : bool
312+ assume_centered : bool, default=False
319313 If True, data are not centered before computation.
320314 Useful when working with data whose mean is almost, but not exactly
321315 zero.
322316 If False (default), data are centered before computation.
323317
324- block_size : int,
318+ block_size : int, default=1000
325319 Size of the blocks into which the covariance matrix will be split
326- during its Ledoit-Wolf estimation.
327- If n_features > `block_size`, an error will be raised since the
328- shrunk covariance matrix will be considered as too large regarding
329- the available memory.
320+ during its Ledoit-Wolf estimation. This is purely a memory
321+ optimization and does not affect results.
330322
331323 Attributes
332324 ----------
@@ -480,10 +472,10 @@ class OAS(EmpiricalCovariance):
480472
481473 Parameters
482474 ----------
483- store_precision : bool
475+ store_precision : bool, default=True
484476 Specify if the estimated precision is stored.
485477
486- assume_centered: bool
478+ assume_centered: bool, default=False
487479 If True, data are not centered before computation.
488480 Useful when working with data whose mean is almost, but not exactly
489481 zero.
0 commit comments