-
Notifications
You must be signed in to change notification settings - Fork 3
Using as command line tools
Satoshi Imai edited this page Jun 6, 2018
·
11 revisions
When cl-online-learning is installed with roswell, you will have clol-train
and clol-predict
files in ~/.roswell/bin/
.
ros install masatoi/cl-online-learning
These usage are similar to the libsvm's commands.
clol-train
command receives a training-set-file
and several options, and then generates a model-file
. The dataset file is in libsvm data format (More details for data format).
clol-train [options] training-set-file model-file
options:
-dim : number of feature dimensions (optional)
-n-class : number of classes (optional)
-n-epoch : number of epochs (optional)
-type : type of learning model
for binary or multi-class classification
0 -- Perceptron
1 -- AROW (default)
2 -- SCW-I
-sparse : whether sparse data or not
0 -- binary
1 -- sparse (default)
-mtype : multiclass classifier type
0 -- one-vs-rest (default)
1 -- one-vs-one
-gamma : regularization parameter for AROW (default 10.0)
-eta : decay parameter for SCW-I (default 0.9 (0 < eta < 1))
-c : regularization parameter for SCW-I (default 1.0)
clol-predict
command receives a test-set-file
and the model-file
generated by clol-train, and then generates an output-file
.
clol-predict test-set-file model-file output-file
- Dataset: a1a
- AROW, gamma=10.0
clol-train a1a a1a.model
clol-predict a1a.t a1a.model a1a.out
Accuracy: 84.461815%, Correct: 26146, Total: 30956
- Dataset: mnist
- SCW-I, one-vs-one, eta=0.9, c=0.1
clol-train mnist.scale mnist.model -type 2 -mtype 1 -eta 0.9 -c 0.1 -n-epoch 10
clol-predict mnist.scale.t mnist.model mnist.out
Accuracy: 94.36%, Correct: 9436, Total: 10000