from sklearn.linear_model import Logistic Regression # 导入Sklearn模型 lr = Logistic Regression() # 逻辑回归模型 history = lr.fit(X_train, y_train) # 训练机器 print("逻辑回归预测准确率 {:.2f}%".format(lr.score(X_test, y_test)*100))