Polynomial String Kernel and linear time String Kernel. Supports multithreading and is compatible with Scikit-Learn SVMs.
Project description
String Kernels
This repo contains an implementation of the Polynomial String Kernel and a linear time String Kernel algorithm as described in our paper, High Resolution Ancestry Deconvolution for Next Generation Genomic Data.
It offers
-
Linear time computation of two effective string kernels.
-
Compatibility with Scikit-Learn's Support Vector Machines (easy plug-in).
-
Multithreading.
Usage
To install the package, execute from the command line
pip install string-kernels
And then you're all set!
Assuming you have Scikit-Learn already installed you can use Lodhi's string kernel via
from sklearn import svm
from stringkernels.kernels import string_kernel
model = svm.SVC(kernel=string_kernel)
and the polynomial string kernel,
from sklearn import svm
from stringkernels.kernels import polynomial_string_kernel
model = svm.SVC(kernel=polynomial_string_kernel)
See the notebook example.ipynb for further demonstration of usage.
If you end up using this in your research we kindly ask you to cite us! :)
Project details
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
Hashes for string_kernels-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56ba01b4c8ed966cc283f531a1fee7f981dac3f4fba0b6276476b537c9ca60c9 |
|
MD5 | e5b74879d884b181db1f0f1f5177247b |
|
BLAKE2b-256 | 8ef916a81c6b0343183b485c1749dc558fa8c1fd212315cbdcfc96ba53f43a9d |