generated from LufsX/Experiment-LogReg
This commit is contained in:
@@ -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):
|
||||
"""
|
||||
从文件中加载数据,若不自行正确实现,则无法通过评测,**不记录成绩**。
|
||||
|
||||
Reference in New Issue
Block a user