Classification prediction | Matlab implements data classification prediction based on MIC-BP-Adaboost maximum mutual information coefficient data feature selection algorithm combined with Adaboost-BP neural network

Classification prediction | Matlab implements data classification prediction based on MIC-BP-Adaboost maximum mutual information coefficient data feature selection algorithm combined with Adaboost-BP neural network

Effect list

1
Insert image description here

Insert image description here
Insert image description here
Insert image description here
Insert image description here

basic introduction

Matlab implements data classification prediction based on MIC-BP-Adaboost maximum mutual information coefficient data feature selection algorithm combined with Adaboost-BP neural network (Matlab complete program and data) 1. Classification prediction of maximum mutual information coefficient MIC (data feature selection algorithm)
, MIC feature selection classification prediction, multi-input single-output model.
2. Multi-feature input model can be used by directly replacing the data.
3. The language is matlab. Classification effect diagram, confusion matrix diagram.
4. Classification effect diagram, confusion matrix diagram.
5. MIC-BP-Adaboost maximum mutual information coefficient data feature selection algorithm combined with Adaboost-BP neural network for data classification prediction.
The operating environment is matlab2018 and above.
After feature selection, the sequence numbers of the 9 features retained are:
1 3 5 7 8 9 10 11 12

research content

Maximum Information Coefficient (MIC) is a commonly used data feature selection algorithm used to discover nonlinear relationships between features. It measures the maximum correlation between two variables. First, prepare a dataset containing multiple features and target variables. For each pair of features and target variables, the mutual information value between them is calculated. Mutual information measures the correlation between two variables. Sort the calculated mutual information values ​​in descending order according to the size of the mutual information values. Select the feature with the largest mutual information coefficient from the sorted list of mutual information values. A certain number of features can be selected based on specific needs. The core idea of ​​the maximum mutual information coefficient algorithm is to find the maximum correlation between features and target variables, so selecting the feature with the maximum mutual information coefficient can be considered the most relevant feature. This selection method can help eliminate features that are weakly related to the target variable and improve the performance and efficiency of the model. In practical applications, other feature selection methods or dimensionality reduction techniques can be combined to further optimize the feature selection process.

programming

  • For the complete program and data download method, privately message the blogger to reply to Matlab to implement data classification prediction based on the MIC-BP-Adaboost maximum mutual information coefficient data feature selection algorithm combined with the Adaboost-BP neural network .
%%  数据归一化
[p_train, ps_input] = mapminmax(P_train, 0, 1);
p_test = mapminmax('apply', P_test, ps_input );
t_train = T_train;
t_test  = T_test ;

%%  特征选择
k = 9;        % 保留特征个数
[save_index, mic] = mic_select(p_train, t_train, k);

%%  输出选择特征的对应序号
disp('经过特征选择后,保留9个特征的序号为:')
disp(save_index')

%%  特征重要性
figure
bar(mic)
xlabel('输入特征序号')
ylabel('最大互信息系数')

%%  特征选择后的数据集
p_train = p_train(save_index, :);
p_test  = p_test (save_index, :);

%%  输出编码
t_train = ind2vec(t_train);
t_test  = ind2vec(t_test );

%%  创建网络
net = newff(p_train, t_train, 5);

%%  设置训练参数
net.trainParam.epochs = 1000;  % 最大迭代次数
net.trainParam.goal = 1e-6;    % 误差阈值
net.trainParam.lr = 0.01;      % 学习率

%%  训练网络
net = train(net, p_train, t_train);



%%  数据反归一化
T_sim1 = vec2ind(t_sim1);
T_sim2 = vec2ind(t_sim2);

%%  性能评价
error1 = sum((T_sim1 == T_train)) / M * 100 ;
error2 = sum((T_sim2 == T_test )) / N * 100 ;

%%  绘图
figure
plot(1: M, T_train, 'r-*', 1: M, T_sim1, 'b-o', 'LineWidth', 1)
legend('真实值', '预测值')
xlabel('预测样本')
ylabel('预测结果')
string = {
    
    '训练集预测结果对比'; ['准确率=' num2str(error1) '%']};
title(string)
grid

figure
plot(1: N, T_test, 'r-*', 1: N, T_sim2, 'b-o', 'LineWidth', 1)
legend('真实值', '预测值')
xlabel('预测样本')
ylabel('预测结果')
string = {
    
    '测试集预测结果对比'; ['准确率=' num2str(error2) '%']};
title(string)
grid

References

[1] https://blog.csdn.net/kjm13182345320/article/details/128163536?spm=1001.2014.3001.5502
[2] https://blog.csdn.net/kjm13182345320/article/details/128151206?spm=1001.2014.3001.5502

Guess you like

Origin blog.csdn.net/kjm13182345320/article/details/132839611