我训练了一个线性回归模型来预测收入。
# features: 'Gender', 'Age', 'Occupation', 'HoursWorkedPerWeek', 'EducationLevel', 'EducationYears', 'Region', 'Race'
person_1_income = model.predict([[1, 47, 8, 40, 2, 13, 1, 1]])
print(person_1_income)
我包含了很多功能,我想让输入值的过程更加用户友好。 有没有办法以更有效的方式将用户输入传递给预测模型?理想情况下,在 Excel 中输入值 并将它们传递给预测模型。