Skip to main content

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 package can be installed via pip:

pip install --user sklearn-sfa

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.

Files for sklearn-sfa, version 0.1.4
Filename, size File type Python version Upload date Hashes
Filename, size sklearn_sfa-0.1.4-py3-none-any.whl (18.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size sklearn-sfa-0.1.4.tar.gz (16.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page