/usr/share/pyshared/mdp/helper_funcs.py is in python-mdp 3.3-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | import mdp
def pca(x, **kwargs):
"""Filters multidimensioanl input data through its principal components.
Observations of the same variable are stored on rows, different variables
are stored on columns.
This is a shortcut function for the corresponding node `nodes.PCANode`. If any
keyword arguments are specified, they are passed to its constructor.
This is equivalent to ``mdp.nodes.PCANode(**kwargs)(x)``
"""
return mdp.nodes.PCANode(**kwargs)(x)
def fastica(x, **kwargs):
"""Perform Independent Component Analysis on input data using the FastICA
algorithm by Aapo Hyvarinen.
Observations of the same variable are stored on rows, different variables
are stored on columns.
This is a shortcut function for the corresponding node `nodes.FastICANode`.
If any keyword arguments are specified, they are passed to its constructor.
This is equivalent to ``mdp.nodes.FastICANode(**kwargs)(x)``
"""
return mdp.nodes.FastICANode(**kwargs)(x)
|