Skip to content

Commit e40ecef

Browse files
authored
Update README.md
1 parent 4fc46d2 commit e40ecef

File tree

1 file changed

+58
-1
lines changed

1 file changed

+58
-1
lines changed

README.md

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,58 @@
1-
# Whale-Optimization-Algorithm-for-Feature-Selection
1+
# Whale Optimization Algorithm for Feature Selection
2+
3+
[![License](https://img.shields.io/badge/license-BSD_3-yellow.svg)](https://github.com/JingweiToo/Whale-Optimization-Algorithm-for-Feature-Selection/blob/main/LICENSE)
4+
[![GitHub release](https://img.shields.io/badge/release-1.1-green.svg)](https://github.com/JingweiToo/Whale-Optimization-Algorithm-for-Feature-Selection)
5+
6+
![Wheel](https://www.mathworks.com/matlabcentral/mlc-downloads/downloads/935b0716-70d6-40b6-a4ad-3b479f499e2e/f587998c-2aef-4bd2-ba65-b056e2d10146/images/1603176127.JPG)
7+
8+
9+
## Introduction
10+
* This toolbox offers a Whale Optimization Algorithm ( WOA ) method
11+
* The `Main` script illustrates the example of how WOA can solve the feature selection problem using benchmark dataset
12+
13+
14+
## Input
15+
* *`feat`* : feature vector ( Instances *x* Features )
16+
* *`label`* : label vector ( Instances *x* 1 )
17+
* *`N`* : number of whales
18+
19+
20+
## Output
21+
* *`sFeat`* : selected features
22+
* *`Sf`* : selected feature index
23+
* *`Nf`* : number of selected features
24+
* *`curve`* : convergence curve
25+
26+
27+
### Example
28+
```code
29+
% Benchmark data set
30+
load ionosphere.mat;
31+
32+
% Set 20% data as validation set
33+
ho=0.2;
34+
% Hold-out method
35+
HO=cvpartition(label,'HoldOut',ho);
36+
37+
% Parameter setting
38+
N = 10;
39+
max_Iter = 100;
40+
41+
% Whale Optimization Algorithm
42+
[sFeat,Sf,Nf,curve] = jWOA(feat,label,N,max_Iter,HO);
43+
44+
% Accuracy
45+
Acc = jKNN(sFeat,label,HO);
46+
fprintf('\n Accuracy: %g %%',Acc); fprintf('\n');
47+
48+
% Plot convergence curve
49+
plot(1:max_Iter,curve);
50+
xlabel('Number of Iterations');
51+
ylabel('Fitness Value');
52+
title('WOA'); grid on;
53+
```
54+
55+
## Requirement
56+
* MATLAB 2014 or above
57+
* Statistics and Machine Learning Toolbox
58+

0 commit comments

Comments
 (0)