Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
QinbinLi committed Nov 23, 2017
1 parent e9fedda commit da249ab
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 17 deletions.
14 changes: 8 additions & 6 deletions Matlab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ svm_train_matlab(parameters): The format of parameters is same as libsvm
svm_predict_matlab(parameters): The format of parameters is same as libsvm
run svm predict according to parameters.
Example:
>> n = ["-c", "10", "-g", "0.125", "test_dataset.txt", "test_dataset.model"]
>> m = cellstr(n)
>> svm_train_matlab(m)
>> n = ["test_dataset.txt", "test_dataset.model", "test_datset.out"]
>> m = cellstr(n)
>> svm_predict_matlab(m)
```matlab
n = ["-c", "10", "-g", "0.125", "test_dataset.txt", "test_dataset.model"]
m = cellstr(n)
svm_train_matlab(m)
n = ["test_dataset.txt", "test_dataset.model", "test_datset.out"]
m = cellstr(n)
svm_predict_matlab(m)
```
12 changes: 7 additions & 5 deletions R/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ svm_predict_R(parameters): The format of parameters is same as libsvm
run svm predict according to parameters.

Example:
> source("svm.R")
> c<-c("-c", "10", "-g", "0.125", "test_dataset.txt", "test_dataset.model")
> svm_train_R(c)
> c<-c("test_dataset.txt","test_dataset.model","test_dataset.out")
> svm_predict_R(c)
```R
source("svm.R")
c<-c("-c", "10", "-g", "0.125", "test_dataset.txt", "test_dataset.model")
svm_train_R(c)
c<-c("test_dataset.txt","test_dataset.model","test_dataset.out")
svm_predict_R(c)
```
13 changes: 7 additions & 6 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ svm_predict(labels, instances, 'model_file_name', 'output_file_name', parameters
use model_file_name to predict (labes, instances) according to parameters and save the result to output_file_name in dataset directory.

Example:
>>> from svm import *
>>> y,x = svm_read_problem('mnist.scale')
>>> svm_train(y,x,'mnist.scale.model','-s 0 -t 2 -g 0.125 -c 10 -e 0.001')
>>> y,x=svm_read_problem('mnist.scale.t')
>>> svm_predict(y,x,'mnist.scale.model','mnist.scale.out')
```python
from svm import *
y,x = svm_read_problem('mnist.scale')
svm_train(y,x,'mnist.scale.model','-s 0 -t 2 -g 0.125 -c 10 -e 0.001')
y,x=svm_read_problem('mnist.scale.t')
svm_predict(y,x,'mnist.scale.model','mnist.scale.out')
```

0 comments on commit da249ab

Please sign in to comment.