Skip to content

nwtgck/multi-svr-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

multi_svr

Build Status Coverage Status

Support Vector Regression (SVR) for multidimensional labels

Install with pip

pip3 install git+https://github.com/nwtgck/multi-svr-python

Install with Pipenv

pipenv install --dev toml
pipenv install git+https://github.com/nwtgck/[email protected]#egg=multi_svr

Usage

import multi_svr
from sklearn import metrics

X = [
[0, 0],
[0, 10],
[1, 10],
[1, 20],
[1, 30],
[1, 40]
]

y = [
[0, 0],
[0, 10],
[2, 10],
[2, 20],
[2, 30],
[2, 40]
]

#  Create SVR
regressor = multi_svr.MultiSVR(kernel='linear')
# Fit
regressor.fit(X, y)
# Predict
pred_y = regressor.predict(X)
# Calc errors
errs = metrics.mean_squared_error(y, pred_y)

How to test

cd <this repo>
python setup.py test