質問編集履歴
1
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -7,6 +7,8 @@
|
|
7
7
|
|
8
8
|
|
9
9
|
```ここに言語を入力
|
10
|
+
|
11
|
+
from sklearn.model_selection import train_test_split
|
10
12
|
|
11
13
|
from sklearn.datasets import load_iris
|
12
14
|
|
@@ -18,7 +20,7 @@
|
|
18
20
|
|
19
21
|
y = iris.target
|
20
22
|
|
21
|
-
X_train, X_test, y_train, y_test = train_test_split(X, y, s
|
23
|
+
X_train, X_test, y_train, y_test = train_test_split(X, y, stratify=y, test_size=0.3)
|
22
24
|
|
23
25
|
|
24
26
|
|