File tree Expand file tree Collapse file tree 1 file changed +47
-1
lines changed Expand file tree Collapse file tree 1 file changed +47
-1
lines changed Original file line number Diff line number Diff line change 11# multi_svr - Multiple-targets Support Vector Regression
22
3- [ ![ Build Status] ( https://travis-ci.org/nwtgck/multi-svr-python.svg?branch=develop )] ( https://travis-ci.org/nwtgck/multi-svr-python ) [ ![ Coverage Status] ( https://coveralls.io/repos/github/nwtgck/multi-svr-python/badge.svg?branch=develop )] ( https://coveralls.io/github/nwtgck/multi-svr-python?branch=develop )
3+ [ ![ Build Status] ( https://travis-ci.org/nwtgck/multi-svr-python.svg?branch=develop )] ( https://travis-ci.org/nwtgck/multi-svr-python ) [ ![ Coverage Status] ( https://coveralls.io/repos/github/nwtgck/multi-svr-python/badge.svg?branch=develop )] ( https://coveralls.io/github/nwtgck/multi-svr-python?branch=develop )
4+
5+
6+ ## Installation
7+
8+ ``` bash
9+ pip3 install git+https://github.com/nwtgck/multi-svr-python
10+ ```
11+
12+
13+ ## Usage
14+
15+ ``` python
16+ X = [
17+ [0 , 0 ],
18+ [0 , 10 ],
19+ [1 , 10 ],
20+ [1 , 20 ],
21+ [1 , 30 ],
22+ [1 , 40 ]
23+ ]
24+
25+ y = [
26+ [0 , 0 ],
27+ [0 , 10 ],
28+ [2 , 10 ],
29+ [2 , 20 ],
30+ [2 , 30 ],
31+ [2 , 40 ]
32+ ]
33+
34+ # Create SVR
35+ regressor = multi_svr.MutilSVR(kernel = ' linear' )
36+ # Fit
37+ regressor.fit(X, y)
38+ # Predict
39+ pred_y = regressor.predict(X)
40+ # Calc errors
41+ errs = metrics.mean_squared_error(y, pred_y)
42+ ```
43+
44+ ## How to test
45+
46+ ``` bash
47+ cd < this repo
48+ python setup.py test
49+ ```
You can’t perform that action at this time.
0 commit comments