Skip to content

Commit fd70db5

Browse files
authored
Update README.md
1 parent 773df45 commit fd70db5

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

README.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
### 01. Classification using RVM (RVC)
6565

6666
A demo for classification using RVM
67-
```
67+
```MATLAB
6868
clc
6969
clear all
7070
close all
@@ -97,7 +97,7 @@ rvm.draw(results)
9797
```
9898

9999
results:
100-
```
100+
```MATLAB
101101
*** RVM model (classification) train finished ***
102102
running time = 0.1604 seconds
103103
iterations = 20
@@ -122,7 +122,7 @@ accuracy = 96.6667%
122122
### 02. Regression using RVM (RVR)
123123

124124
A demo for regression using RVM
125-
```
125+
```MATLAB
126126
clc
127127
clear all
128128
close all
@@ -150,7 +150,7 @@ results = rvm.test(testData, testLabel);
150150
rvm.draw(results)
151151
```
152152
results:
153-
```
153+
```MATLAB
154154
*** RVM model (regression) train finished ***
155155
running time = 0.1757 seconds
156156
iterations = 76
@@ -178,7 +178,7 @@ MAE = 0.1106
178178
### 03. Kernel funcions
179179

180180
A class named ***Kernel*** is defined to compute kernel function matrix.
181-
```
181+
```MATLAB
182182
%{
183183
type -
184184
@@ -200,7 +200,7 @@ kernel = Kernel('type', 'sigmoid', 'gamma', value);
200200
kernel = Kernel('type', 'laplacian', 'gamma', value);
201201
```
202202
For example, compute the kernel matrix between **X** and **Y**
203-
```
203+
```MATLAB
204204
X = rand(5, 2);
205205
Y = rand(3, 2);
206206
kernel = Kernel('type', 'gaussian', 'gamma', 2);
@@ -219,7 +219,7 @@ kernelMatrix =
219219
### 04. Hybrid kernel
220220

221221
A demo for regression using RVM with hybrid_kernel (K =w1×K1+w2×K2+...+wn×Kn)
222-
```
222+
```MATLAB
223223
clc
224224
clear all
225225
close all
@@ -253,7 +253,7 @@ rvm.draw(results)
253253

254254
A demo for RVM model with Parameter Optimization
255255

256-
```
256+
```MATLAB
257257
clc
258258
clear all
259259
close all
@@ -293,7 +293,7 @@ rvm.draw(results)
293293
```
294294

295295
results:
296-
```
296+
```MATLAB
297297
*** RVM model (classification) train finished ***
298298
running time = 13.3356 seconds
299299
iterations = 88
@@ -324,7 +324,7 @@ accuracy = 97.1429%
324324

325325
A demo for RVM model with Parameter Optimization
326326

327-
```
327+
```MATLAB
328328
%{
329329
A demo for hybrid-kernel RVM model with Parameter Optimization
330330
%}
@@ -366,7 +366,7 @@ rvm.draw(results)
366366
```
367367

368368
results:
369-
```
369+
```MATLAB
370370
*** RVM model (regression) train finished ***
371371
running time = 24.4042 seconds
372372
iterations = 377
@@ -402,22 +402,22 @@ MAE = 0.4867
402402

403403
In this code, two cross-validation methods are supported: 'K-Folds' and 'Holdout'.
404404
For example, the cross-validation of 5-Folds is
405-
```
405+
```MATLAB
406406
parameter = struct( 'display', 'on',...
407407
'type', 'RVC',...
408408
'kernelFunc', kernel,...
409409
'KFold', 5);
410410
```
411411
For example, the cross-validation of the Holdout method with a ratio of 0.3 is
412-
```
412+
```MATLAB
413413
parameter = struct( 'display', 'on',...
414414
'type', 'RVC',...
415415
'kernelFunc', kernel,...
416416
'HoldOut', 0.3);
417417
```
418418

419419
### 08. Other option
420-
```
420+
```MATLAB
421421
%% custom optimization option
422422
%{
423423
opt.method = 'bayes'; % bayes, ga, pso

0 commit comments

Comments
 (0)