APP下载

基于集成学习算法的工业产品质量预测

2019-06-07江琨丁学明

软件导刊 2019年1期
关键词:随机森林数据挖掘

江琨 丁学明

摘 要:现代数字化工业生产中,制造、组装和测试过程会产生大量数据,这些数据中隐藏着决定产品质量的信息和知识。使用传统抽检手段发现质量问题后再加以修改往往为时已晚。数据挖掘中用生产参数预测产品质量,可以预先获取产品质量信息,据此进行调整以提高产品质量。采用CRISP-DM流程,使用集成学习算法(随机森林、XGBoost),利用回归与分类模型进行数据挖掘,经参数调节获得精确的优化模型,在生产中运用该模型有助于提升产品质量。

关键词:数据挖掘;CRISP-DM;质量预测;集成学习;随机森林;XGboost

DOI:10. 11907/rjdk. 181535

中图分类号:TP319文献标识码:A文章编号:1672-7800(2019)001-0124-04

Abstract: Huge amounts of data in manufacturing, assembly and testing are generated and stored in modern digitalized industrial production. The process data contains inherent knowledge and information, which determines the final quality that needs to be extracted by data mining. In the process of detecting product quality, it is usually late to fix after finding products with poor quality. In data mining, by using process data we can predict product quality in advance and make modifications. In this paper, by using CRISP-DM methodology and ensemble methods (Random Forests and XGBoost), we made a precise quality regression and classification prediction. Accurate optimized models are gained after parameter tuning. These models would be beneficial for improving product quality in practice.

Key Words:data mining; CRISP-DM; quality prediction; ensemble learning; random forests; XGBoost

0 引言

国务院提出的《中国制造2025》计划中,明确要求加快发展智能装备和产品,推动制造过程智能化,重点建设数字化工厂[1]。数据挖掘已广泛应用于数字化工厂的产品质量评估中[2]。Rostami等[3]将数据挖掘用于质量描述、质量分类、质量预测和参数优化,使用支持向量机进行质量评估。Chien等[4]使用k-平均聚类和决策树预测提高半导体的生产合格率。Sim等[5]使用贝叶斯网络分析PCB板制造中不合格产品的质量缺陷缘由。Liu等[6]使用人工神经网络进行电力能源消耗的时序分析。Tsai等[7] 使用决策树和随机森林帮助提升显示材料合格率。蒋晋文等[8]使用XGBoost算法进行制造业质量预测,并与其它集成学习算法进行比较。

跨行业数据挖掘标准流程[9](Cross Industry Standard Process for Data Mining,CRISP-DM)是实际应用中最常使用的一种数据挖掘流程模型。CRISP-DM将数据挖掘流程分为商业理解、数据理解、数据准备、数据建模、模型评估、部署6个步骤。 CRISP-DM流程如图1所示,各步骤间的顺序并非一成不变,根据情况经常有循环往复出现。

1 算法描述

1.1 集成学习

集成学习(ensemble learning)通過构建并结合多个学习器完成学习任务。如果各学习器类型相同,则称为基学习器(base learner),基学习器常用的学习算法有决策树算法、BP神经网络算法等[10]。分类问题通常使用投票法,回归问题通常使用加权平均法,将它们集合作为集成学习器输出[11]。

(2)个体学习器串行,如Boosting算法[13]。如图3所示,其中第[n]个学习器[fn]的权重Wn由之前一个学习器[fn-1]的表现所决定,使之前学习器中做错的训练样本在后续学习器中受到更多关注,以减小模型偏差[14]。

1.2 随机森林

随机森林[15]是一种改进Bagging算法,在随机采样基础上进一步随机选取属性,从而提高基学习器的多样性,提升集成学习器的泛化能力。在构建基学习器决策树时,随机森林随机选取特征集合中的一个子集,随后从这个子集中选取最佳特征进行划分。假设数据集一共有[d]个特征,每个基学习器包含[k]个特征。如果[k=d],则基学习器等同于传统决策树,通常情况下推荐[k=log2d]。

1.3 XGBoost

XGBoost(eXtreme Gradient Boosting)[16]是一种基于梯度提升(Gradient Boosting)[17]的改进集成算法。Gradient Boosting使用损失函数的负梯度[-?(L(yi,f(xi)))?f(xi)]作为残差的近似值,拟合一个回归树。XGBoost进一步对损失函数作二阶泰勒展开,并在目标函数中添加正则项,控制模型的复杂度,防止过拟合。此外,XGBoost和随机森林一样对特征集合进行抽样,增加样本多样性,降低过拟合。虽然XGBoost中基学习器仍然是串行产生,但是在基学习器,即决策树内部实现并行,从而大大缩短模型训练时间。

[5] SIM H, CHOI D, KIM C O. A data mining approach to the causal analysis of product faults in multi-stage PCB manufacturing[J]. International Journal of Precision Engineering and Manufacturing, 2014, 15(8):1563-1573.

[6] LIU H,YAO Z,EKLUND T,et al. Electricity consumption time series profiling: a data mining application in energy industry: advances in data Mining. applications and theoretical aspects[C]. Springer Berlin Heidelberg, 2012.

[7] TSAI T L,LEE C Y. Data mining for yield improvement of photo spacer process in color filter manufacturing[J]. Procedia Manufacturing, 2017(11):1958-1965.

[8] 蔣晋,刘伟. XGBoost算法在制造业质量预测中的应用[J]. 智能计算机与应用, 2017(6):58-60.

[9] SHEARER C. The CRISP-DM model: the new blueprint for data mining[J]. The Journal of Data Warehousing, 2000, 5(4):13-22.

[10] 周志华. 机器学习[M]. 北京:清华大学出版社, 2016:171-173.

[11] ZHOU Z H. Ensemble learning[J]. Encyclopedia of biometrics, 2015(2):411-416.

[12] BREIMAN L. Bagging predictors[J]. Machine Learning,1996,24(2):123-140.

[13] ZHOU Z. Ensemble methods: foundations and algorithms[M]. Boca Raton: CRC Press, 2012.

[14] DIETTERICH T G. Ensemble methods in machine learning: multiple classifier systems[C]. Springer Berlin Heidelberg, 2000.

[15] BREIMAN L. Random forests[J]. Machine Learning, 2001(45):5-32.

[16] CHEN T, GUESTRIN C. XGBoost: a scalable tree boosting system[C]. Proceedings of the 22Nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. New York, NY, USA: ACM, 2016: 785-794.

[17] FRIEDMAN J. Greedy function approximation: a gradient boosting machine[J]. The Annals of Statistics, 2000(29):49-55.

[18] NIELSEN D. Tree boosting with XGBoost why does XGBoost win“ Every” machine learning competition[C]. NTNU, 2016.

[19] CHAWLA N V, BOWYER K W, HALL L O, et al. SMOTE: synthetic minority over-sampling technique[J]. Journal of Artificial Intelligence Research, 2002(5):321-357.

[20] GUO H, LI Y, SHANG J, et al. Learning from class-imbalanced data: review of methods and applications[J]. Expert Systems with Applications, 2017(73):220-239.

[21] GóMEZ-RíOS A,LUENGO J,HERRERA F. A study on the noise label influence in boosting algorithms: AdaBoost, GBM and XGBoost[C]. Hybrid Artificial Intelligent Systems. Cham: Springer International Publishing, 2017: 268-280.

(责任编辑:杜能钢)

猜你喜欢

随机森林数据挖掘
基于并行计算的大数据挖掘在电网中的应用
拱坝变形监测预报的随机森林模型及应用
一种基于Hadoop的大数据挖掘云服务及应用
基于随机森林算法的B2B客户分级系统的设计
基于多视角特征融合与随机森林的蛋白质结晶预测
数据挖掘的分析与探索
基于GPGPU的离散数据挖掘研究