ML之回归预测之Lasso:利用Lasso算法对红酒品质wine数据集实现红酒口感评分预测(实数值评分预测)
ML之回归预测之Lasso:利用Lasso算法对红酒品质wine数据集实现红酒口感评分预测(实数值评分预测)
输出结果
设计思路
核心代码
t=3
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
linear_model.lasso_path(X, Y, return_models=False)
赞 (0)