質問編集履歴
1
iris.txtの中身を掲載しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Google Collaboratoryに関する質問です.
|
1
|
+
`Google Collaboratoryに関する質問です.
|
2
2
|
|
3
3
|
以下はirisというデータセットを用いて最近傍法(K-nn法)というデータ分類を行うプログラムです.
|
4
4
|
|
@@ -105,3 +105,311 @@
|
|
105
105
|
AttributeError: '_io.TextIOWrapper' object has no attribute 'data'
|
106
106
|
|
107
107
|
```
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
```iris.txt
|
112
|
+
|
113
|
+
5.1 3.5 1.4 0.2 1.0
|
114
|
+
|
115
|
+
4.9 3.0 1.4 0.2 1.0
|
116
|
+
|
117
|
+
4.7 3.2 1.3 0.2 1.0
|
118
|
+
|
119
|
+
4.6 3.1 1.5 0.2 1.0
|
120
|
+
|
121
|
+
5.0 3.6 1.4 0.2 1.0
|
122
|
+
|
123
|
+
5.4 3.9 1.7 0.4 1.0
|
124
|
+
|
125
|
+
4.6 3.4 1.4 0.3 1.0
|
126
|
+
|
127
|
+
5.0 3.4 1.5 0.2 1.0
|
128
|
+
|
129
|
+
4.4 2.9 1.4 0.2 1.0
|
130
|
+
|
131
|
+
4.9 3.1 1.5 0.1 1.0
|
132
|
+
|
133
|
+
5.4 3.7 1.5 0.2 1.0
|
134
|
+
|
135
|
+
4.8 3.4 1.6 0.2 1.0
|
136
|
+
|
137
|
+
4.8 3.0 1.4 0.1 1.0
|
138
|
+
|
139
|
+
4.3 3.0 1.1 0.1 1.0
|
140
|
+
|
141
|
+
5.8 4.0 1.2 0.2 1.0
|
142
|
+
|
143
|
+
5.7 4.4 1.5 0.4 1.0
|
144
|
+
|
145
|
+
5.4 3.9 1.3 0.4 1.0
|
146
|
+
|
147
|
+
5.1 3.5 1.4 0.3 1.0
|
148
|
+
|
149
|
+
5.7 3.8 1.7 0.3 1.0
|
150
|
+
|
151
|
+
5.1 3.8 1.5 0.3 1.0
|
152
|
+
|
153
|
+
5.4 3.4 1.7 0.2 1.0
|
154
|
+
|
155
|
+
5.1 3.7 1.5 0.4 1.0
|
156
|
+
|
157
|
+
4.6 3.6 1.0 0.2 1.0
|
158
|
+
|
159
|
+
5.1 3.3 1.7 0.5 1.0
|
160
|
+
|
161
|
+
4.8 3.4 1.9 0.2 1.0
|
162
|
+
|
163
|
+
5.0 3.0 1.6 0.2 1.0
|
164
|
+
|
165
|
+
5.0 3.4 1.6 0.4 1.0
|
166
|
+
|
167
|
+
5.2 3.5 1.5 0.2 1.0
|
168
|
+
|
169
|
+
5.2 3.4 1.4 0.2 1.0
|
170
|
+
|
171
|
+
4.7 3.2 1.6 0.2 1.0
|
172
|
+
|
173
|
+
4.8 3.1 1.6 0.2 1.0
|
174
|
+
|
175
|
+
5.4 3.4 1.5 0.4 1.0
|
176
|
+
|
177
|
+
5.2 4.1 1.5 0.1 1.0
|
178
|
+
|
179
|
+
5.5 4.2 1.4 0.2 1.0
|
180
|
+
|
181
|
+
4.9 3.1 1.5 0.2 1.0
|
182
|
+
|
183
|
+
5.0 3.2 1.2 0.2 1.0
|
184
|
+
|
185
|
+
5.5 3.5 1.3 0.2 1.0
|
186
|
+
|
187
|
+
4.9 3.6 1.4 0.1 1.0
|
188
|
+
|
189
|
+
4.4 3.0 1.3 0.2 1.0
|
190
|
+
|
191
|
+
5.1 3.4 1.5 0.2 1.0
|
192
|
+
|
193
|
+
5.0 3.5 1.3 0.3 1.0
|
194
|
+
|
195
|
+
4.5 2.3 1.3 0.3 1.0
|
196
|
+
|
197
|
+
4.4 3.2 1.3 0.2 1.0
|
198
|
+
|
199
|
+
5.0 3.5 1.6 0.6 1.0
|
200
|
+
|
201
|
+
5.1 3.8 1.9 0.4 1.0
|
202
|
+
|
203
|
+
4.8 3.0 1.4 0.3 1.0
|
204
|
+
|
205
|
+
5.1 3.8 1.6 0.2 1.0
|
206
|
+
|
207
|
+
4.6 3.2 1.4 0.2 1.0
|
208
|
+
|
209
|
+
5.3 3.7 1.5 0.2 1.0
|
210
|
+
|
211
|
+
5.0 3.3 1.4 0.2 1.0
|
212
|
+
|
213
|
+
7.0 3.2 4.7 1.4 2.0
|
214
|
+
|
215
|
+
6.4 3.2 4.5 1.5 2.0
|
216
|
+
|
217
|
+
6.9 3.1 4.9 1.5 2.0
|
218
|
+
|
219
|
+
5.5 2.3 4.0 1.3 2.0
|
220
|
+
|
221
|
+
6.5 2.8 4.6 1.5 2.0
|
222
|
+
|
223
|
+
5.7 2.8 4.5 1.3 2.0
|
224
|
+
|
225
|
+
6.3 3.3 4.7 1.6 2.0
|
226
|
+
|
227
|
+
4.9 2.4 3.3 1.0 2.0
|
228
|
+
|
229
|
+
6.6 2.9 4.6 1.3 2.0
|
230
|
+
|
231
|
+
5.2 2.7 3.9 1.4 2.0
|
232
|
+
|
233
|
+
5.0 2.0 3.5 1.0 2.0
|
234
|
+
|
235
|
+
5.9 3.0 4.2 1.5 2.0
|
236
|
+
|
237
|
+
6.0 2.2 4.0 1.0 2.0
|
238
|
+
|
239
|
+
6.1 2.9 4.7 1.4 2.0
|
240
|
+
|
241
|
+
5.6 2.9 3.6 1.3 2.0
|
242
|
+
|
243
|
+
6.7 3.1 4.5 1.4 2.0
|
244
|
+
|
245
|
+
4.6 3.0 4.5 1.5 2.0
|
246
|
+
|
247
|
+
5.8 2.7 4.1 1.0 2.0
|
248
|
+
|
249
|
+
6.2 2.2 4.5 1.5 2.0
|
250
|
+
|
251
|
+
5.6 2.5 3.9 1.1 2.0
|
252
|
+
|
253
|
+
5.9 3.2 4.8 1.8 2.0
|
254
|
+
|
255
|
+
6.1 2.8 4.0 1.3 2.0
|
256
|
+
|
257
|
+
6.3 2.5 4.9 1.5 2.0
|
258
|
+
|
259
|
+
6.1 2.8 4.7 1.2 2.0
|
260
|
+
|
261
|
+
6.4 2.9 4.3 1.3 2.0
|
262
|
+
|
263
|
+
6.6 3.0 4.9 1.4 2.0
|
264
|
+
|
265
|
+
6.8 2.8 4.8 1.4 2.0
|
266
|
+
|
267
|
+
6.7 3.0 5.0 1.7 2.0
|
268
|
+
|
269
|
+
6.0 2.9 4.5 1.5 2.0
|
270
|
+
|
271
|
+
5.7 2.6 3.5 1.0 2.0
|
272
|
+
|
273
|
+
5.5 2.4 3.8 1.1 2.0
|
274
|
+
|
275
|
+
5.5 2.4 3.7 1.0 2.0
|
276
|
+
|
277
|
+
5.8 2.7 3.9 1.2 2.0
|
278
|
+
|
279
|
+
6.0 2.7 5.1 1.6 2.0
|
280
|
+
|
281
|
+
5.4 3.0 4.5 1.5 2.0
|
282
|
+
|
283
|
+
6.0 3.4 4.5 1.6 2.0
|
284
|
+
|
285
|
+
6.7 3.1 4.7 1.5 2.0
|
286
|
+
|
287
|
+
6.3 2.3 4.4 1.3 2.0
|
288
|
+
|
289
|
+
5.6 3.0 4.1 1.3 2.0
|
290
|
+
|
291
|
+
5.5 2.5 4.0 1.3 2.0
|
292
|
+
|
293
|
+
5.5 2.6 4.4 1.2 2.0
|
294
|
+
|
295
|
+
6.1 3.0 4.6 1.4 2.0
|
296
|
+
|
297
|
+
5.8 2.6 4.0 1.2 2.0
|
298
|
+
|
299
|
+
5.0 2.3 3.3 1.0 2.0
|
300
|
+
|
301
|
+
5.6 2.7 4.2 1.3 2.0
|
302
|
+
|
303
|
+
5.7 3.0 4.2 1.2 2.0
|
304
|
+
|
305
|
+
5.7 2.9 4.2 1.3 2.0
|
306
|
+
|
307
|
+
6.2 2.9 4.3 1.3 2.0
|
308
|
+
|
309
|
+
5.1 2.5 3.0 1.1 2.0
|
310
|
+
|
311
|
+
5.7 2.8 4.1 1.3 2.0
|
312
|
+
|
313
|
+
6.3 3.3 6.0 2.5 3.0
|
314
|
+
|
315
|
+
5.8 2.7 5.1 1.9 3.0
|
316
|
+
|
317
|
+
7.1 3.0 5.9 2.1 3.0
|
318
|
+
|
319
|
+
6.3 2.9 5.6 1.8 3.0
|
320
|
+
|
321
|
+
6.5 3.0 5.8 2.2 3.0
|
322
|
+
|
323
|
+
7.6 3.0 6.6 2.1 3.0
|
324
|
+
|
325
|
+
4.9 2.5 4.5 1.7 3.0
|
326
|
+
|
327
|
+
7.3 2.9 6.3 1.8 3.0
|
328
|
+
|
329
|
+
6.7 2.5 5.8 1.8 3.0
|
330
|
+
|
331
|
+
7.2 3.6 6.1 2.5 3.0
|
332
|
+
|
333
|
+
6.5 3.2 5.1 2.0 3.0
|
334
|
+
|
335
|
+
6.4 2.7 5.3 1.9 3.0
|
336
|
+
|
337
|
+
6.8 3.0 5.5 2.1 3.0
|
338
|
+
|
339
|
+
5.7 2.5 5.0 2.0 3.0
|
340
|
+
|
341
|
+
5.8 2.8 5.1 2.4 3.0
|
342
|
+
|
343
|
+
6.4 3.2 5.3 2.3 3.0
|
344
|
+
|
345
|
+
6.5 3.0 5.5 1.8 3.0
|
346
|
+
|
347
|
+
7.7 3.8 6.7 2.2 3.0
|
348
|
+
|
349
|
+
7.7 2.6 6.9 2.3 3.0
|
350
|
+
|
351
|
+
6.0 2.2 5.0 1.5 3.0
|
352
|
+
|
353
|
+
6.9 3.2 5.7 2.3 3.0
|
354
|
+
|
355
|
+
5.6 2.8 4.9 2.0 3.0
|
356
|
+
|
357
|
+
7.7 2.8 6.7 2.0 3.0
|
358
|
+
|
359
|
+
6.3 2.7 4.9 1.8 3.0
|
360
|
+
|
361
|
+
6.7 3.3 5.7 2.1 3.0
|
362
|
+
|
363
|
+
7.2 3.2 6.0 1.8 3.0
|
364
|
+
|
365
|
+
6.2 2.8 4.8 1.8 3.0
|
366
|
+
|
367
|
+
6.1 3.0 4.9 1.8 3.0
|
368
|
+
|
369
|
+
6.4 2.8 5.6 2.1 3.0
|
370
|
+
|
371
|
+
7.2 3.0 5.8 1.6 3.0
|
372
|
+
|
373
|
+
7.4 2.8 6.1 1.9 3.0
|
374
|
+
|
375
|
+
7.9 3.8 6.4 2.0 3.0
|
376
|
+
|
377
|
+
6.4 2.8 5.6 2.2 3.0
|
378
|
+
|
379
|
+
6.3 2.8 5.1 1.5 3.0
|
380
|
+
|
381
|
+
6.1 2.6 5.6 1.4 3.0
|
382
|
+
|
383
|
+
7.7 3.0 6.1 2.3 3.0
|
384
|
+
|
385
|
+
6.3 3.4 5.6 2.4 3.0
|
386
|
+
|
387
|
+
6.4 3.1 5.5 1.8 3.0
|
388
|
+
|
389
|
+
6.0 3.0 4.8 1.8 3.0
|
390
|
+
|
391
|
+
6.9 3.1 5.4 2.1 3.0
|
392
|
+
|
393
|
+
6.7 3.1 5.6 2.4 3.0
|
394
|
+
|
395
|
+
6.9 3.1 5.1 2.3 3.0
|
396
|
+
|
397
|
+
5.8 2.7 5.1 1.9 3.0
|
398
|
+
|
399
|
+
6.8 3.2 5.9 2.3 3.0
|
400
|
+
|
401
|
+
6.7 3.3 5.7 2.5 3.0
|
402
|
+
|
403
|
+
6.7 3.0 5.2 2.3 3.0
|
404
|
+
|
405
|
+
6.3 2.5 5.0 1.9 3.0
|
406
|
+
|
407
|
+
6.5 3.0 5.2 2.0 3.0
|
408
|
+
|
409
|
+
6.2 3.4 5.4 2.3 3.0
|
410
|
+
|
411
|
+
5.0 3.0 5.1 1.8 3.0
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
```
|