A scikit-learn compatible implementation of Slow Feature Analysis
Project description
sklearn-sfa or sksfa is an implementation of Slow Feature Analysis for scikit-learn.
It is meant as a standalone transformer for dimensionality reduction or as a building block for more complex representation learning pipelines utilizing scikit-learn’s extensive collection of machine learning methods.
The package contains a solver for linear SFA and some auxiliary functions. The documentation provides an explanation of the algorithm, different use-cases, as well as pointers how to fully utilize SFA’s potential, e.g., by employing non-linear basis functions or more sophisticated architectures.
For use with high-dimensional image data, sklearn-sfa now also includes an experimental implementation of Hierarchical SFA networks (HSFA) - please consult the introductory examples in the documentation.
Since sklearn-sfa is in its early stages, we also recommend taking a look at the Modular Toolkit for Data Processing MDP which provides stable SFA implementations that have stood the test of time.
Installation
The latest official version of the package can be installed from PyPi via pip:
pip install --user sklearn-sfa
To use the latest code, the package can also be cloned directly from GitHub and then be installed via:
cd sklearn-sfa
pip install -e .
Basic usage
In Python 3.6+, the package can then be imported as
import sksfa
The package comes with an SFA transformer. Below you see an example of initializing a transformer that extracts 2-dimensional features:
sfa_transformer = sksfa.SFA(n_components=2)
The transformer implements sklearn’s typical interface by providing fit, fit_transform, and transform methods.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sklearn-sfa-0.1.6.tar.gz
.
File metadata
- Download URL: sklearn-sfa-0.1.6.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2029ad5b63ac4fba7f481504557d5f99bc9dffdfe611a86028885fd9b2055c06 |
|
MD5 | 0e0ba992537bbe6d5ef019314c73100a |
|
BLAKE2b-256 | 54bb7ddfc7877d05c668ed371ed554f2f731637c8bf1916c5537492c9f0abb3f |
File details
Details for the file sklearn_sfa-0.1.6-py3-none-any.whl
.
File metadata
- Download URL: sklearn_sfa-0.1.6-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0f46f67f4634f6c97728d628128eca961de926283d31601e3185214e59a2419 |
|
MD5 | 681d7dad4886901dff97d6e3b188727f |
|
BLAKE2b-256 | 50b37388dd53300ea82f0ca4afdbf884789df288433b8bd5ea66a1888251c9c7 |