Skip to content

Commit c19239f

Browse files
committed
Merge branch 'feature/readme' into develop
2 parents e1e766d + 20c3a04 commit c19239f

File tree

1 file changed

+49
-1
lines changed

1 file changed

+49
-1
lines changed

README.md

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,49 @@
1-
# multi_svr - Multiple-targets Support Vector Regression
1+
# multi_svr - Multiple-targets Support Vector Regression [![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)
2+
3+
SVR for multidimensional labels
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+
```

0 commit comments

Comments
 (0)