File tree Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ install:
2626script :
2727 - coverage run --source=nwtgck_hello_test setup.py test
2828
29+ - pip3 install --upgrade git+https://github.com/nwtgck/multi-svr-python.git@$TRAVIS_BRANCH
30+ - python examples/example1.py
31+
2932after_success :
3033 - coveralls
3134
Original file line number Diff line number Diff line change 1+ import multi_svr
2+ from sklearn import metrics
3+
4+ X = [
5+ [0 , 0 ],
6+ [0 , 10 ],
7+ [1 , 10 ],
8+ [1 , 20 ],
9+ [1 , 30 ],
10+ [1 , 40 ]
11+ ]
12+
13+ y = [
14+ [0 , 0 ],
15+ [0 , 10 ],
16+ [2 , 10 ],
17+ [2 , 20 ],
18+ [2 , 30 ],
19+ [2 , 40 ]
20+ ]
21+
22+ # Create SVR
23+ regressor = multi_svr .MutilSVR (kernel = 'linear' )
24+ # Fit
25+ regressor .fit (X , y )
26+ # Predict
27+ pred_y = regressor .predict (X )
28+ # Calc errors
29+ errs = metrics .mean_squared_error (y , pred_y )
30+
31+ print ('pred_y:' , pred_y )
32+ print ('errs:' , errs )
Original file line number Diff line number Diff line change 99
1010setup (
1111 name = 'multi_svr' ,
12- version = '0.1.0 ' ,
12+ version = '0.1.1-SNAPSHOT ' ,
1313 description = 'SVR for multidimensional label' ,
1414 author = 'Ryo Ota' ,
1515
You can’t perform that action at this time.
0 commit comments