generated from LufsX/Challenge-SVM
This commit is contained in:
+2
-1
@@ -89,7 +89,8 @@ def load_data(filepath):
|
|||||||
- np.array: 特征数据。
|
- np.array: 特征数据。
|
||||||
- np.array: 标签数据。
|
- np.array: 标签数据。
|
||||||
"""
|
"""
|
||||||
data = np.loadtxt(filepath, delimiter=',', dtype=str, comments=None)
|
# 使用空格作为分隔符加载数据
|
||||||
|
data = np.loadtxt(filepath, delimiter=' ', dtype=str, comments=None)
|
||||||
|
|
||||||
# 检查数据的维度
|
# 检查数据的维度
|
||||||
if data.ndim == 1:
|
if data.ndim == 1:
|
||||||
|
|||||||
Reference in New Issue
Block a user