diff --git a/function.py b/function.py index 1e4e8ef..a03cb8c 100644 --- a/function.py +++ b/function.py @@ -1,4 +1,5 @@ import numpy as np +import pandas as pd """ 实验说明: @@ -60,6 +61,7 @@ def predict_logreg(inX, weights): y_predicted = 1 / (1 + np.exp(-linear_model)) return 1 if y_predicted > 0.5 else 0 +# 这里也写自己的代码实现 def load_data(filepath): """ 从文件中加载数据,若不自行正确实现,则无法通过评测,**不记录成绩**。