📜  如何使用已经测试过的模型预测新数据的输出 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:41.389000             🧑  作者: Mango

代码示例1
data_2017 = pd.read_csv(data_path)
test_predictions = logmodel.predict(data_2017[['Daily Time Spent on Site', 'Age', 'Area Income','Daily Internet Usage', 'Male']])

or

data_2017["predictions"] = test_predictions