Classification prediction | MATLAB implements multi-input classification prediction based on SVM-Adaboost support vector machine combined with AdaBoost

Classification prediction | MATLAB implements multi-input classification prediction based on SVM-Adaboost support vector machine combined with AdaBoost

Prediction effect

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

basic introduction

1.MATLAB implements multi-input classification prediction based on SVM-Adaboost support vector machine combined with AdaBoost;
2. The running environment is Matlab2018b;
3. Input multiple features and predict into four categories;
4.data is a data set, excel data, and the first multiple columns Input and finally output four types of labels, just run the main program, and put all files in one folder;
5. Visually display the classification accuracy.

Model description

SVM-Adaboost support vector machine combined with AdaBoost multi-input classification prediction is a prediction method based on machine learning and ensemble learning. Its main idea is to combine the support vector machine (SVM) and the AdaBoost algorithm to make predictions through a multi-input model.
The specific process is as follows:
Data preprocessing: perform preprocessing steps such as cleaning, normalization and segmentation of the original data.
Feature extraction: Use the SVM model to extract features from the data and obtain multiple feature vectors as input to the AdaBoost algorithm.
AdaBoost model training: Use the AdaBoost algorithm to weightedly combine multiple feature vectors to obtain the final prediction result.
Model evaluation: Evaluate the prediction results.
Model optimization: Optimize the model based on the evaluation results. You can try to adjust the parameters of the model, change the parameters of the AdaBoost algorithm, etc.
Prediction application: Apply the optimized model to actual prediction tasks to make real-time predictions.
The advantage of this method is that the SVM model can extract data features, and the AdaBoost algorithm can effectively use multiple feature vectors for weighted combination to improve prediction accuracy. At the same time, this method is not only suitable for prediction tasks with a single data source, but can also be applied to integrated prediction tasks with multiple data sources. The disadvantage is that this method has high requirements on data volume and computing resources, and requires a large amount of training data and computing power.

programming

  • Complete source code and data acquisition method: private message reply SVM-Adaboost support vector machine combined with AdaBoost multi-input classification prediction .
%% 预测
t_sim1 = predict(net, p_train); 
t_sim2 = predict(net, p_test ); 

%%  数据反归一化
T_sim1 = mapminmax('reverse', t_sim1, ps_output);
T_sim2 = mapminmax('reverse', t_sim2, ps_output);

%%  均方根误差
error1 = sqrt(sum((T_sim1' - T_train).^2) ./ M);
error2 = sqrt(sum((T_sim2' - T_test ).^2) ./ N);


%%  相关指标计算
%  R2
R1 = 1 - norm(T_train - T_sim1')^2 / norm(T_train - mean(T_train))^2;
R2 = 1 - norm(T_test  - T_sim2')^2 / norm(T_test  - mean(T_test ))^2;

disp(['训练集数据的R2为:', num2str(R1)])
disp(['测试集数据的R2为:', num2str(R2)])

%  MAE
mae1 = sum(abs(T_sim1' - T_train)) ./ M ;
mae2 = sum(abs(T_sim2' - T_test )) ./ N ;

disp(['训练集数据的MAE为:', num2str(mae1)])
disp(['测试集数据的MAE为:', num2str(mae2)])

%% 平均绝对百分比误差MAPE
MAPE1 = mean(abs((T_train - T_sim1')./T_train));
MAPE2 = mean(abs((T_test - T_sim2')./T_test));

disp(['训练集数据的MAPE为:', num2str(MAPE1)])
disp(['测试集数据的MAPE为:', num2str(MAPE2)])

%  MBE
mbe1 = sum(abs(T_sim1' - T_train)) ./ M ;
mbe2 = sum(abs(T_sim1' - T_train)) ./ N ;

disp(['训练集数据的MBE为:', num2str(mbe1)])
disp(['测试集数据的MBE为:', num2str(mbe2)])

%均方误差 MSE
mse1 = sum((T_sim1' - T_train).^2)./M;
mse2 = sum((T_sim2' - T_test).^2)./N;

disp(['训练集数据的MSE为:', num2str(mse1)])
disp(['测试集数据的MSE为:', num2str(mse2)])

References

[1] https://blog.csdn.net/kjm13182345320/article/details/128577926?spm=1001.2014.3001.5501
[2] https://blog.csdn.net/kjm13182345320/article/details/128573597?spm=1001.2014.3001.5501

Guess you like

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