简单介绍一个逻辑回归算法的例子
例子:通过计算自己的复习时长和复习效率,计算是否能考试985高校。
from sklearn.linear_model import LogisticRegression
# 复习情况,格式为[时长,效率]
x_train=[(0,0),(7,0.9),(15,0.4),(13,0.9),(15,0.4),(16,0.4),(16,0.8),(15,0.7),(17,0.2),(7.5,0.8),(17,0.9),(18,0.1),(18,0.6),(18,0.8)]
y_t