Skip to content

Commit f526a9c

Browse files
authored
Update README.md
1 parent 763f155 commit f526a9c

File tree

1 file changed

+18
-22
lines changed

1 file changed

+18
-22
lines changed

README.md

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ results = svdd.test(testData, testLabel);
6262
- Specifically, if the data does not have labels, please change the inputs for training or testing to `svdd.train(trainData)` and `results = svdd.test(testData)`.
6363

6464
### 👉 Parameter Optimization for SVDD model
65-
A class named `SvddOptimization` is defined to optimized the parameters. First define an optimization setting structure, then add it to the svdd parameter structure.The parameter optimization of the polynomial kernel function can only be achieved by using Bayesian optimization.
65+
A class named `SvddOptimization` is defined to optimized the parameters. First define an optimization setting structure, then add it to the svdd parameter structure.The parameter optimization of the polynomial kernel function can only be achieved by using Bayesian optimization.
6666
Please see the demonstration [`📝 demo_ParameterOptimization.m`](https://github.com/iqiukp/SVDD-MATLAB/blob/master/demo_ParameterOptimization.m) for details.
6767
```MATLAB
6868
% optimization setting
@@ -85,8 +85,7 @@ The full properties of optimization are
8585
- `display `: visualization, 'on' or 'off'.
8686

8787
### 👉 Visualization of SVDD model
88-
A class named `SvddVisualization` is defined to visualize the training and test results.
89-
Based on the trained SVDD model, the ROC curve of the training results (only supported for dataset containing both positive and negetive samples) is
88+
A class named `SvddVisualization` is defined to visualize the training and test results. Based on the trained SVDD model, the ROC curve of the training results (only supported for dataset containing both positive and negetive samples) is
9089
```MATLAB
9190
% Visualization
9291
svplot = SvddVisualization();
@@ -119,7 +118,7 @@ svplot.distance(svdd, results);
119118
</p>
120119

121120
### 👉 Binary Dataset for SVDD model
122-
A class named `BinaryDataset` is defined to generate and partition the 2D or 3D binary dataset.
121+
A class named `BinaryDataset` is defined to generate and partition the 2D or 3D binary dataset.
123122
Please see the demonstration [`📝demo_BinaryDataset.m`](https://github.com/iqiukp/SVDD-MATLAB/blob/master/demo_BinaryDataset.m) for details.
124123
```MATLAB
125124
ocdata = BinaryDataset();
@@ -145,7 +144,7 @@ The full Name-Value Arguments of class `BinaryDataset` are
145144
- `ratio`: ratio of the test set with range (0, 1). For example: 0.3.
146145

147146
### 👉 Kernel funcions
148-
A class named `BaseKernel* is defined to compute kernel function matrix.
147+
A class named `BaseKernel` is defined to compute kernel function matrix.
149148
Please see the demonstration [`📝demo_KernelFunction.m`](https://github.com/iqiukp/SVDD-MATLAB/blob/master/demo_KernelFunction.m) for details.
150149
```MATLAB
151150
%{
@@ -169,8 +168,7 @@ kernel = BaseKernel('type', 'sigmoid', 'gamma', value);
169168
kernel = BaseKernel('type', 'laplacian', 'gamma', value);
170169
```
171170
### 👉 Cross Validation
172-
In this code, two cross-validation methods are supported: 'K-Folds' and 'Holdout'.
173-
For example, the cross-validation of 5-Folds is
171+
In this code, two cross-validation methods are supported: 'K-Folds' and 'Holdout'. For example, the cross-validation of 5-Folds is
174172
```MATLAB
175173
svddParameter = struct('cost', cost,...
176174
'kernelFunc', kernel,...
@@ -191,33 +189,31 @@ svddParameter = struct('cost', cost,...
191189
'kernelFunc', kernel,...
192190
'PCA', 2);
193191
```
194-
**Notice:** you only need to set PCA in svddParameter, and you don't need to process training data and test data separately.
192+
Please see the demonstration [`📝demo_demo_DimReduPCA.m`](https://github.com/iqiukp/SVDD-MATLAB/blob/master/demo_DimReduPCA.m) for details.
193+
*Notice:* you only need to set PCA in svddParameter, and you don't need to process training data and test data separately.
195194

196195
### 👉 Weighted SVDD
197-
An Observation-weighted SVDD is supported in this code.
198-
Please see the demonstration `demo_ObservationWeight.m` for details.
196+
An Observation-weighted SVDD is supported in this code.
197+
Please see the demonstration [`📝demo_ObservationWeight.m`](https://github.com/iqiukp/SVDD-MATLAB/blob/master/demo_ObservationWeight.m) for details.
199198
```MATLAB
200199
weight = rand(size(trainData, 1), 1);
201200
% SVDD parameter
202201
svddParameter = struct('cost', cost,...
203202
'kernelFunc', kernel,...
204203
'weight', weight);
205204
```
206-
**Notice:** the size of 'weigh' should be m×1, where m is the number of training samples.
205+
*Notice:* the size of 'weigh' should be m×1, where m is the number of training samples.
207206

208207
### 👉 Hybrid-kernel SVDD model
209-
A demo for SVDD using Hybrid kernel functions (K =w1×K1+w2×K2+...+wn×Kn).
210-
Please see the demonstration `demo_HybridKernel.m` for details.
208+
A demo for SVDD using Hybrid kernel functions (K =w1×K1+w2×K2+...+wn×Kn).
209+
Please see the demonstration [`📝demo_HybridKernelSVDD.m`](https://github.com/iqiukp/SVDD-MATLAB/blob/master/demo_HybridKernelSVDD.m) for details.
211210
```MATLAB
212-
kernel_1 = BaseKernel('type', 'gaussian', 'gamma', 0.3);
213-
kernel_2 = BaseKernel('type', 'polynomial', 'degree', 2);
214-
kernel_3 = BaseKernel('type', 'sigmoid', 'gamma', 0.05);
215-
kernelWeight = [0.5, 0.2, 0.3];
216-
% parameter setting
217-
% kernel = Kernel('type', 'gaussian', 'gamma', 0.04);
218-
cost = 0.3;
211+
kernel_1 = BaseKernel('type', 'gaussian', 'gamma', 1);
212+
kernel_2 = BaseKernel('type', 'polynomial', 'degree', 3);
213+
kernelWeight = [0.5, 0.5];
214+
cost = 0.9;
215+
219216
svddParameter = struct('cost', cost,...
220-
'kernelFunc', [kernel_1, kernel_2, kernel_3],...
217+
'kernelFunc', [kernel_1, kernel_2],...
221218
'kernelWeight', kernelWeight);
222219
```
223-
**Notice:** the size of 'weigh' should be m×1, where m is the number of training samples.

0 commit comments

Comments
 (0)