|
62 | 62 | "metadata": {
|
63 | 63 | "id": "uMcZ58AknJth"
|
64 | 64 | },
|
65 |
| - "execution_count": 3, |
| 65 | + "execution_count": 1, |
66 | 66 | "outputs": []
|
67 | 67 | },
|
68 | 68 | {
|
|
83 | 83 | "height": 328
|
84 | 84 | },
|
85 | 85 | "id": "iFFnIJRJnRbU",
|
86 |
| - "outputId": "4092f216-dca5-4f29-bbd7-bfef90f88b29" |
| 86 | + "outputId": "073896f8-66d6-4940-c21d-fd1fa93a47a3" |
87 | 87 | },
|
88 |
| - "execution_count": 4, |
| 88 | + "execution_count": 2, |
89 | 89 | "outputs": [
|
90 | 90 | {
|
91 | 91 | "output_type": "execute_result",
|
|
187 | 187 | ]
|
188 | 188 | },
|
189 | 189 | "metadata": {},
|
190 |
| - "execution_count": 4 |
| 190 | + "execution_count": 2 |
191 | 191 | }
|
192 | 192 | ]
|
193 | 193 | },
|
|
226 | 226 | "height": 1000
|
227 | 227 | },
|
228 | 228 | "id": "4YBfEadpndMK",
|
229 |
| - "outputId": "29e5faa7-cbe5-43d7-8890-9504dff71547" |
| 229 | + "outputId": "a1473766-621f-4827-c57e-d12ea37fa1a0" |
230 | 230 | },
|
231 |
| - "execution_count": 5, |
| 231 | + "execution_count": 3, |
232 | 232 | "outputs": [
|
233 | 233 | {
|
234 | 234 | "output_type": "stream",
|
|
258 | 258 | "Init: initializing centroids\n",
|
259 | 259 | "Init: initializing clusters\n",
|
260 | 260 | "Starting iterations...\n",
|
261 |
| - "Run 1, iteration: 1/100, moves: 3, cost: 9.0\n", |
262 |
| - "Run 1, iteration: 2/100, moves: 0, cost: 9.0\n", |
| 261 | + "Run 1, iteration: 1/100, moves: 1, cost: 9.0\n", |
263 | 262 | "Init: initializing centroids\n",
|
264 | 263 | "Init: initializing clusters\n",
|
265 | 264 | "Starting iterations...\n",
|
266 |
| - "Run 2, iteration: 1/100, moves: 0, cost: 11.0\n", |
| 265 | + "Run 2, iteration: 1/100, moves: 0, cost: 9.0\n", |
267 | 266 | "Init: initializing centroids\n",
|
268 | 267 | "Init: initializing clusters\n",
|
269 | 268 | "Starting iterations...\n",
|
270 |
| - "Run 3, iteration: 1/100, moves: 0, cost: 11.0\n", |
| 269 | + "Run 3, iteration: 1/100, moves: 0, cost: 9.0\n", |
271 | 270 | "Init: initializing centroids\n",
|
272 | 271 | "Init: initializing clusters\n",
|
273 | 272 | "Starting iterations...\n",
|
274 |
| - "Run 4, iteration: 1/100, moves: 2, cost: 11.0\n", |
| 273 | + "Run 4, iteration: 1/100, moves: 1, cost: 9.0\n", |
275 | 274 | "Init: initializing centroids\n",
|
276 | 275 | "Init: initializing clusters\n",
|
277 | 276 | "Starting iterations...\n",
|
278 |
| - "Run 5, iteration: 1/100, moves: 0, cost: 11.0\n", |
| 277 | + "Run 5, iteration: 1/100, moves: 3, cost: 9.0\n", |
| 278 | + "Run 5, iteration: 2/100, moves: 0, cost: 9.0\n", |
279 | 279 | "Best run was number 1\n",
|
280 | 280 | "Init: initializing centroids\n",
|
281 | 281 | "Init: initializing clusters\n",
|
282 | 282 | "Starting iterations...\n",
|
283 |
| - "Run 1, iteration: 1/100, moves: 0, cost: 6.0\n", |
| 283 | + "Run 1, iteration: 1/100, moves: 1, cost: 7.0\n", |
| 284 | + "Run 1, iteration: 2/100, moves: 1, cost: 7.0\n", |
284 | 285 | "Init: initializing centroids\n",
|
285 | 286 | "Init: initializing clusters\n",
|
286 | 287 | "Starting iterations...\n",
|
287 | 288 | "Run 2, iteration: 1/100, moves: 0, cost: 9.0\n",
|
288 | 289 | "Init: initializing centroids\n",
|
289 | 290 | "Init: initializing clusters\n",
|
290 | 291 | "Starting iterations...\n",
|
291 |
| - "Run 3, iteration: 1/100, moves: 3, cost: 6.0\n", |
292 |
| - "Run 3, iteration: 2/100, moves: 0, cost: 6.0\n", |
| 292 | + "Run 3, iteration: 1/100, moves: 0, cost: 7.0\n", |
293 | 293 | "Init: initializing centroids\n",
|
294 | 294 | "Init: initializing clusters\n",
|
295 | 295 | "Starting iterations...\n",
|
296 |
| - "Run 4, iteration: 1/100, moves: 2, cost: 8.0\n", |
| 296 | + "Run 4, iteration: 1/100, moves: 0, cost: 6.0\n", |
297 | 297 | "Init: initializing centroids\n",
|
298 | 298 | "Init: initializing clusters\n",
|
299 | 299 | "Starting iterations...\n",
|
300 |
| - "Run 5, iteration: 1/100, moves: 2, cost: 9.0\n", |
301 |
| - "Best run was number 1\n", |
| 300 | + "Run 5, iteration: 1/100, moves: 0, cost: 8.0\n", |
| 301 | + "Best run was number 4\n", |
302 | 302 | "Init: initializing centroids\n",
|
303 | 303 | "Init: initializing clusters\n",
|
304 | 304 | "Starting iterations...\n",
|
305 |
| - "Run 1, iteration: 1/100, moves: 2, cost: 5.0\n", |
306 |
| - "Run 1, iteration: 2/100, moves: 0, cost: 5.0\n", |
| 305 | + "Run 1, iteration: 1/100, moves: 0, cost: 6.0\n", |
307 | 306 | "Init: initializing centroids\n",
|
308 | 307 | "Init: initializing clusters\n",
|
309 | 308 | "Starting iterations...\n",
|
310 | 309 | "Run 2, iteration: 1/100, moves: 1, cost: 6.0\n",
|
311 | 310 | "Init: initializing centroids\n",
|
312 | 311 | "Init: initializing clusters\n",
|
313 | 312 | "Starting iterations...\n",
|
314 |
| - "Run 3, iteration: 1/100, moves: 0, cost: 8.0\n", |
| 313 | + "Run 3, iteration: 1/100, moves: 2, cost: 4.0\n", |
315 | 314 | "Init: initializing centroids\n",
|
316 | 315 | "Init: initializing clusters\n",
|
317 | 316 | "Starting iterations...\n",
|
318 |
| - "Run 4, iteration: 1/100, moves: 1, cost: 4.0\n", |
319 |
| - "Run 4, iteration: 2/100, moves: 1, cost: 4.0\n", |
| 317 | + "Run 4, iteration: 1/100, moves: 1, cost: 6.0\n", |
320 | 318 | "Init: initializing centroids\n",
|
321 | 319 | "Init: initializing clusters\n",
|
322 | 320 | "Starting iterations...\n",
|
323 |
| - "Run 5, iteration: 1/100, moves: 1, cost: 5.0\n", |
324 |
| - "Run 5, iteration: 2/100, moves: 1, cost: 5.0\n", |
325 |
| - "Best run was number 4\n" |
| 321 | + "Run 5, iteration: 1/100, moves: 0, cost: 6.0\n", |
| 322 | + "Best run was number 3\n" |
326 | 323 | ]
|
327 | 324 | },
|
328 | 325 | {
|
|
356 | 353 | "base_uri": "https://localhost:8080/"
|
357 | 354 | },
|
358 | 355 | "id": "LuQVfC6SnvcK",
|
359 |
| - "outputId": "09653726-713d-49f2-f71b-72818632cba2" |
| 356 | + "outputId": "66163801-106e-483a-9b5d-3d5af5657af8" |
360 | 357 | },
|
361 |
| - "execution_count": 6, |
| 358 | + "execution_count": 4, |
362 | 359 | "outputs": [
|
363 | 360 | {
|
364 | 361 | "output_type": "stream",
|
|
367 | 364 | "Init: initializing centroids\n",
|
368 | 365 | "Init: initializing clusters\n",
|
369 | 366 | "Starting iterations...\n",
|
370 |
| - "Run 1, iteration: 1/100, moves: 0, cost: 8.0\n", |
| 367 | + "Run 1, iteration: 1/100, moves: 3, cost: 7.0\n", |
| 368 | + "Run 1, iteration: 2/100, moves: 0, cost: 7.0\n", |
371 | 369 | "Init: initializing centroids\n",
|
372 | 370 | "Init: initializing clusters\n",
|
373 | 371 | "Starting iterations...\n",
|
374 |
| - "Run 2, iteration: 1/100, moves: 2, cost: 6.0\n", |
375 |
| - "Run 2, iteration: 2/100, moves: 0, cost: 6.0\n", |
| 372 | + "Run 2, iteration: 1/100, moves: 0, cost: 7.0\n", |
376 | 373 | "Init: initializing centroids\n",
|
377 | 374 | "Init: initializing clusters\n",
|
378 | 375 | "Starting iterations...\n",
|
379 | 376 | "Run 3, iteration: 1/100, moves: 2, cost: 6.0\n",
|
380 |
| - "Run 3, iteration: 2/100, moves: 1, cost: 6.0\n", |
| 377 | + "Run 3, iteration: 2/100, moves: 0, cost: 6.0\n", |
381 | 378 | "Init: initializing centroids\n",
|
382 | 379 | "Init: initializing clusters\n",
|
383 | 380 | "Starting iterations...\n",
|
384 |
| - "Run 4, iteration: 1/100, moves: 0, cost: 7.0\n", |
| 381 | + "Run 4, iteration: 1/100, moves: 1, cost: 8.0\n", |
| 382 | + "Run 4, iteration: 2/100, moves: 1, cost: 8.0\n", |
385 | 383 | "Init: initializing centroids\n",
|
386 | 384 | "Init: initializing clusters\n",
|
387 | 385 | "Starting iterations...\n",
|
388 |
| - "Run 5, iteration: 1/100, moves: 0, cost: 8.0\n", |
389 |
| - "Best run was number 2\n" |
| 386 | + "Run 5, iteration: 1/100, moves: 1, cost: 8.0\n", |
| 387 | + "Best run was number 3\n" |
390 | 388 | ]
|
391 | 389 | },
|
392 | 390 | {
|
393 | 391 | "output_type": "execute_result",
|
394 | 392 | "data": {
|
395 | 393 | "text/plain": [
|
396 |
| - "array([1, 0, 2, 0, 1, 0, 2, 1], dtype=uint16)" |
| 394 | + "array([1, 0, 2, 0, 1, 0, 2, 0], dtype=uint16)" |
397 | 395 | ]
|
398 | 396 | },
|
399 | 397 | "metadata": {},
|
400 |
| - "execution_count": 6 |
| 398 | + "execution_count": 4 |
401 | 399 | }
|
402 | 400 | ]
|
403 | 401 | },
|
|
415 | 413 | "height": 328
|
416 | 414 | },
|
417 | 415 | "id": "-22ofNEXn5KI",
|
418 |
| - "outputId": "83ca4cb3-32ec-4424-af18-e9e10a23fd28" |
| 416 | + "outputId": "6baff152-5e67-4645-81ec-150b560323f0" |
419 | 417 | },
|
420 |
| - "execution_count": 7, |
| 418 | + "execution_count": 5, |
421 | 419 | "outputs": [
|
422 | 420 | {
|
423 | 421 | "output_type": "execute_result",
|
|
506 | 504 | " </tr>\n",
|
507 | 505 | " <tr>\n",
|
508 | 506 | " <th>P8</th>\n",
|
509 |
| - " <td>1</td>\n", |
| 507 | + " <td>0</td>\n", |
510 | 508 | " <td>black</td>\n",
|
511 | 509 | " <td>hazel</td>\n",
|
512 | 510 | " <td>fair</td>\n",
|
|
525 | 523 | "P5 1 brunette amber fair\n",
|
526 | 524 | "P6 0 black gray brown\n",
|
527 | 525 | "P7 2 red green fair\n",
|
528 |
| - "P8 1 black hazel fair" |
| 526 | + "P8 0 black hazel fair" |
529 | 527 | ]
|
530 | 528 | },
|
531 | 529 | "metadata": {},
|
532 |
| - "execution_count": 7 |
| 530 | + "execution_count": 5 |
533 | 531 | }
|
534 | 532 | ]
|
535 | 533 | },
|
|
0 commit comments