generated from LufsX/Experiment-LogReg
This commit is contained in:
+2
-1
@@ -26,6 +26,7 @@ name = "廖运瑞"
|
|||||||
|
|
||||||
|
|
||||||
# 这里写自己的代码实现
|
# 这里写自己的代码实现
|
||||||
|
import numpy as np
|
||||||
from sklearn.preprocessing import MinMaxScaler
|
from sklearn.preprocessing import MinMaxScaler
|
||||||
from sklearn.model_selection import train_test_split
|
from sklearn.model_selection import train_test_split
|
||||||
|
|
||||||
@@ -139,4 +140,4 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
# 测试模型
|
# 测试模型
|
||||||
final_test_accuracy = accuracy(X_test, y_test, final_weights)
|
final_test_accuracy = accuracy(X_test, y_test, final_weights)
|
||||||
print(f"最终测试集的准确率: {final_test_accuracy:.4f}, 其他信息: {t[11]}")
|
print(f"最终测试集的准确率: {final_test_accuracy:.4f}")
|
||||||
Reference in New Issue
Block a user