将用户输入从 Excel 传递到 Python 中的预测模型

问题描述 投票:0回答:0

我训练了一个线性回归模型来预测收入。

# 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 中输入值 并将它们传递给预测模型。

python excel linear-regression user-input
© www.soinside.com 2019 - 2024. All rights reserved.