Skip to content

Latest commit

 

History

History
59 lines (46 loc) · 1.05 KB

README.md

File metadata and controls

59 lines (46 loc) · 1.05 KB

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/multi-svr-python.git@v0.1.2#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