@@ -232,10 +232,12 @@ def apply_window(x, window, axis=0, return_window=None):
232
232
'''
233
233
Apply the given window to the given 1D or 2D array along the given axis.
234
234
235
+ Parameters
236
+ ----------
235
237
*x*: 1D or 2D array or sequence
236
238
Array or sequence containing the data.
237
239
238
- *winodw *: function or array.
240
+ *window *: function or array.
239
241
Either a function to generate a window or an array with length
240
242
*x*.shape[*axis*]
241
243
@@ -286,6 +288,8 @@ def detrend(x, key=None, axis=None):
286
288
'''
287
289
Return x with its trend removed.
288
290
291
+ Parameters
292
+ ----------
289
293
*x*: array or sequence
290
294
Array or sequence containing the data.
291
295
@@ -347,6 +351,8 @@ def demean(x, axis=0):
347
351
'''
348
352
Return x minus its mean along the specified axis.
349
353
354
+ Parameters
355
+ ----------
350
356
*x*: array or sequence
351
357
Array or sequence containing the data
352
358
Can have any dimensionality
@@ -373,6 +379,8 @@ def detrend_mean(x, axis=None):
373
379
'''
374
380
Return x minus the mean(x).
375
381
382
+ Parameters
383
+ ----------
376
384
*x*: array or sequence
377
385
Array or sequence containing the data
378
386
Can have any dimensionality
@@ -418,6 +426,8 @@ def detrend_none(x, axis=None):
418
426
'''
419
427
Return x: no detrending.
420
428
429
+ Parameters
430
+ ----------
421
431
*x*: any object
422
432
An object containing the data
423
433
@@ -447,6 +457,8 @@ def detrend_linear(y):
447
457
'''
448
458
Return x minus best fit line; 'linear' detrending.
449
459
460
+ Parameters
461
+ ----------
450
462
*y*: 0-D or 1-D array or sequence
451
463
Array or sequence containing the data
452
464
@@ -499,6 +511,8 @@ def stride_windows(x, n, noverlap=None, axis=0):
499
511
elements may point to the same piece of memory,
500
512
so modifying one value may change others.
501
513
514
+ Parameters
515
+ ----------
502
516
*x*: 1D array or sequence
503
517
Array or sequence containing the data.
504
518
@@ -564,6 +578,8 @@ def stride_repeat(x, n, axis=0):
564
578
elements may point to the same piece of memory, so
565
579
modifying one value may change others.
566
580
581
+ Parameters
582
+ ----------
567
583
*x*: 1D array or sequence
568
584
Array or sequence containing the data.
569
585
@@ -1581,37 +1597,47 @@ def __init__(self, a, standardize=True):
1581
1597
compute the SVD of a and store data for PCA. Use project to
1582
1598
project the data onto a reduced set of dimensions
1583
1599
1584
- Inputs:
1585
-
1586
- *a*: a numobservations x numdims array
1587
- *standardize*: True if input data are to be standardized. If False,
1588
- only centering will be carried out.
1589
-
1590
- Attrs:
1591
-
1592
- *a* a centered unit sigma version of input a
1600
+ Parameters
1601
+ ----------
1602
+ a: np.ndarray
1603
+ A numobservations x numdims array
1604
+ standardize: bool
1605
+ True if input data are to be standardized. If False, only centering
1606
+ will be carried out.
1593
1607
1594
- *numrows*, *numcols*: the dimensions of a
1608
+ Attributes
1609
+ ----------
1610
+ a
1611
+ A centered unit sigma version of input ``a``.
1595
1612
1596
- *mu*: a numdims array of means of a. This is the vector that points
1597
- to the origin of PCA space .
1613
+ numrows, numcols
1614
+ The dimensions of ``a`` .
1598
1615
1599
- *sigma*: a numdims array of standard deviation of a
1616
+ mu
1617
+ A numdims array of means of ``a``. This is the vector that points
1618
+ to the origin of PCA space.
1600
1619
1601
- *fracs*: the proportion of variance of each of the principal
1602
- components
1620
+ sigma
1621
+ A numdims array of standard deviation of ``a``.
1603
1622
1604
- *s*: the actual eigenvalues of the decomposition
1623
+ fracs
1624
+ The proportion of variance of each of the principal components.
1605
1625
1606
- *Wt*: the weight vector for projecting a numdims point or array into
1607
- PCA space
1626
+ s
1627
+ The actual eigenvalues of the decomposition.
1608
1628
1609
- *Y*: a projected into PCA space
1629
+ Wt
1630
+ The weight vector for projecting a numdims point or array into
1631
+ PCA space.
1610
1632
1633
+ Y
1634
+ A projected into PCA space.
1611
1635
1612
- The factor loadings are in the Wt factor, i.e., the factor
1613
- loadings for the 1st principal component are given by Wt[0].
1614
- This row is also the 1st eigenvector.
1636
+ Note
1637
+ ----
1638
+ The factor loadings are in the ``Wt`` factor, i.e., the factor loadings
1639
+ for the first principal component are given by ``Wt[0]``. This row is
1640
+ also the first eigenvector.
1615
1641
1616
1642
"""
1617
1643
n , m = a .shape
0 commit comments