質問編集履歴
2
定性
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
pythonでランダムフォレストを行い,データを三分類して評価モデルをつくろうとしています。
|
2
|
-
その際にどのデータがどこに分類されたかをtrainのトレーニングデータとtestのテストデータの結果を以下で出力しています。
|
2
|
+
その際にどのデータがどこに分類されたかをtrainのトレーニングデータとtestのテストデータの結果を以下でpathのファイルに出力しています。
|
3
3
|
|
4
4
|
```python
|
5
5
|
|
1
変更
title
CHANGED
File without changes
|
body
CHANGED
@@ -3,8 +3,12 @@
|
|
3
3
|
|
4
4
|
```python
|
5
5
|
|
6
|
+
with open (path2, 'a') as f:
|
7
|
+
print(test_y, file=f)
|
8
|
+
|
9
|
+
with open (path2, 'a') as f:
|
6
|
-
print(train_y)
|
10
|
+
print(train_y, file=f)
|
7
|
-
|
11
|
+
|
8
12
|
```
|
9
13
|
|
10
14
|
すると以下のように省略されて出力されてしまいます。
|