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.
Metadata
Release files for sklearn-sfa 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sklearn-sfa-0.1.6.tar.gz | 17.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sklearn_sfa-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.0 kB
Release files / sklearn-sfa-0.1.6.tar.gz
| Download URL | sklearn-sfa-0.1.6.tar.gz |
|---|---|
| Size | 17.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2029ad5b63ac4fba7f481504557d5f99bc9dffdfe611a86028885fd9b2055c06
|
|
BLAKE2b-256 checksum How to use checksums |
54bb7ddfc7877d05c668ed371ed554f2f731637c8bf1916c5537492c9f0abb3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|
Release files / sklearn_sfa-0.1.6-py3-none-any.whl
| Download URL | sklearn_sfa-0.1.6-py3-none-any.whl |
|---|---|
| Size | 19.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f0f46f67f4634f6c97728d628128eca961de926283d31601e3185214e59a2419
|
|
BLAKE2b-256 checksum How to use checksums |
50b37388dd53300ea82f0ca4afdbf884789df288433b8bd5ea66a1888251c9c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|