Skip to main content

No project description provided

Project description

rusvm

A Python interface to rusvm.

Installation

pip install rusvm

Example

See simple.py.

import rusvm
import numpy as np
import matplotlib.pyplot as plt

# generate sample dataset
n = 20
np.random.seed(42)
x = np.random.rand(n)
y = np.sin(2.0 * np.pi * x)

# define parameters for training problem
# regularization parameter
lmbda = 1.0
# scaling parameter
gamma = 10.0

# solve training problem
res = rusvm.solve_smo(
    x=np.sqrt(gamma) * x[:, None],
    y=y,
    params_problem=dict(
        lmbda=lmbda,
        kind='regression',
    ),
    params_smo=dict(
        time_limit=1.0,
    )
)
print(res['opt_status'])
a = np.array(res['a']) / lmbda
a = a[:n] + a[n:]

# generate reference points
xplot = np.linspace(0.0, 1.0, 100)
# evaluate decision function at reference points
k = np.exp(-gamma * (xplot[:, None] - x[None, :]) ** 2)
yplot = k.dot(a) + res['b']

# plot training points and decision function
plt.plot(x, y, 'kx')
plt.plot(xplot, yplot, 'r')

Build

maturin develop --release

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

rusvm-0.1.1.tar.gz (16.3 kB view details)

Uploaded Source

Built Distributions

rusvm-0.1.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

rusvm-0.1.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

rusvm-0.1.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

rusvm-0.1.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

rusvm-0.1.1-cp312-none-win_amd64.whl (16.3 MB view details)

Uploaded CPython 3.12 Windows x86-64

rusvm-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

rusvm-0.1.1-cp312-cp312-macosx_11_0_arm64.whl (288.9 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

rusvm-0.1.1-cp312-cp312-macosx_10_12_x86_64.whl (294.9 kB view details)

Uploaded CPython 3.12 macOS 10.12+ x86-64

rusvm-0.1.1-cp311-none-win_amd64.whl (16.3 MB view details)

Uploaded CPython 3.11 Windows x86-64

rusvm-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

rusvm-0.1.1-cp311-cp311-macosx_11_0_arm64.whl (288.5 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

rusvm-0.1.1-cp311-cp311-macosx_10_12_x86_64.whl (295.2 kB view details)

Uploaded CPython 3.11 macOS 10.12+ x86-64

rusvm-0.1.1-cp310-none-win_amd64.whl (16.3 MB view details)

Uploaded CPython 3.10 Windows x86-64

rusvm-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

rusvm-0.1.1-cp310-cp310-macosx_11_0_arm64.whl (288.6 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

rusvm-0.1.1-cp310-cp310-macosx_10_12_x86_64.whl (295.4 kB view details)

Uploaded CPython 3.10 macOS 10.12+ x86-64

rusvm-0.1.1-cp39-none-win_amd64.whl (16.3 MB view details)

Uploaded CPython 3.9 Windows x86-64

rusvm-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

rusvm-0.1.1-cp38-none-win_amd64.whl (16.3 MB view details)

Uploaded CPython 3.8 Windows x86-64

rusvm-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

rusvm-0.1.1-cp37-none-win_amd64.whl (16.3 MB view details)

Uploaded CPython 3.7 Windows x86-64

rusvm-0.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

File details

Details for the file rusvm-0.1.1.tar.gz.

File metadata

  • Download URL: rusvm-0.1.1.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.5.1

File hashes

Hashes for rusvm-0.1.1.tar.gz
Algorithm Hash digest
SHA256 75ac02b112529df2d63ce001a7b635f56be5bd4f8d33bfc060da96126352c5b8
MD5 250834b97b9ad4566920f7985319e72b
BLAKE2b-256 ab438c6c7e940a8a6104aac89551dbc3c1bca42c3268677211489bc306c399f3

See more details on using hashes here.

File details

Details for the file rusvm-0.1.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rusvm-0.1.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bac0fb772526219ad4425f39212a8b77f22f4f3175e853fd9ded894c8b0d237e
MD5 2f2f6e73af8772d39a9c0238f977c2f4
BLAKE2b-256 33311aaba7c87754a8e373f3b356219151df002bee80c3e92918c22352d357f2

See more details on using hashes here.

File details

Details for the file rusvm-0.1.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rusvm-0.1.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b9ba87dacaf49547c87713c332c7979cfc149526631704fee8daa3763718def4
MD5 79efe2e4ed6021992081598959c08e64
BLAKE2b-256 c4af3ff65332251394acc0c410400c619a0b4ecf7279bc9332353871f86bd6a7

See more details on using hashes here.

File details

Details for the file rusvm-0.1.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rusvm-0.1.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b8ad599612b9dab33426858e60ae3f6478fc0a37d44382fd8cd1090c4b4766b7
MD5 1af64d28f1482906a9475e20fa830d33
BLAKE2b-256 54f12302e9609224e9fd4d70bc7ce1015d225701b1bcfb82d45eee78ec6e44f5

See more details on using hashes here.

File details

Details for the file rusvm-0.1.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rusvm-0.1.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7da5a6b4267f2bf909e6689e352fbb0b8c2dca81e5056c4913ab46f119c95434
MD5 2aa671d18e0351eedcd9f14b2f32499d
BLAKE2b-256 c0f3adfca201d6dab9101403caca3653090615da52abb2caa39dc6d86ccebf45

See more details on using hashes here.

File details

Details for the file rusvm-0.1.1-cp312-none-win_amd64.whl.

File metadata

  • Download URL: rusvm-0.1.1-cp312-none-win_amd64.whl
  • Upload date:
  • Size: 16.3 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.5.1

File hashes

Hashes for rusvm-0.1.1-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 bbed869d9bd973d4bbc38b8f57e0e99e3d3692ae7205815cfaca87ee59457511
MD5 79634a2a28d15951206df109ee40aa41
BLAKE2b-256 0e86ff6b4b3b98d8f1050f5fd4cae662ce989b544b36e7d613571e003dcaff5a

See more details on using hashes here.

File details

Details for the file rusvm-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rusvm-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fd57aa02bef6410ac563a51c47def8555e12904a347a0e49d0228d77434693af
MD5 feaad945748238e1ed366965c02755f0
BLAKE2b-256 c1c7ae51e10efb0c73a8447ed0e3cd860b05f754cdcc55b3d919d6411d4b57e0

See more details on using hashes here.

File details

Details for the file rusvm-0.1.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rusvm-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8df07019bde98af22ca3460628701d7ed0a74048bc92699876220f69c7016bdf
MD5 974c2f33d4c305fc9c14519f979c647d
BLAKE2b-256 68be1b725c723ecc699df4e57ba532657a9a7fa313f9b9d50d1a0d3e44cf71e2

See more details on using hashes here.

File details

Details for the file rusvm-0.1.1-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for rusvm-0.1.1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f76b0cf868c5efff5141993d135dea3a42572a75b1cc515f884eb1b96260da12
MD5 d358e69053faf0a678157eaccce99da0
BLAKE2b-256 947f0ac45269090a8b262a6b3aeb3b91587051410786fd6af9492c4b53b8224c

See more details on using hashes here.

File details

Details for the file rusvm-0.1.1-cp311-none-win_amd64.whl.

File metadata

  • Download URL: rusvm-0.1.1-cp311-none-win_amd64.whl
  • Upload date:
  • Size: 16.3 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.5.1

File hashes

Hashes for rusvm-0.1.1-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 88fa6d2cd48e652e67fff8a343e57a05b9d3a866f1e1f6b88b9e4dcaa895fc65
MD5 bfbb637996936c9f5dd0528d7f57f000
BLAKE2b-256 ee302efa5138a68bab8b06904fed8e8b62052c4c3c665bb0e5529ffe5a80bd6f

See more details on using hashes here.

File details

Details for the file rusvm-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rusvm-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f128418583d656b57bb454d05bf4d438998efd638758c7702f0118435d168138
MD5 a3e5d2f2f4c2b042080b0bc72fac203f
BLAKE2b-256 f81026b5b2bc653603a8abb6e12fac6f030befdcf5dcf067c06ef8799bd0e76f

See more details on using hashes here.

File details

Details for the file rusvm-0.1.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rusvm-0.1.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f18d410dfda395e622c5153f272e256ab4c98c86851464a0fe740c39b1713ef9
MD5 30e85425d954bc02aac022839f709928
BLAKE2b-256 529175e96b967c9f12fb6dcbb4480f71747865a3b4b52ec3ecf694622d7c6048

See more details on using hashes here.

File details

Details for the file rusvm-0.1.1-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for rusvm-0.1.1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c827470721f4d5f72f4ba94befaf969208753b3beb13fbb3d05f137a0cb3a342
MD5 c9ba9a5f08a4bae66407c99b88b3eb65
BLAKE2b-256 6856b1686cb6370f95493d7dfe969c42a97473aaa69874b78c33009917a24a16

See more details on using hashes here.

File details

Details for the file rusvm-0.1.1-cp310-none-win_amd64.whl.

File metadata

  • Download URL: rusvm-0.1.1-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 16.3 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.5.1

File hashes

Hashes for rusvm-0.1.1-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 c983baad9d1822e6bfa58be3d46b888bb21f3cec6a36d2c35d75be9bf89f1084
MD5 39857052f8532464962f8ebf66686ad4
BLAKE2b-256 50d27cbd8d2f4301a3b4d33c5e2fb3ff3103fb4a1ebd1c04432fa2e44bb47cc1

See more details on using hashes here.

File details

Details for the file rusvm-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rusvm-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c37c49d623b3bce062d73c1bc3d29e2b5a4e9d6582697e35c912ef684e4803e8
MD5 cacc9d1230392f20fb3f0f56568c074c
BLAKE2b-256 776bc8391ef58d1d45d9de900b976b61132c01a9399f3eb8310e4eb6376d774d

See more details on using hashes here.

File details

Details for the file rusvm-0.1.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rusvm-0.1.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0ff3b5a1b6d761f29b9d740f52ea1143466083f53fe5d1dcc11e46447d6d5927
MD5 663d26ecf3316d0c45ce7274c2431cfb
BLAKE2b-256 93cd317203ed0a91fb649941606c1d75328d897e2d1d8cb8f0d3a408799a8992

See more details on using hashes here.

File details

Details for the file rusvm-0.1.1-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for rusvm-0.1.1-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 aa5fde07aea4184bbbd51d8655af6e07b32191fd667d33ef0e15b425e1c3123b
MD5 f75f49ff272a0d775be4108b11d5b375
BLAKE2b-256 77e0ac389ad81fba84a1f63e71ac83f16fccc01e4740bdbc62cfc58d849be9c0

See more details on using hashes here.

File details

Details for the file rusvm-0.1.1-cp39-none-win_amd64.whl.

File metadata

  • Download URL: rusvm-0.1.1-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 16.3 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.5.1

File hashes

Hashes for rusvm-0.1.1-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 6d24a12450c32879af220eeb3f98391351ad7cbaa13c67a20123b662733bc74b
MD5 612b4b467e11f81f685ac5569d6b6e34
BLAKE2b-256 e5236185a14ac312976e15b3679c247feac67a871e1994f92694c3a3d2710643

See more details on using hashes here.

File details

Details for the file rusvm-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rusvm-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a6ea21cdd7a60a0f034dd2bd46854aab10d19135f8200cf207e3f6bf2111dfaa
MD5 721476288b7057dc979764048ee7c807
BLAKE2b-256 2d3f2cd2d312e3983769bf51aea574713e6c70d213d41237b0bb054b91404710

See more details on using hashes here.

File details

Details for the file rusvm-0.1.1-cp38-none-win_amd64.whl.

File metadata

  • Download URL: rusvm-0.1.1-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 16.3 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.5.1

File hashes

Hashes for rusvm-0.1.1-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 d8e39cd1d76a21aa4513e6980a8a9e9b4c0ad80005d5c4147dfd093f74f0c8e6
MD5 255784bb8022cca90710b2977bb0c6bf
BLAKE2b-256 86073681d1f42e72c1c7217a65bffd8e877c6cdca4d8f3ea324d5adaaf62ee63

See more details on using hashes here.

File details

Details for the file rusvm-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rusvm-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b1c4998c5e9f5ce6752a27f32edf0bdaab56ee13a49f201e96eda92ad8f94f2b
MD5 db8cc48738c2182ae3ad800ae5489b2b
BLAKE2b-256 e037f25ba3ba00a1efeaf0b5b9db2dca2755d048cb0659a4796bddd633a9d53e

See more details on using hashes here.

File details

Details for the file rusvm-0.1.1-cp37-none-win_amd64.whl.

File metadata

  • Download URL: rusvm-0.1.1-cp37-none-win_amd64.whl
  • Upload date:
  • Size: 16.3 MB
  • Tags: CPython 3.7, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.5.1

File hashes

Hashes for rusvm-0.1.1-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 a1f11fff9c8ed085efcf0661da384105d6ae9b35ce42f18d3df7af3c5ca46c93
MD5 692ae093511bf9e09956d4d7cf6d90c8
BLAKE2b-256 94e201e7b925bbc3b684c5cc0bff42f08877e246e20e5f335d06ac61fe0d999b

See more details on using hashes here.

File details

Details for the file rusvm-0.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rusvm-0.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3d21e9ca71bfb0e6bfd159b523efa33cb3be9a982a98811799b973f8236bb0c5
MD5 5bedab8edca9b5b2c5240afddf6b4e49
BLAKE2b-256 9b79e62b9211853cd76f91e4c8769c10842526c866b208bedfd77dbdfefb4f09

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page