Metadata-Version: 2.4
Name: svdynamics
Version: 0.0.1a0
Summary: Support Vector Dynamics: mixed (composite) kernels for scikit-learn SVMs.
Author: Leonid Shpaner
Project-URL: Homepage, https://github.com/lshpaner/svdynamics
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.MD
Requires-Dist: numpy>=1.21
Requires-Dist: scikit-learn>=1.0
Dynamic: license-file

<img src="https://raw.githubusercontent.com/lshpaner/svdynamics/refs/heads/main/assets/svd_logo.svg"
     height="250"
     style="border: none; outline: none; box-shadow: none;"
     oncontextmenu="return false;">

<br>

[![PyPI](https://img.shields.io/pypi/v/svdynamics.svg)](https://pypi.org/project/svdynamics/)
[![Downloads](https://pepy.tech/badge/svdynamics)](https://pepy.tech/project/svdynamics)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/lshpaner/svdynamics/blob/main/LICENSE.md)
[![Zenodo](https://zenodo.org/badge/DOI/10.5281/zenodo.23872830.svg)](https://doi.org/10.5281/zenodo.23872830)

Welcome to `svdynamics`! Support Vector Dynamics is a lightweight, scikit-learn
compatible Python library for building and using mixed (composite) kernels for
support vector machines. It provides a simple and extensible interface for
combining multiple kernel functions into a single weighted kernel, while
remaining fully compatible with existing sklearn pipelines, cross-validation,
and calibration workflows.

`svdynamics` focuses on making kernel composition a first-class modeling primitive
for both classification and regression, without requiring any changes to the
underlying scikit-learn API.


## Prerequisites

Before you install `svdynamics`, ensure your system meets the following requirements:

- `Python`: Version `3.8` or higher.

Additionally, `svdynamics` depends on the following packages, which will be
automatically installed:

- `numpy`: version `1.21` or higher
- `scikit-learn`: version `1.0` or higher


## 💾 Installation

To install `svdynamics`, simply run the following command in your terminal:

```bash
pip install svdynamics
```


## Quick Start

```python
import numpy as np
from sklearn.datasets import make_classification
from svdynamics import CompositeKernel, SVDClassifier


X, y = make_classification(
    n_samples=300,
    n_features=10,
    random_state=0,
)

kernel = CompositeKernel(
    kernels=[
        ("rbf", {"gamma": 0.2}),
        ("linear", {}),
        ("poly", {"degree": 2, "coef0": 1.0}),
    ],
    weights=[0.6, 0.3, 0.1],
    normalize=True,
)

clf = SVDClassifier(
    C=1.0,
    kernel=kernel,
    probability=True,
    random_state=0,
)

clf.fit(X, y)

proba = clf.predict_proba(X[:5])
pred = clf.predict(X[:5])

print(proba)
print(pred)
```


## 📄 Official Documentation

https://lshpaner.github.io/svdynamics


## 🌐 Authors' Website

1. [Leon Shpaner](https://www.leonshpaner.com)


## 📚 Citing `svdynamics`

If you use `svdynamics` in your research or projects, please consider citing it.

```bibtex
@software{shpaner_2026_23872830,
  author       = {Shpaner, Leonid},
  title        = {{svdynamics: Support Vector Dynamics}},
  year         = 2026,
  publisher    = {Zenodo},
  version      = {v0.0.1a0},
  doi          = {10.5281/zenodo.23872830},
  url          = {https://doi.org/10.5281/zenodo.23872830}
}
```


## ⚖️ License

`svdynamics` is distributed under the MIT License. See
[LICENSE](https://github.com/lshpaner/svdynamics/blob/main/LICENSE.MD)
for more information.

--------
