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