Metadata-Version: 2.4
Name: gseqnmf
Version: 0.0.2
Summary: DESCRIPTION
Author: Darik A. O'Neil
Maintainer: Darik A. O'Neil
License: MIT License
        
        Copyright (c) 2024 Darik A O’Neil
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: documentation, https://github.com/darikoneil/gseqNMF
Project-URL: repository, https://github.com/darikoneil/gseqNMF
Keywords: KEYWORD
Classifier: Programming Language :: Python
Requires-Python: <=4.0,>=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numba>=0.62.1
Requires-Dist: numpy>=2.3.3
Requires-Dist: scikit-learn>=1.7.2
Requires-Dist: setuptools>=80.9.0
Requires-Dist: tqdm>=4.67.1
Provides-Extra: cuda12
Requires-Dist: cupy-cuda12x; extra == "cuda12"
Provides-Extra: test
Requires-Dist: importlib-metadata; extra == "test"
Requires-Dist: polars[numpy,pyarrow]; extra == "test"
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-sugar; extra == "test"
Requires-Dist: pytest-clarity; extra == "test"
Requires-Dist: pytest-mock; extra == "test"
Requires-Dist: toml; extra == "test"
Requires-Dist: tomli-w; extra == "test"
Provides-Extra: lint
Requires-Dist: flake8; extra == "lint"
Requires-Dist: flake8-annotations-complexity; extra == "lint"
Requires-Dist: flake8-class-attributes-order; extra == "lint"
Requires-Dist: flake8-dunder-all; extra == "lint"
Requires-Dist: flake8-html; extra == "lint"
Requires-Dist: ruff; extra == "lint"
Provides-Extra: cov
Requires-Dist: coverage[toml]; extra == "cov"
Requires-Dist: coveralls; extra == "cov"
Requires-Dist: toml; extra == "cov"
Requires-Dist: tomli-w; extra == "cov"
Provides-Extra: docs
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
Requires-Dist: autodoc_pydantic; extra == "docs"
Requires-Dist: sphinx-rtd-theme; extra == "docs"
Requires-Dist: jinja2; extra == "docs"
Provides-Extra: vis
Requires-Dist: cmocean; extra == "vis"
Requires-Dist: matplotlib; extra == "vis"
Requires-Dist: PyQt6; extra == "vis"
Provides-Extra: dev
Requires-Dist: gseqNMF[test]; extra == "dev"
Requires-Dist: gseqNMF[lint]; extra == "dev"
Requires-Dist: gseqNMF[cov]; extra == "dev"
Requires-Dist: gseqNMF[docs]; extra == "dev"
Requires-Dist: gseqNMF[prod]; extra == "dev"
Requires-Dist: gseqNMF[vis]; extra == "dev"
Dynamic: license-file

# gseqNMF

This package is a re-implementation of the seqNMF algorithm 
described in [Mackevicius et al., 2019](https://elifesciences.org/articles/38471), 
and provided as a MATLAB toolbox [here](https://github.com/FeeLab/seqNMF). It utilizes
standard sklearn syntax for easy plug-and-play usage.

### Features
- Compatible with scikit-learn pipelines
- Significant performance optimizations (benchmarks pending)
- Drop-in GPU acceleration via CuPy
- Comprehensive test suite
- Linted with fully-typed codebase
- Optional visualization module

### Installation
The package is available on PyPI and can be installed via pip.

```
pip install gseqnmf
```

GPU acceleration can be enabled by installing the package with the `cuda12` extra.
Development dependencies can be installed with the `dev` extra.

```
pip install gseqnmf[cuda12,dev]
```

### Usage Example

```python
import numpy as np
from gseqnmf import GseqNMF

# Load synthetic dataset (samples x neurons)
data = np.load("your_data.npy")
n_components = 3
seqeuence_length = 50
lam = 5e-2
model = GseqNMF(
    n_components=n_components,
    sequence_length=seqeuence_length,
    lam=lam,
)
model.fit(data)
```

### License

This project is licensed under the terms of the MIT license.
