The invention discloses a method for determining the latent variable number of partial least squares regression, which includes: selecting latent variable number, selecting N sub-training sets and corresponding N sub-test sets by interactive validation method based on collected samples; establishing N sub-models by using N sub-training sets, and using the sub-models corresponding to the sub-training sets to correspond to the sub-training sets. The sub-test set is used for prediction; the regression coefficients of each sub-model are recorded and the corresponding stability parameters of the number of latent variables are calculated according to the regression coefficients of each sub-model; another number of latent variables is selected and the steps of establishing multiple sub-models based on the sample using the interactive verification method are continued; and the latent variables corresponding to the maximum stability parameters are determined. Number is the optimal number of latent variables. The curve of stability parameter changing with the number of latent variables has the characteristics of rising first and then falling. It is convenient for the job candidates to determine the optimal number of latent variables, so as to establish a model with good stability.
【技术实现步骤摘要】
一种确定偏最小二乘回归潜变量数的方法
本专利技术涉及数据分析与处理领域,特别是涉及一种确定偏最小二乘回归潜变量数的方法。
技术介绍
数据分析是指用适当的统计分析方法对收集来的大量数据进行分析,提取有用信息和形成结论而对数据加以详细研究和概括总结的过程。在实用中,数据分析可帮助人们作出判断,以便采取适当行动。在某些特定的领域,如现代分析化学所要处理的化学数据往往是一些具有小样本数,但是却拥有很庞大的变量数的高维数据。这样的数据被称为“largep,smalln”问题,对于统计学这是一个很有挑战的问题。偏最小二乘回归(PLSR)是一种能够处理变量数多于样本数(p>n)问题的一种常用方法。潜变量(LV)数的确定决定着偏最小二乘回归模型的质量,用过少的潜变量数进行建模,会造成“欠拟合”(under-fitting),用过多的潜变量数进行建模又会造成“过拟合”(over-fitting)。目前最为常用的确定偏最小二乘回归模型潜变量数的方法是交互验证(CV)法。这种方法是将通过交互验证得到的交互验证均方根误差或决定系数作为标准来选取偏最小二乘回归模型的潜变量数,并认为能够得到最小交互验证均方根误差或最接近1的决定系数的潜变量数所建立的偏最小二乘回归模型为最优。但是以这种标准来选取潜变量数时,经常会遇到交互验证均方根误差一直减小(或决定系数一直趋近于1),或者是不同的潜变量数所建立的偏最小二乘回归模型的预测能力差别微小(或决定系数间差别微小),从而难以确定潜变量数的情况。这个时候如果还是按照这种原则确定潜变量数,往往会造成选择了过多的潜变量数进而造成偏最小二乘回归 ...
【技术保护点】
1.一种确定偏最小二乘回归潜变量数的方法,其特征在于,包括:计算各潜变量数对应的稳定性参数;确定所述稳定性参数最大时对应的潜变量数为最优潜变量数;其中,计算潜变量数对应的稳定性参数具体包括:基于采集到的样品,采用交互验证法选择N个子训练集和与之一一对应的N个子测试集;其中,所述N为正整数;利用各所述子训练集建立当前潜变量数对应的子模型,并利用与所述子训练集对应的子模型对与所述子训练集对应的子测试集进行预测;记录每个所述子模型的回归系数,并根据每个所述子模型的回归系数计算得到所述潜变量数对应的稳定性参数。
【技术特征摘要】
1.一种确定偏最小二乘回归潜变量数的方法,其特征在于,包括:计算各潜变量数对应的稳定性参数;确定所述稳定性参数最大时对应的潜变量数为最优潜变量数;其中,计算潜变量数对应的稳定性参数具体包括:基于采集到的样品,采用交互验证法选择N个子训练集和与之一一对应的N个子测试集;其中,所述N为正整数;利用各所述子训练集建立当前潜变量数对应的子模型,并利用与所述子训练集对应的子模型对与所述子训练集对应的子测试集进行预测;记录每个所述子模型的回归系数,并根据每个所述子模型的回归系数计算得到所述潜变量数对应的稳定性参数。2.根据权利要求1所述的方法,其特征在于,所述计算各潜变量数对应的稳定性参数具体包括:按从小到大的顺序排列各所述潜变量数;从最小的潜变量数开始,依次计算各所述潜变量数对应的稳定性参数并比较所述稳定性参数与上一次计算得到的稳定性参数的大小,直到稳定性参数连续减小的次数大于阈值为止。3.根据权利要求1所述的方法,其特征在于,还包括:计算各所述潜变量数对应的...
【专利技术属性】
技术研发人员:张辞海,彭黔荣,胡芸,刘娜,
申请(专利权)人:贵州中烟工业有限责任公司,
类型:发明
国别省市:贵州,52
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。