generated from LufsX/Experiment-LogReg
This commit is contained in:
+2
-2
@@ -26,8 +26,7 @@ name = "周佳成"
|
||||
|
||||
|
||||
# 这里写自己的代码实现
|
||||
|
||||
import pandas as pd
|
||||
import pandas as pd
|
||||
import numpy as np
|
||||
from sklearn.model_selection import train_test_split
|
||||
from sklearn.linear_model import LogisticRegression
|
||||
@@ -81,3 +80,4 @@ if __name__ == "__main__":
|
||||
model = train_logreg(X_train, y_train)
|
||||
y_pred = predict_logreg(model, X_test)
|
||||
print(f"Accuracy: {accuracy_score(y_test, y_pred)}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user