ML之回归预测之Lasso:利用Lasso算法解决回归(实数值评分预测)问题—采用10折交叉验证(测试集error)来评估LassoCV模型


输出结果

设计思路

核心代码

if t==1:
    X = numpy.array(xList)         #Unnormalized X's
    # X = numpy.array(xNormalized)   #Normlized Xss
    Y = numpy.array(labels)          #Unnormalized labels
    # Y = numpy.array(labelNormalized) #normalized lables
elif t==2:
    X = numpy.array(xList)           #Unnormalized X's
    X = numpy.array(xNormalized)     #Normlized Xss
    Y = numpy.array(labels)          #Unnormalized labels
    Y = numpy.array(labelNormalized) #normalized lables
elif t==3:
    X = numpy.array(xList)           #Unnormalized X's
    X = numpy.array(xNormalized)     #Normlized Xss
    Y = numpy.array(labels)          #Unnormalized labels
    # Y = numpy.array(labelNormalized) #normalized lables
(0)

相关推荐