1 简介
文章提出了一个基于梯度优化算法进行特征选择,由一个优化器、基于梯度的优化器 (GBO) 组成,该优化器与分类器 k-最近邻 (k-NN) 混合, 使用 ionosphere 数据集评估引入的框架 GBO-KNN 的性能.
2 部分代码
%-------------------------------------------------------------------------%
% GBO - KNN for features selections %
% %
%---Inputs-----------------------------------------------------------------
% feat: features
% label: labelling
% N: Number of gases
% T: Maximum number of iterations
% Nc: Number of gas types
% *Note: k-value of KNN & hold-out setting can be modified in jFitnessFunction.m
%---Outputs----------------------------------------------------------------
% sFeat: Selected features
% Sf: Selected feature index
% Nf: Number of selected features
% curve: Convergence curve
%--------------------------------------------------------------------------
%
%
%
% %% Gradient based Optimization
clc, clear, close;
% Benchmark data set
load ionosphere.mat;
% % Parameter setting
N=10; T=100;
% % Henry Gas Solubility Optimization
[sFeat2,Sf2,Nf2,curve2]=jGBO(feat,label,N,T);
% Plot convergence curve
figure(); plot(1:T,curve2); xlabel('Number of iterations');
ylabel('Fitness Value'); title('GBO'); grid on;
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
- 26.
- 27.
- 28.
- 29.
- 30.