Support Vector Dynamics: mixed (composite) kernels for scikit-learn SVMs.
Project description
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: Version3.8or higher.
Additionally, svdynamics depends on the following packages, which will be automatically installed:
numpy: version1.21or higherscikit-learn: version1.0or higher
💾 Installation
To install svdynamics, simply run the following command in your terminal:
pip install svdynamics
Quick Start
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
⚖️ License
svdynamics is distributed under the MIT License. See LICENSE for more information.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file svdynamics-0.0.0a0.tar.gz.
File metadata
- Download URL: svdynamics-0.0.0a0.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d038334738efc3a1f82b3bbbce10a27321345fad2af31370eb74c3bd76a4062
|
|
| MD5 |
6d96a03110766501e769fb7b1656a820
|
|
| BLAKE2b-256 |
1146e6594c60765498a3c270cd2ea9be6e62e3cadd263f768b201bd0184957f4
|
File details
Details for the file svdynamics-0.0.0a0-py3-none-any.whl.
File metadata
- Download URL: svdynamics-0.0.0a0-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb5c5098fd22e66d92f86997548cebb9cf19e45e9df385dba521fbffb740faf9
|
|
| MD5 |
2abf5c01a14873b761eec0e2418eddb3
|
|
| BLAKE2b-256 |
d716ed60420b1d20998e82e49a734675d2fa56a25597698d67e92d0ae92dfbe3
|