APP下载

基于随机森林的光谱分类模型研究

2021-10-16袁正熙

现代信息科技 2021年7期

摘要:文章第一节介绍集成算法原理;第二节系统理论地说明了Bagging算法;第三节介绍随机森林算法;第四节介绍实验内容以及程序模块,利用Python实现光谱数据的分类并评估结果,然后实行调参,得到最优的参数搭配;第五节对优化模型进行测试,与原模型比较准确率、查准率、召回率、F-score值等指标,发现优化后的结果优良;第六节总结随机森林算法的优缺点。

关键词:集成学习;Bagging;随机森林

中图分类号:TP273.4 文献标识码:A  文章编号:2096-4706(2021)07-0081-04

Study on Spectral Classification Model Based on Random Forest

YUAN Zhengxi

(South China Normal University,Guangzhou  510631,China)

Abstract:In this paper,the first section introduces the principle of the ensemble algorithm;in the second section,the Bagging algorithm is explained systematically and theoretically;the third section introduces the random forest algorithm;the fourth section introduces the experimental content and program modules,Python is used to classify the spectral data and evaluate the results,and then adjust the parameters to obtain the optimal parameter matching;the fifth section tests the optimized model and compares the indexes of the accuracy,precision,recall and F-score value with the original model. It is found that the optimized result is excellent;the sixth section summarizes the advantages and disadvantages of random forest algorithm.

Keywords:ensemble learning;Bagging;random forest

收稿日期:2021-03-20

0  引  言

機器学习,一般来说是致力于研究如何通过计算的手段、利用经验来改善系统自身性能的一种方法。对于机器学习而言,“经验”往往是以数据形式储存起来的。机器改善性能的方法是通过数据的不断训练产生“模型”,继而使得该“模型”能够尽可能地适用于更多的数据。目前,机器学习有多种算法,比如:决策树、神经网络、支持向量机、贝叶斯分类、LDA,等等。通常来说,一个研究可以使用多种算法,而集成学习则能够结合多个算法使得机器学习具有更好的效果以及更优越的泛化性能。

1  Bagging算法

集成学习的方法有并行和串行两种,Bagging算法是并行式集成学习方法最著名的代表。Bagging是基于Boostrap Sampling采样方法,给定m个样本的数据集,随机取出一个样本,接着再把刚才抽到的样本放回数据集中,由此使得下一次抽样的数据集与上一次的情形完全相同。这样,经过m次抽取,我们得到m个样本集。根据Boostrap Sampling采样方法,这m个样本集里的某些元素可能重复多次,也可能有部分样本未出现在样本集中。……

登录APP查看全文