-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[add:lib] Add standardization preprocessing method (#63)
* Finish tests for standardization * Add documentation for standardize * Add standardize to notebooks
- Loading branch information
Showing
12 changed files
with
327 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import numpy as np | ||
from sequentia.preprocessing import standardize | ||
|
||
# Create some sample data | ||
X = [np.random.random((10 * i, 3)) for i in range(1, 4)] | ||
|
||
# Standardize the data | ||
X = standardize(X) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.. _standardize: | ||
|
||
Standardizing (``standardize``) | ||
=============================== | ||
|
||
Standardizes an observation sequence by transforming observations | ||
so that they have zero mean and unit variance. | ||
|
||
For further information, please see the `preprocessing tutorial notebook <https://nbviewer.jupyter.org/github/eonu/sequentia/blob/master/notebooks/2%20-%20Preprocessing%20%28Tutorial%29.ipynb#Standardizing-(standardize)>`_. | ||
|
||
Example | ||
------- | ||
|
||
.. literalinclude:: ../../_includes/examples/preprocessing/standardize.py | ||
:language: python | ||
:linenos: | ||
|
||
API reference | ||
------------- | ||
|
||
.. automodule:: sequentia.preprocessing | ||
:noindex: | ||
.. autofunction:: standardize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
from .methods import ( | ||
downsample, center, fft, filtrate, | ||
_downsample, _center, _fft, _filtrate | ||
downsample, center, standardize, fft, filtrate, | ||
_downsample, _center, _standardize, _fft, _filtrate | ||
) | ||
from .preprocess import Preprocess |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.