├── Appendix └── Strengthen Your Python Foundations.ipynb ├── Chapter1 ├── First steps.ipynb ├── The IPython Notebook.ipynb ├── datasets-uci-iris.csv └── regression-datasets-housing.csv ├── Chapter2 ├── Data Munging.ipynb ├── a_loading_example_1.csv ├── a_loading_example_2.csv ├── a_preprocessing_example_1.csv ├── a_selection_example_1.csv ├── datasets-uci-iris.csv ├── example.db ├── example.h5 └── regression-datasets-housing.csv ├── Chapter3 └── Data Pipeline-V3.ipynb ├── Chapter4 ├── Machine learning-V3.ipynb └── Performing Gradient Boosting-V3.ipynb ├── Chapter5 ├── Visualization.ipynb ├── bottle1.py ├── bottle2.py ├── bottle3.py └── cosine.html ├── Chapter6 ├── Social Network Analysis.ipynb ├── community │ ├── __init__.py │ ├── community_louvain.py │ └── community_status.py ├── dumped_graph.gml └── snowball_sampling.py ├── Chapter7 └── Deep Learning Beyond the Basics.ipynb ├── Chapter8 └── Spark in action.ipynb ├── LICENSE └── README.md /Appendix/Strengthen Your Python Foundations.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "## Lists" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 1, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "a_list = [1, 2.3, 'a', True]\n", 17 | "an_empty_list = list()" 18 | ] 19 | }, 20 | { 21 | "cell_type": "code", 22 | "execution_count": 2, 23 | "metadata": {}, 24 | "outputs": [], 25 | "source": [ 26 | "a_list[1] \n", 27 | "# prints 2.3 \n", 28 | "a_list[1] = 2.5\n", 29 | "# a_list is now [1, 2.5, 'a', True]" 30 | ] 31 | }, 32 | { 33 | "cell_type": "code", 34 | "execution_count": 3, 35 | "metadata": {}, 36 | "outputs": [ 37 | { 38 | "data": { 39 | "text/plain": [ 40 | "[2.5, 'a']" 41 | ] 42 | }, 43 | "execution_count": 3, 44 | "metadata": {}, 45 | "output_type": "execute_result" 46 | } 47 | ], 48 | "source": [ 49 | "a_list[1:3]\n", 50 | "# prints [2.3, 'a']" 51 | ] 52 | }, 53 | { 54 | "cell_type": "code", 55 | "execution_count": 5, 56 | "metadata": {}, 57 | "outputs": [ 58 | { 59 | "data": { 60 | "text/plain": [ 61 | "[1, 'a']" 62 | ] 63 | }, 64 | "execution_count": 5, 65 | "metadata": {}, 66 | "output_type": "execute_result" 67 | } 68 | ], 69 | "source": [ 70 | "a_list[::2] \n", 71 | "# returns only odd elements: [1, 'a'] " 72 | ] 73 | }, 74 | { 75 | "cell_type": "code", 76 | "execution_count": 6, 77 | "metadata": {}, 78 | "outputs": [ 79 | { 80 | "data": { 81 | "text/plain": [ 82 | "[True, 'a', 2.5, 1]" 83 | ] 84 | }, 85 | "execution_count": 6, 86 | "metadata": {}, 87 | "output_type": "execute_result" 88 | } 89 | ], 90 | "source": [ 91 | "a_list[::-1] \n", 92 | "# returns the reverse of the list: [True, 'a', 2.3, 1]" 93 | ] 94 | }, 95 | { 96 | "cell_type": "code", 97 | "execution_count": 7, 98 | "metadata": {}, 99 | "outputs": [], 100 | "source": [ 101 | "a_list.append(5) \n", 102 | "# a_list is now [1, 2.5, 'a', True, 5]" 103 | ] 104 | }, 105 | { 106 | "cell_type": "code", 107 | "execution_count": 8, 108 | "metadata": {}, 109 | "outputs": [ 110 | { 111 | "data": { 112 | "text/plain": [ 113 | "[1, 2.5, 'a', True, 5]" 114 | ] 115 | }, 116 | "execution_count": 8, 117 | "metadata": {}, 118 | "output_type": "execute_result" 119 | } 120 | ], 121 | "source": [ 122 | "a_list" 123 | ] 124 | }, 125 | { 126 | "cell_type": "code", 127 | "execution_count": 9, 128 | "metadata": {}, 129 | "outputs": [ 130 | { 131 | "data": { 132 | "text/plain": [ 133 | "5" 134 | ] 135 | }, 136 | "execution_count": 9, 137 | "metadata": {}, 138 | "output_type": "execute_result" 139 | } 140 | ], 141 | "source": [ 142 | "len(a_list) \n", 143 | "# prints 5" 144 | ] 145 | }, 146 | { 147 | "cell_type": "code", 148 | "execution_count": 10, 149 | "metadata": {}, 150 | "outputs": [], 151 | "source": [ 152 | "del a_list[0] \n", 153 | "# a_list is now [2.5, 'a', True, 5]" 154 | ] 155 | }, 156 | { 157 | "cell_type": "code", 158 | "execution_count": 11, 159 | "metadata": {}, 160 | "outputs": [ 161 | { 162 | "data": { 163 | "text/plain": [ 164 | "[2.5, 'a', True, 5]" 165 | ] 166 | }, 167 | "execution_count": 11, 168 | "metadata": {}, 169 | "output_type": "execute_result" 170 | } 171 | ], 172 | "source": [ 173 | "a_list" 174 | ] 175 | }, 176 | { 177 | "cell_type": "code", 178 | "execution_count": 12, 179 | "metadata": {}, 180 | "outputs": [], 181 | "source": [ 182 | "a_list += [1, 'b'] \n", 183 | "# a_list is now [2.5, 'a', True, 5, 1, 'b']" 184 | ] 185 | }, 186 | { 187 | "cell_type": "code", 188 | "execution_count": 13, 189 | "metadata": {}, 190 | "outputs": [ 191 | { 192 | "data": { 193 | "text/plain": [ 194 | "[2.5, 'a', True, 5, 1, 'b']" 195 | ] 196 | }, 197 | "execution_count": 13, 198 | "metadata": {}, 199 | "output_type": "execute_result" 200 | } 201 | ], 202 | "source": [ 203 | "a_list " 204 | ] 205 | }, 206 | { 207 | "cell_type": "code", 208 | "execution_count": 14, 209 | "metadata": {}, 210 | "outputs": [], 211 | "source": [ 212 | "a, b, c, d, e, f = [2.5, 'a', True, 5, 1, 'b'] \n", 213 | "# a now is 2.5, b is 'a' and so on" 214 | ] 215 | }, 216 | { 217 | "cell_type": "code", 218 | "execution_count": 15, 219 | "metadata": {}, 220 | "outputs": [ 221 | { 222 | "data": { 223 | "text/plain": [ 224 | "2.5" 225 | ] 226 | }, 227 | "execution_count": 15, 228 | "metadata": {}, 229 | "output_type": "execute_result" 230 | } 231 | ], 232 | "source": [ 233 | "a" 234 | ] 235 | }, 236 | { 237 | "cell_type": "code", 238 | "execution_count": 16, 239 | "metadata": {}, 240 | "outputs": [ 241 | { 242 | "data": { 243 | "text/plain": [ 244 | "(2.5, 'a', True, 5, 1, 'b')" 245 | ] 246 | }, 247 | "execution_count": 16, 248 | "metadata": {}, 249 | "output_type": "execute_result" 250 | } 251 | ], 252 | "source": [ 253 | "tuple(a_list) \n", 254 | "# prints (2.5, 'a', True, 5, 1, 'b')" 255 | ] 256 | }, 257 | { 258 | "cell_type": "markdown", 259 | "metadata": {}, 260 | "source": [ 261 | "## Dictionaries" 262 | ] 263 | }, 264 | { 265 | "cell_type": "code", 266 | "execution_count": 17, 267 | "metadata": {}, 268 | "outputs": [], 269 | "source": [ 270 | "b_dict = {1: 1, '2': '2', 3.0: 3.0}" 271 | ] 272 | }, 273 | { 274 | "cell_type": "code", 275 | "execution_count": 19, 276 | "metadata": {}, 277 | "outputs": [ 278 | { 279 | "data": { 280 | "text/plain": [ 281 | "'2.0'" 282 | ] 283 | }, 284 | "execution_count": 19, 285 | "metadata": {}, 286 | "output_type": "execute_result" 287 | } 288 | ], 289 | "source": [ 290 | "b_dict['2'] \n", 291 | "# prints '2' " 292 | ] 293 | }, 294 | { 295 | "cell_type": "code", 296 | "execution_count": 20, 297 | "metadata": {}, 298 | "outputs": [], 299 | "source": [ 300 | "b_dict['2'] = '2.0' \n", 301 | "# b_dict is now {1: 1, '2': '2.0', 3.0: 3.0}" 302 | ] 303 | }, 304 | { 305 | "cell_type": "code", 306 | "execution_count": 21, 307 | "metadata": {}, 308 | "outputs": [ 309 | { 310 | "data": { 311 | "text/plain": [ 312 | "{1: 1, '2': '2.0', 3.0: 3.0}" 313 | ] 314 | }, 315 | "execution_count": 21, 316 | "metadata": {}, 317 | "output_type": "execute_result" 318 | } 319 | ], 320 | "source": [ 321 | "b_dict" 322 | ] 323 | }, 324 | { 325 | "cell_type": "code", 326 | "execution_count": 22, 327 | "metadata": {}, 328 | "outputs": [], 329 | "source": [ 330 | "b_dict['a'] = 'a' \n", 331 | "# b_dict is now {3.0: 3.0, 1: 1, '2': '2.0', 'a': 'a'}" 332 | ] 333 | }, 334 | { 335 | "cell_type": "code", 336 | "execution_count": 23, 337 | "metadata": {}, 338 | "outputs": [ 339 | { 340 | "data": { 341 | "text/plain": [ 342 | "{1: 1, '2': '2.0', 3.0: 3.0, 'a': 'a'}" 343 | ] 344 | }, 345 | "execution_count": 23, 346 | "metadata": {}, 347 | "output_type": "execute_result" 348 | } 349 | ], 350 | "source": [ 351 | "b_dict" 352 | ] 353 | }, 354 | { 355 | "cell_type": "code", 356 | "execution_count": 24, 357 | "metadata": {}, 358 | "outputs": [ 359 | { 360 | "data": { 361 | "text/plain": [ 362 | "4" 363 | ] 364 | }, 365 | "execution_count": 24, 366 | "metadata": {}, 367 | "output_type": "execute_result" 368 | } 369 | ], 370 | "source": [ 371 | "len(b_dict) \n", 372 | "# prints 4" 373 | ] 374 | }, 375 | { 376 | "cell_type": "code", 377 | "execution_count": 25, 378 | "metadata": {}, 379 | "outputs": [], 380 | "source": [ 381 | "del b_dict[3.0] \n", 382 | "# b_dict is now {1: 1, '2': '2.0', 'a': 'a'}" 383 | ] 384 | }, 385 | { 386 | "cell_type": "code", 387 | "execution_count": 26, 388 | "metadata": {}, 389 | "outputs": [ 390 | { 391 | "data": { 392 | "text/plain": [ 393 | "{1: 1, '2': '2.0', 'a': 'a'}" 394 | ] 395 | }, 396 | "execution_count": 26, 397 | "metadata": {}, 398 | "output_type": "execute_result" 399 | } 400 | ], 401 | "source": [ 402 | "b_dict" 403 | ] 404 | }, 405 | { 406 | "cell_type": "code", 407 | "execution_count": 27, 408 | "metadata": {}, 409 | "outputs": [ 410 | { 411 | "ename": "KeyError", 412 | "evalue": "'a_key'", 413 | "output_type": "error", 414 | "traceback": [ 415 | "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", 416 | "\u001b[1;31mKeyError\u001b[0m Traceback (most recent call last)", 417 | "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mb_dict\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'a_key'\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m", 418 | "\u001b[1;31mKeyError\u001b[0m: 'a_key'" 419 | ] 420 | } 421 | ], 422 | "source": [ 423 | "b_dict['a_key']" 424 | ] 425 | }, 426 | { 427 | "cell_type": "code", 428 | "execution_count": 28, 429 | "metadata": {}, 430 | "outputs": [ 431 | { 432 | "name": "stdout", 433 | "output_type": "stream", 434 | "text": [ 435 | "'a_key' is not present in the dictionary\n" 436 | ] 437 | } 438 | ], 439 | "source": [ 440 | "if 'a_key' in b_dict: \n", 441 | " b_dict['a_key'] \n", 442 | "else: \n", 443 | " print(\"'a_key' is not present in the dictionary\")" 444 | ] 445 | }, 446 | { 447 | "cell_type": "code", 448 | "execution_count": 29, 449 | "metadata": {}, 450 | "outputs": [], 451 | "source": [ 452 | "b_dict.get('a_key')" 453 | ] 454 | }, 455 | { 456 | "cell_type": "code", 457 | "execution_count": 30, 458 | "metadata": {}, 459 | "outputs": [ 460 | { 461 | "data": { 462 | "text/plain": [ 463 | "'empty'" 464 | ] 465 | }, 466 | "execution_count": 30, 467 | "metadata": {}, 468 | "output_type": "execute_result" 469 | } 470 | ], 471 | "source": [ 472 | "from collections import defaultdict \n", 473 | "c_dict = defaultdict(lambda: 'empty') \n", 474 | "c_dict['a_key'] \n", 475 | "# requiring a nonexistent key will always return the string 'empty'" 476 | ] 477 | }, 478 | { 479 | "cell_type": "markdown", 480 | "metadata": {}, 481 | "source": [ 482 | "## Defining functions" 483 | ] 484 | }, 485 | { 486 | "cell_type": "code", 487 | "execution_count": 32, 488 | "metadata": {}, 489 | "outputs": [], 490 | "source": [ 491 | "def half(x): \n", 492 | " return x/2.0" 493 | ] 494 | }, 495 | { 496 | "cell_type": "code", 497 | "execution_count": 33, 498 | "metadata": {}, 499 | "outputs": [], 500 | "source": [ 501 | "import math \n", 502 | "def sigmoid(x): \n", 503 | " try: \n", 504 | " return 1.0 / (1 + math.exp(-x)) \n", 505 | " except: \n", 506 | " if x < 0: \n", 507 | " return 0.0 \n", 508 | " else: \n", 509 | " return 1.0" 510 | ] 511 | }, 512 | { 513 | "cell_type": "code", 514 | "execution_count": 34, 515 | "metadata": {}, 516 | "outputs": [ 517 | { 518 | "name": "stdout", 519 | "output_type": "stream", 520 | "text": [ 521 | "4\n", 522 | "5\n" 523 | ] 524 | } 525 | ], 526 | "source": [ 527 | "def sum_a_const(c): \n", 528 | " return lambda x: x+c \n", 529 | "\n", 530 | "sum_2 = sum_a_const(2) \n", 531 | "sum_3 = sum_a_const(3) \n", 532 | "print(sum_2(2)) \n", 533 | "print(sum_3(2)) \n", 534 | "# prints 4 and 5" 535 | ] 536 | }, 537 | { 538 | "cell_type": "code", 539 | "execution_count": 35, 540 | "metadata": {}, 541 | "outputs": [ 542 | { 543 | "data": { 544 | "text/plain": [ 545 | "5.0" 546 | ] 547 | }, 548 | "execution_count": 35, 549 | "metadata": {}, 550 | "output_type": "execute_result" 551 | } 552 | ], 553 | "source": [ 554 | "half(10) \n", 555 | "# prints 5.0 " 556 | ] 557 | }, 558 | { 559 | "cell_type": "code", 560 | "execution_count": 36, 561 | "metadata": {}, 562 | "outputs": [ 563 | { 564 | "data": { 565 | "text/plain": [ 566 | "0.5" 567 | ] 568 | }, 569 | "execution_count": 36, 570 | "metadata": {}, 571 | "output_type": "execute_result" 572 | } 573 | ], 574 | "source": [ 575 | "sigmoid(0) \n", 576 | "# prints 0.5" 577 | ] 578 | }, 579 | { 580 | "cell_type": "code", 581 | "execution_count": 37, 582 | "metadata": {}, 583 | "outputs": [ 584 | { 585 | "name": "stdout", 586 | "output_type": "stream", 587 | "text": [ 588 | "[1, 2, 3, 4, 5]\n", 589 | "[0, 2, 3, 4, 5]\n" 590 | ] 591 | } 592 | ], 593 | "source": [ 594 | "a_list = [1,2,3,4,5] \n", 595 | "\n", 596 | "def modifier(L): \n", 597 | " L[0] = 0 \n", 598 | "\n", 599 | "def unmodifier(L): \n", 600 | " M = L[:] # Here we are copying the list\n", 601 | " M[0] = 0 \n", 602 | "\n", 603 | "unmodifier(a_list) \n", 604 | "print(a_list) \n", 605 | "# you still have the original list, [1, 2, 3, 4, 5] \n", 606 | "\n", 607 | "modifier(a_list) \n", 608 | "print(a_list) \n", 609 | "# your list have been modified: [0, 2, 3, 4, 5]" 610 | ] 611 | }, 612 | { 613 | "cell_type": "markdown", 614 | "metadata": {}, 615 | "source": [ 616 | "## Classes, objects and OOP" 617 | ] 618 | }, 619 | { 620 | "cell_type": "code", 621 | "execution_count": 38, 622 | "metadata": {}, 623 | "outputs": [], 624 | "source": [ 625 | "class Incrementer(object): \n", 626 | " def __init__(self): \n", 627 | " print (\"Hello world, I'm the constructor\") \n", 628 | " self._i = 0" 629 | ] 630 | }, 631 | { 632 | "cell_type": "code", 633 | "execution_count": 39, 634 | "metadata": {}, 635 | "outputs": [ 636 | { 637 | "name": "stdout", 638 | "output_type": "stream", 639 | "text": [ 640 | "Hello world, I'm the constructor\n" 641 | ] 642 | } 643 | ], 644 | "source": [ 645 | "i = Incrementer() \n", 646 | "# prints \"Hello world, I'm the constructor\"" 647 | ] 648 | }, 649 | { 650 | "cell_type": "code", 651 | "execution_count": 40, 652 | "metadata": {}, 653 | "outputs": [], 654 | "source": [ 655 | "class Incrementer(object): \n", 656 | " def __init__(self): \n", 657 | " print (\"Hello world, I'm the constructor\") \n", 658 | " self._i = 0 \n", 659 | " def increment(self): \n", 660 | " self._i += 1 \n", 661 | " return self._i" 662 | ] 663 | }, 664 | { 665 | "cell_type": "code", 666 | "execution_count": 41, 667 | "metadata": {}, 668 | "outputs": [ 669 | { 670 | "name": "stdout", 671 | "output_type": "stream", 672 | "text": [ 673 | "Hello world, I'm the constructor\n", 674 | "1\n", 675 | "2\n", 676 | "3\n" 677 | ] 678 | } 679 | ], 680 | "source": [ 681 | "i = Incrementer() \n", 682 | "print (i.increment()) \n", 683 | "print (i.increment()) \n", 684 | "print (i.increment())" 685 | ] 686 | }, 687 | { 688 | "cell_type": "code", 689 | "execution_count": 42, 690 | "metadata": {}, 691 | "outputs": [], 692 | "source": [ 693 | "class Incrementer(object): \n", 694 | " def __init__(self): \n", 695 | " print (\"Hello world, I'm the constructor\") \n", 696 | " self._i = 0 \n", 697 | " def increment(self): \n", 698 | " self._i += 1 \n", 699 | " return self._i\n", 700 | " def set_counter(self, counter): \n", 701 | " self._i = counter" 702 | ] 703 | }, 704 | { 705 | "cell_type": "code", 706 | "execution_count": 43, 707 | "metadata": {}, 708 | "outputs": [ 709 | { 710 | "name": "stdout", 711 | "output_type": "stream", 712 | "text": [ 713 | "Hello world, I'm the constructor\n", 714 | "11\n", 715 | "11\n" 716 | ] 717 | } 718 | ], 719 | "source": [ 720 | "i = Incrementer() \n", 721 | "i.set_counter(10) \n", 722 | "print (i.increment()) \n", 723 | "print (i._i)" 724 | ] 725 | }, 726 | { 727 | "cell_type": "markdown", 728 | "metadata": {}, 729 | "source": [ 730 | "## Exception" 731 | ] 732 | }, 733 | { 734 | "cell_type": "code", 735 | "execution_count": 44, 736 | "metadata": {}, 737 | "outputs": [ 738 | { 739 | "ename": "ZeroDivisionError", 740 | "evalue": "division by zero", 741 | "output_type": "error", 742 | "traceback": [ 743 | "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", 744 | "\u001b[1;31mZeroDivisionError\u001b[0m Traceback (most recent call last)", 745 | "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[1;36m0\u001b[0m\u001b[1;33m/\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m", 746 | "\u001b[1;31mZeroDivisionError\u001b[0m: division by zero" 747 | ] 748 | } 749 | ], 750 | "source": [ 751 | "0/0" 752 | ] 753 | }, 754 | { 755 | "cell_type": "code", 756 | "execution_count": 45, 757 | "metadata": {}, 758 | "outputs": [ 759 | { 760 | "ename": "TypeError", 761 | "evalue": "len() takes exactly one argument (2 given)", 762 | "output_type": "error", 763 | "traceback": [ 764 | "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", 765 | "\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)", 766 | "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mlen\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;36m2\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m", 767 | "\u001b[1;31mTypeError\u001b[0m: len() takes exactly one argument (2 given)" 768 | ] 769 | } 770 | ], 771 | "source": [ 772 | "len(1, 2) " 773 | ] 774 | }, 775 | { 776 | "cell_type": "code", 777 | "execution_count": 46, 778 | "metadata": {}, 779 | "outputs": [ 780 | { 781 | "ename": "NameError", 782 | "evalue": "name 'pi' is not defined", 783 | "output_type": "error", 784 | "traceback": [ 785 | "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", 786 | "\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)", 787 | "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mpi\u001b[0m \u001b[1;33m*\u001b[0m \u001b[1;36m2\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m", 788 | "\u001b[1;31mNameError\u001b[0m: name 'pi' is not defined" 789 | ] 790 | } 791 | ], 792 | "source": [ 793 | "pi * 2 " 794 | ] 795 | }, 796 | { 797 | "cell_type": "code", 798 | "execution_count": 47, 799 | "metadata": {}, 800 | "outputs": [], 801 | "source": [ 802 | "try: \n", 803 | " a = 10/0 \n", 804 | "except ZeroDivisionError: \n", 805 | " a = 0" 806 | ] 807 | }, 808 | { 809 | "cell_type": "code", 810 | "execution_count": 48, 811 | "metadata": {}, 812 | "outputs": [ 813 | { 814 | "data": { 815 | "text/plain": [ 816 | "0" 817 | ] 818 | }, 819 | "execution_count": 48, 820 | "metadata": {}, 821 | "output_type": "execute_result" 822 | } 823 | ], 824 | "source": [ 825 | "a" 826 | ] 827 | }, 828 | { 829 | "cell_type": "code", 830 | "execution_count": 50, 831 | "metadata": {}, 832 | "outputs": [ 833 | { 834 | "name": "stdout", 835 | "output_type": "stream", 836 | "text": [ 837 | "alpha\n", 838 | "bravo\n", 839 | "charlie\n", 840 | "delta\n" 841 | ] 842 | } 843 | ], 844 | "source": [ 845 | "for entry in ['alpha', 'bravo', 'charlie', 'delta']: \n", 846 | " print (entry) \n", 847 | "\n", 848 | "# prints the content of the list, one entry for line " 849 | ] 850 | }, 851 | { 852 | "cell_type": "code", 853 | "execution_count": 51, 854 | "metadata": {}, 855 | "outputs": [ 856 | { 857 | "name": "stdout", 858 | "output_type": "stream", 859 | "text": [ 860 | "1 alpha\n", 861 | "2 bravo\n", 862 | "3 charlie\n", 863 | "4 delta\n" 864 | ] 865 | } 866 | ], 867 | "source": [ 868 | "a_dict = {1: 'alpha', 2: 'bravo', 3: 'charlie', 4: 'delta'} \n", 869 | "for key in a_dict: \n", 870 | " print (key, a_dict[key]) \n", 871 | "\n", 872 | "# Prints: \n", 873 | "# 1 alpha \n", 874 | "# 2 bravo \n", 875 | "# 3 charlie \n", 876 | "# 4 delta" 877 | ] 878 | }, 879 | { 880 | "cell_type": "code", 881 | "execution_count": 52, 882 | "metadata": {}, 883 | "outputs": [ 884 | { 885 | "name": "stdout", 886 | "output_type": "stream", 887 | "text": [ 888 | "0\n", 889 | "1\n", 890 | "2\n", 891 | "3\n", 892 | "4\n" 893 | ] 894 | } 895 | ], 896 | "source": [ 897 | "def incrementer(): \n", 898 | " i = 0 \n", 899 | " while i<5: \n", 900 | " yield(i)\n", 901 | " i +=1 \n", 902 | "\n", 903 | "for i in incrementer(): \n", 904 | " print (i) \n", 905 | "\n", 906 | "# Prints: \n", 907 | "# 0 \n", 908 | "# 1 \n", 909 | "# 2 \n", 910 | "# 3 \n", 911 | "# 4" 912 | ] 913 | }, 914 | { 915 | "cell_type": "markdown", 916 | "metadata": {}, 917 | "source": [ 918 | "## Conditionals" 919 | ] 920 | }, 921 | { 922 | "cell_type": "code", 923 | "execution_count": 53, 924 | "metadata": {}, 925 | "outputs": [ 926 | { 927 | "name": "stdout", 928 | "output_type": "stream", 929 | "text": [ 930 | "It is negative\n", 931 | "It is positive\n", 932 | "It is exactly zero!\n" 933 | ] 934 | } 935 | ], 936 | "source": [ 937 | "def is_positive(val): \n", 938 | " if val< 0: \n", 939 | " print (\"It is negative\") \n", 940 | " elif val> 0: \n", 941 | " print (\"It is positive\") \n", 942 | " else: \n", 943 | " print (\"It is exactly zero!\") \n", 944 | "\n", 945 | "is_positive(-1) \n", 946 | "is_positive(1.5) \n", 947 | "is_positive(0) \n", 948 | "\n", 949 | "# Prints: \n", 950 | "# It is negative \n", 951 | "# It is positive \n", 952 | "# It is exactly zero!" 953 | ] 954 | }, 955 | { 956 | "cell_type": "code", 957 | "execution_count": 54, 958 | "metadata": {}, 959 | "outputs": [], 960 | "source": [ 961 | "a_list = [1,2,3,4,5] \n", 962 | "a_power_list = [value**2 for value in a_list] \n", 963 | "# the resulting list is [1, 4, 9, 16, 25] " 964 | ] 965 | }, 966 | { 967 | "cell_type": "code", 968 | "execution_count": 55, 969 | "metadata": {}, 970 | "outputs": [ 971 | { 972 | "data": { 973 | "text/plain": [ 974 | "[1, 4, 9, 16, 25]" 975 | ] 976 | }, 977 | "execution_count": 55, 978 | "metadata": {}, 979 | "output_type": "execute_result" 980 | } 981 | ], 982 | "source": [ 983 | "a_power_list" 984 | ] 985 | }, 986 | { 987 | "cell_type": "code", 988 | "execution_count": 56, 989 | "metadata": {}, 990 | "outputs": [], 991 | "source": [ 992 | "filter_even_numbers = [value**2 for value in a_list if value % 2 == 0] \n", 993 | "# the resulting list is [4, 16] " 994 | ] 995 | }, 996 | { 997 | "cell_type": "code", 998 | "execution_count": 57, 999 | "metadata": {}, 1000 | "outputs": [ 1001 | { 1002 | "data": { 1003 | "text/plain": [ 1004 | "[4, 16]" 1005 | ] 1006 | }, 1007 | "execution_count": 57, 1008 | "metadata": {}, 1009 | "output_type": "execute_result" 1010 | } 1011 | ], 1012 | "source": [ 1013 | "filter_even_numbers" 1014 | ] 1015 | }, 1016 | { 1017 | "cell_type": "code", 1018 | "execution_count": 58, 1019 | "metadata": {}, 1020 | "outputs": [], 1021 | "source": [ 1022 | "another_list = ['a','b','c','d','e'] \n", 1023 | "a_dictionary = {key:value for value, key in zip(a_list, another_list)} \n", 1024 | "# the resulting dictionary is {'a': 1, 'c': 3, 'b': 2, 'e': 5, 'd': 4}" 1025 | ] 1026 | }, 1027 | { 1028 | "cell_type": "code", 1029 | "execution_count": 59, 1030 | "metadata": {}, 1031 | "outputs": [ 1032 | { 1033 | "data": { 1034 | "text/plain": [ 1035 | "{'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5}" 1036 | ] 1037 | }, 1038 | "execution_count": 59, 1039 | "metadata": {}, 1040 | "output_type": "execute_result" 1041 | } 1042 | ], 1043 | "source": [ 1044 | "a_dictionary" 1045 | ] 1046 | } 1047 | ], 1048 | "metadata": { 1049 | "kernelspec": { 1050 | "display_name": "Python [conda env:Anaconda3]", 1051 | "language": "python", 1052 | "name": "conda-env-Anaconda3-py" 1053 | }, 1054 | "language_info": { 1055 | "codemirror_mode": { 1056 | "name": "ipython", 1057 | "version": 3 1058 | }, 1059 | "file_extension": ".py", 1060 | "mimetype": "text/x-python", 1061 | "name": "python", 1062 | "nbconvert_exporter": "python", 1063 | "pygments_lexer": "ipython3", 1064 | "version": "3.6.6" 1065 | } 1066 | }, 1067 | "nbformat": 4, 1068 | "nbformat_minor": 2 1069 | } 1070 | -------------------------------------------------------------------------------- /Chapter1/First steps.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "Let's first check the Python version you have installed on your machine.\n", 8 | "Remember, to run the examples, it must be at least 3.4" 9 | ] 10 | }, 11 | { 12 | "cell_type": "code", 13 | "execution_count": 1, 14 | "metadata": { 15 | "collapsed": false 16 | }, 17 | "outputs": [ 18 | { 19 | "name": "stdout", 20 | "output_type": "stream", 21 | "text": [ 22 | "Your Python version is 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit (AMD64)]\n" 23 | ] 24 | } 25 | ], 26 | "source": [ 27 | "import sys\n", 28 | "print (\"Your Python version is\", sys.version)" 29 | ] 30 | }, 31 | { 32 | "cell_type": "markdown", 33 | "metadata": {}, 34 | "source": [ 35 | "Now let's check if you have all the necessary toolkits installed and working properly:" 36 | ] 37 | }, 38 | { 39 | "cell_type": "code", 40 | "execution_count": 2, 41 | "metadata": { 42 | "collapsed": false 43 | }, 44 | "outputs": [], 45 | "source": [ 46 | "errors = 0" 47 | ] 48 | }, 49 | { 50 | "cell_type": "code", 51 | "execution_count": 3, 52 | "metadata": { 53 | "collapsed": false 54 | }, 55 | "outputs": [ 56 | { 57 | "name": "stdout", 58 | "output_type": "stream", 59 | "text": [ 60 | "Numpy installed, version 1.9.2\n" 61 | ] 62 | } 63 | ], 64 | "source": [ 65 | "try:\n", 66 | " import numpy as np\n", 67 | " print (\"Numpy installed, version\", np.__version__)\n", 68 | "except ImportError:\n", 69 | " print (\"Numpy is not installed!\")\n", 70 | " errors += 1" 71 | ] 72 | }, 73 | { 74 | "cell_type": "code", 75 | "execution_count": 4, 76 | "metadata": { 77 | "collapsed": false 78 | }, 79 | "outputs": [ 80 | { 81 | "name": "stdout", 82 | "output_type": "stream", 83 | "text": [ 84 | "Scipy installed, version 0.16.0\n" 85 | ] 86 | } 87 | ], 88 | "source": [ 89 | "try:\n", 90 | " import scipy\n", 91 | " print (\"Scipy installed, version\", scipy.__version__)\n", 92 | "except ImportError:\n", 93 | " print (\"Scipy is not installed!\")\n", 94 | " errors += 1" 95 | ] 96 | }, 97 | { 98 | "cell_type": "code", 99 | "execution_count": 5, 100 | "metadata": { 101 | "collapsed": false 102 | }, 103 | "outputs": [ 104 | { 105 | "name": "stdout", 106 | "output_type": "stream", 107 | "text": [ 108 | "Matplotlib installed, version 1.4.3\n" 109 | ] 110 | } 111 | ], 112 | "source": [ 113 | "try:\n", 114 | " import matplotlib\n", 115 | " print (\"Matplotlib installed, version\", matplotlib.__version__)\n", 116 | "except ImportError:\n", 117 | " print (\"Matplotlib is not installed!\")\n", 118 | " errors += 1" 119 | ] 120 | }, 121 | { 122 | "cell_type": "code", 123 | "execution_count": 6, 124 | "metadata": { 125 | "collapsed": false 126 | }, 127 | "outputs": [ 128 | { 129 | "name": "stdout", 130 | "output_type": "stream", 131 | "text": [ 132 | "Sklearn installed, version 0.16.1\n" 133 | ] 134 | } 135 | ], 136 | "source": [ 137 | "try:\n", 138 | " import sklearn\n", 139 | " print (\"Sklearn installed, version\", sklearn.__version__)\n", 140 | "except ImportError:\n", 141 | " print (\"Sklearn is not installed!\")\n", 142 | " errors += 1" 143 | ] 144 | }, 145 | { 146 | "cell_type": "code", 147 | "execution_count": 7, 148 | "metadata": { 149 | "collapsed": false 150 | }, 151 | "outputs": [ 152 | { 153 | "name": "stdout", 154 | "output_type": "stream", 155 | "text": [ 156 | "Beautifulsoup4 installed, version 4.4.0\n" 157 | ] 158 | } 159 | ], 160 | "source": [ 161 | "try:\n", 162 | " import bs4\n", 163 | " print (\"Beautifulsoup4 installed, version\", bs4.__version__)\n", 164 | "except ImportError:\n", 165 | " print (\"Beautifulsoup4 is not installed!\")\n", 166 | " errors += 1" 167 | ] 168 | }, 169 | { 170 | "cell_type": "code", 171 | "execution_count": 8, 172 | "metadata": { 173 | "collapsed": false 174 | }, 175 | "outputs": [ 176 | { 177 | "name": "stdout", 178 | "output_type": "stream", 179 | "text": [ 180 | "Networkx installed, version 1.9.1\n" 181 | ] 182 | } 183 | ], 184 | "source": [ 185 | "try:\n", 186 | " import networkx\n", 187 | " print (\"Networkx installed, version\", networkx.__version__)\n", 188 | "except ImportError:\n", 189 | " print (\"Networkx is not installed!\")\n", 190 | " errors += 1" 191 | ] 192 | }, 193 | { 194 | "cell_type": "code", 195 | "execution_count": 9, 196 | "metadata": { 197 | "collapsed": false 198 | }, 199 | "outputs": [ 200 | { 201 | "name": "stdout", 202 | "output_type": "stream", 203 | "text": [ 204 | "Nltk installed, version 3.0.4\n" 205 | ] 206 | } 207 | ], 208 | "source": [ 209 | "try:\n", 210 | " import nltk\n", 211 | " print (\"Nltk installed, version\", nltk.__version__)\n", 212 | "except ImportError:\n", 213 | " print (\"Nltk is not installed!\")\n", 214 | " errors += 1" 215 | ] 216 | }, 217 | { 218 | "cell_type": "code", 219 | "execution_count": 10, 220 | "metadata": { 221 | "collapsed": false 222 | }, 223 | "outputs": [ 224 | { 225 | "name": "stdout", 226 | "output_type": "stream", 227 | "text": [ 228 | "Gensim installed, version 0.12.4\n" 229 | ] 230 | } 231 | ], 232 | "source": [ 233 | "try:\n", 234 | " import gensim\n", 235 | " print (\"Gensim installed, version\", gensim.__version__)\n", 236 | "except ImportError:\n", 237 | " print (\"Gensim is not installed!\")\n", 238 | " errors += 1" 239 | ] 240 | }, 241 | { 242 | "cell_type": "code", 243 | "execution_count": 11, 244 | "metadata": { 245 | "collapsed": false 246 | }, 247 | "outputs": [ 248 | { 249 | "name": "stdout", 250 | "output_type": "stream", 251 | "text": [ 252 | "XGBoost installed, version 0.4\n" 253 | ] 254 | } 255 | ], 256 | "source": [ 257 | "try:\n", 258 | " import xgboost\n", 259 | " print (\"XGBoost installed, version\", xgboost.__version__)\n", 260 | "except ImportError:\n", 261 | " print (\"XGBoost is not installed!\")\n", 262 | " errors += 1" 263 | ] 264 | }, 265 | { 266 | "cell_type": "code", 267 | "execution_count": 12, 268 | "metadata": { 269 | "collapsed": false 270 | }, 271 | "outputs": [ 272 | { 273 | "name": "stdout", 274 | "output_type": "stream", 275 | "text": [ 276 | "Theano installed, version 0.7.0\n" 277 | ] 278 | } 279 | ], 280 | "source": [ 281 | "try:\n", 282 | " import theano\n", 283 | " print (\"Theano installed, version\", theano.__version__)\n", 284 | "except ImportError:\n", 285 | " print (\"Theano is not installed!\")\n", 286 | " errors += 1" 287 | ] 288 | }, 289 | { 290 | "cell_type": "code", 291 | "execution_count": 13, 292 | "metadata": { 293 | "collapsed": false 294 | }, 295 | "outputs": [ 296 | { 297 | "name": "stdout", 298 | "output_type": "stream", 299 | "text": [ 300 | "Keras installed, version 0.1.2\n" 301 | ] 302 | } 303 | ], 304 | "source": [ 305 | "try:\n", 306 | " import keras\n", 307 | " import pkg_resources\n", 308 | " vs = pkg_resources.get_distribution(\"keras\").version\n", 309 | " print (\"Keras installed, version\", vs)\n", 310 | "except ImportError:\n", 311 | " print (\"Keras is not installed!\")\n", 312 | " errors += 1" 313 | ] 314 | }, 315 | { 316 | "cell_type": "markdown", 317 | "metadata": {}, 318 | "source": [ 319 | "This is a $\\LaTeX$ inline equation: $x = Ax+b$\n", 320 | "\n", 321 | "And this is a one-liner: $$x = Ax + b$$" 322 | ] 323 | }, 324 | { 325 | "cell_type": "code", 326 | "execution_count": 14, 327 | "metadata": { 328 | "collapsed": false 329 | }, 330 | "outputs": [ 331 | { 332 | "data": { 333 | "text/latex": [ 334 | "\\[\n", 335 | " |u(t)| = \n", 336 | " \\begin{cases} \n", 337 | " u(t) & \\text{if } t \\geq 0 \\\\\n", 338 | " -u(t) & \\text{otherwise }\n", 339 | " \\end{cases}\n", 340 | "\\]" 341 | ], 342 | "text/plain": [ 343 | "" 344 | ] 345 | }, 346 | "metadata": {}, 347 | "output_type": "display_data" 348 | } 349 | ], 350 | "source": [ 351 | "%%latex\n", 352 | "\\[\n", 353 | " |u(t)| = \n", 354 | " \\begin{cases} \n", 355 | " u(t) & \\text{if } t \\geq 0 \\\\\n", 356 | " -u(t) & \\text{otherwise }\n", 357 | " \\end{cases}\n", 358 | "\\]" 359 | ] 360 | }, 361 | { 362 | "cell_type": "code", 363 | "execution_count": 15, 364 | "metadata": { 365 | "collapsed": false 366 | }, 367 | "outputs": [ 368 | { 369 | "data": { 370 | "text/latex": [ 371 | "\\begin{align}\n", 372 | "f(x) &= (a+b)^2 \\\\\n", 373 | " &= a^2 + (a+b) + (a+b) + b^2 \\\\\n", 374 | " &= a^2 + 2\\cdot (a+b) + b^2\n", 375 | "\\end{align}" 376 | ], 377 | "text/plain": [ 378 | "" 379 | ] 380 | }, 381 | "metadata": {}, 382 | "output_type": "display_data" 383 | } 384 | ], 385 | "source": [ 386 | "%%latex\n", 387 | "\\begin{align}\n", 388 | "f(x) &= (a+b)^2 \\\\\n", 389 | " &= a^2 + (a+b) + (a+b) + b^2 \\\\\n", 390 | " &= a^2 + 2\\cdot (a+b) + b^2\n", 391 | "\\end{align}" 392 | ] 393 | }, 394 | { 395 | "cell_type": "markdown", 396 | "metadata": {}, 397 | "source": [ 398 | "Here's the verdict:" 399 | ] 400 | }, 401 | { 402 | "cell_type": "code", 403 | "execution_count": 16, 404 | "metadata": { 405 | "collapsed": false 406 | }, 407 | "outputs": [ 408 | { 409 | "name": "stdout", 410 | "output_type": "stream", 411 | "text": [ 412 | "Your machine can run the code\n" 413 | ] 414 | } 415 | ], 416 | "source": [ 417 | "if errors == 0:\n", 418 | " print (\"Your machine can run the code\")\n", 419 | "else:\n", 420 | " print (\"We found %i errors. Please check them and install the missing toolkits\" % errors)" 421 | ] 422 | } 423 | ], 424 | "metadata": { 425 | "kernelspec": { 426 | "display_name": "Python 3", 427 | "language": "python", 428 | "name": "python3" 429 | }, 430 | "language_info": { 431 | "codemirror_mode": { 432 | "name": "ipython", 433 | "version": 3 434 | }, 435 | "file_extension": ".py", 436 | "mimetype": "text/x-python", 437 | "name": "python", 438 | "nbconvert_exporter": "python", 439 | "pygments_lexer": "ipython3", 440 | "version": "3.5.1" 441 | } 442 | }, 443 | "nbformat": 4, 444 | "nbformat_minor": 0 445 | } 446 | -------------------------------------------------------------------------------- /Chapter1/datasets-uci-iris.csv: -------------------------------------------------------------------------------- 1 | 5.1,3.5,1.4,0.2,Iris-setosa 2 | 4.9,3.0,1.4,0.2,Iris-setosa 3 | 4.7,3.2,1.3,0.2,Iris-setosa 4 | 4.6,3.1,1.5,0.2,Iris-setosa 5 | 5.0,3.6,1.4,0.2,Iris-setosa 6 | 5.4,3.9,1.7,0.4,Iris-setosa 7 | 4.6,3.4,1.4,0.3,Iris-setosa 8 | 5.0,3.4,1.5,0.2,Iris-setosa 9 | 4.4,2.9,1.4,0.2,Iris-setosa 10 | 4.9,3.1,1.5,0.1,Iris-setosa 11 | 5.4,3.7,1.5,0.2,Iris-setosa 12 | 4.8,3.4,1.6,0.2,Iris-setosa 13 | 4.8,3.0,1.4,0.1,Iris-setosa 14 | 4.3,3.0,1.1,0.1,Iris-setosa 15 | 5.8,4.0,1.2,0.2,Iris-setosa 16 | 5.7,4.4,1.5,0.4,Iris-setosa 17 | 5.4,3.9,1.3,0.4,Iris-setosa 18 | 5.1,3.5,1.4,0.3,Iris-setosa 19 | 5.7,3.8,1.7,0.3,Iris-setosa 20 | 5.1,3.8,1.5,0.3,Iris-setosa 21 | 5.4,3.4,1.7,0.2,Iris-setosa 22 | 5.1,3.7,1.5,0.4,Iris-setosa 23 | 4.6,3.6,1.0,0.2,Iris-setosa 24 | 5.1,3.3,1.7,0.5,Iris-setosa 25 | 4.8,3.4,1.9,0.2,Iris-setosa 26 | 5.0,3.0,1.6,0.2,Iris-setosa 27 | 5.0,3.4,1.6,0.4,Iris-setosa 28 | 5.2,3.5,1.5,0.2,Iris-setosa 29 | 5.2,3.4,1.4,0.2,Iris-setosa 30 | 4.7,3.2,1.6,0.2,Iris-setosa 31 | 4.8,3.1,1.6,0.2,Iris-setosa 32 | 5.4,3.4,1.5,0.4,Iris-setosa 33 | 5.2,4.1,1.5,0.1,Iris-setosa 34 | 5.5,4.2,1.4,0.2,Iris-setosa 35 | 4.9,3.1,1.5,0.1,Iris-setosa 36 | 5.0,3.2,1.2,0.2,Iris-setosa 37 | 5.5,3.5,1.3,0.2,Iris-setosa 38 | 4.9,3.1,1.5,0.1,Iris-setosa 39 | 4.4,3.0,1.3,0.2,Iris-setosa 40 | 5.1,3.4,1.5,0.2,Iris-setosa 41 | 5.0,3.5,1.3,0.3,Iris-setosa 42 | 4.5,2.3,1.3,0.3,Iris-setosa 43 | 4.4,3.2,1.3,0.2,Iris-setosa 44 | 5.0,3.5,1.6,0.6,Iris-setosa 45 | 5.1,3.8,1.9,0.4,Iris-setosa 46 | 4.8,3.0,1.4,0.3,Iris-setosa 47 | 5.1,3.8,1.6,0.2,Iris-setosa 48 | 4.6,3.2,1.4,0.2,Iris-setosa 49 | 5.3,3.7,1.5,0.2,Iris-setosa 50 | 5.0,3.3,1.4,0.2,Iris-setosa 51 | 7.0,3.2,4.7,1.4,Iris-versicolor 52 | 6.4,3.2,4.5,1.5,Iris-versicolor 53 | 6.9,3.1,4.9,1.5,Iris-versicolor 54 | 5.5,2.3,4.0,1.3,Iris-versicolor 55 | 6.5,2.8,4.6,1.5,Iris-versicolor 56 | 5.7,2.8,4.5,1.3,Iris-versicolor 57 | 6.3,3.3,4.7,1.6,Iris-versicolor 58 | 4.9,2.4,3.3,1.0,Iris-versicolor 59 | 6.6,2.9,4.6,1.3,Iris-versicolor 60 | 5.2,2.7,3.9,1.4,Iris-versicolor 61 | 5.0,2.0,3.5,1.0,Iris-versicolor 62 | 5.9,3.0,4.2,1.5,Iris-versicolor 63 | 6.0,2.2,4.0,1.0,Iris-versicolor 64 | 6.1,2.9,4.7,1.4,Iris-versicolor 65 | 5.6,2.9,3.6,1.3,Iris-versicolor 66 | 6.7,3.1,4.4,1.4,Iris-versicolor 67 | 5.6,3.0,4.5,1.5,Iris-versicolor 68 | 5.8,2.7,4.1,1.0,Iris-versicolor 69 | 6.2,2.2,4.5,1.5,Iris-versicolor 70 | 5.6,2.5,3.9,1.1,Iris-versicolor 71 | 5.9,3.2,4.8,1.8,Iris-versicolor 72 | 6.1,2.8,4.0,1.3,Iris-versicolor 73 | 6.3,2.5,4.9,1.5,Iris-versicolor 74 | 6.1,2.8,4.7,1.2,Iris-versicolor 75 | 6.4,2.9,4.3,1.3,Iris-versicolor 76 | 6.6,3.0,4.4,1.4,Iris-versicolor 77 | 6.8,2.8,4.8,1.4,Iris-versicolor 78 | 6.7,3.0,5.0,1.7,Iris-versicolor 79 | 6.0,2.9,4.5,1.5,Iris-versicolor 80 | 5.7,2.6,3.5,1.0,Iris-versicolor 81 | 5.5,2.4,3.8,1.1,Iris-versicolor 82 | 5.5,2.4,3.7,1.0,Iris-versicolor 83 | 5.8,2.7,3.9,1.2,Iris-versicolor 84 | 6.0,2.7,5.1,1.6,Iris-versicolor 85 | 5.4,3.0,4.5,1.5,Iris-versicolor 86 | 6.0,3.4,4.5,1.6,Iris-versicolor 87 | 6.7,3.1,4.7,1.5,Iris-versicolor 88 | 6.3,2.3,4.4,1.3,Iris-versicolor 89 | 5.6,3.0,4.1,1.3,Iris-versicolor 90 | 5.5,2.5,4.0,1.3,Iris-versicolor 91 | 5.5,2.6,4.4,1.2,Iris-versicolor 92 | 6.1,3.0,4.6,1.4,Iris-versicolor 93 | 5.8,2.6,4.0,1.2,Iris-versicolor 94 | 5.0,2.3,3.3,1.0,Iris-versicolor 95 | 5.6,2.7,4.2,1.3,Iris-versicolor 96 | 5.7,3.0,4.2,1.2,Iris-versicolor 97 | 5.7,2.9,4.2,1.3,Iris-versicolor 98 | 6.2,2.9,4.3,1.3,Iris-versicolor 99 | 5.1,2.5,3.0,1.1,Iris-versicolor 100 | 5.7,2.8,4.1,1.3,Iris-versicolor 101 | 6.3,3.3,6.0,2.5,Iris-virginica 102 | 5.8,2.7,5.1,1.9,Iris-virginica 103 | 7.1,3.0,5.9,2.1,Iris-virginica 104 | 6.3,2.9,5.6,1.8,Iris-virginica 105 | 6.5,3.0,5.8,2.2,Iris-virginica 106 | 7.6,3.0,6.6,2.1,Iris-virginica 107 | 4.9,2.5,4.5,1.7,Iris-virginica 108 | 7.3,2.9,6.3,1.8,Iris-virginica 109 | 6.7,2.5,5.8,1.8,Iris-virginica 110 | 7.2,3.6,6.1,2.5,Iris-virginica 111 | 6.5,3.2,5.1,2.0,Iris-virginica 112 | 6.4,2.7,5.3,1.9,Iris-virginica 113 | 6.8,3.0,5.5,2.1,Iris-virginica 114 | 5.7,2.5,5.0,2.0,Iris-virginica 115 | 5.8,2.8,5.1,2.4,Iris-virginica 116 | 6.4,3.2,5.3,2.3,Iris-virginica 117 | 6.5,3.0,5.5,1.8,Iris-virginica 118 | 7.7,3.8,6.7,2.2,Iris-virginica 119 | 7.7,2.6,6.9,2.3,Iris-virginica 120 | 6.0,2.2,5.0,1.5,Iris-virginica 121 | 6.9,3.2,5.7,2.3,Iris-virginica 122 | 5.6,2.8,4.9,2.0,Iris-virginica 123 | 7.7,2.8,6.7,2.0,Iris-virginica 124 | 6.3,2.7,4.9,1.8,Iris-virginica 125 | 6.7,3.3,5.7,2.1,Iris-virginica 126 | 7.2,3.2,6.0,1.8,Iris-virginica 127 | 6.2,2.8,4.8,1.8,Iris-virginica 128 | 6.1,3.0,4.9,1.8,Iris-virginica 129 | 6.4,2.8,5.6,2.1,Iris-virginica 130 | 7.2,3.0,5.8,1.6,Iris-virginica 131 | 7.4,2.8,6.1,1.9,Iris-virginica 132 | 7.9,3.8,6.4,2.0,Iris-virginica 133 | 6.4,2.8,5.6,2.2,Iris-virginica 134 | 6.3,2.8,5.1,1.5,Iris-virginica 135 | 6.1,2.6,5.6,1.4,Iris-virginica 136 | 7.7,3.0,6.1,2.3,Iris-virginica 137 | 6.3,3.4,5.6,2.4,Iris-virginica 138 | 6.4,3.1,5.5,1.8,Iris-virginica 139 | 6.0,3.0,4.8,1.8,Iris-virginica 140 | 6.9,3.1,5.4,2.1,Iris-virginica 141 | 6.7,3.1,5.6,2.4,Iris-virginica 142 | 6.9,3.1,5.1,2.3,Iris-virginica 143 | 5.8,2.7,5.1,1.9,Iris-virginica 144 | 6.8,3.2,5.9,2.3,Iris-virginica 145 | 6.7,3.3,5.7,2.5,Iris-virginica 146 | 6.7,3.0,5.2,2.3,Iris-virginica 147 | 6.3,2.5,5.0,1.9,Iris-virginica 148 | 6.5,3.0,5.2,2.0,Iris-virginica 149 | 6.2,3.4,5.4,2.3,Iris-virginica 150 | 5.9,3.0,5.1,1.8,Iris-virginica 151 | -------------------------------------------------------------------------------- /Chapter1/regression-datasets-housing.csv: -------------------------------------------------------------------------------- 1 | 0.00632,18,2.31,0,0.538,6.575,65.2,4.09,1,296,15,396.9,4.98,24.0 2 | 0.02731,0,7.07,0,0.469,6.421,78.9,4.9671,2,242,17,396.9,9.14,21.6 3 | 0.02729,0,7.07,0,0.469,7.185,61.1,4.9671,2,242,17,392.83,4.03,34.7 4 | 0.03237,0,2.18,0,0.458,6.998,45.8,6.0622,3,222,18,394.63,2.94,33.4 5 | 0.06905,0,2.18,0,0.458,7.147,54.2,6.0622,3,222,18,396.9,5.33,36.2 6 | 0.02985,0,2.18,0,0.458,6.43,58.7,6.0622,3,222,18,394.12,5.21,28.7 7 | 0.08829,12,7.87,0,0.524,6.012,66.6,5.5605,5,311,15,395.6,12.43,22.9 8 | 0.14455,12,7.87,0,0.524,6.172,96.1,5.9505,5,311,15,396.9,19.15,27.1 9 | 0.21124,12,7.87,0,0.524,5.631,100.0,6.0821,5,311,15,386.63,29.93,16.5 10 | 0.17004,12,7.87,0,0.524,6.004,85.9,6.5921,5,311,15,386.71,17.1,18.9 11 | 0.22489,12,7.87,0,0.524,6.377,94.3,6.3467,5,311,15,392.52,20.45,15.0 12 | 0.11747,12,7.87,0,0.524,6.009,82.9,6.2267,5,311,15,396.9,13.27,18.9 13 | 0.09378,12,7.87,0,0.524,5.889,39.0,5.4509,5,311,15,390.5,15.71,21.7 14 | 0.62976,0,8.14,0,0.538,5.949,61.8,4.7075,4,307,21,396.9,8.26,20.4 15 | 0.63796,0,8.14,0,0.538,6.096,84.5,4.4619,4,307,21,380.02,10.26,18.2 16 | 0.62739,0,8.14,0,0.538,5.834,56.5,4.4986,4,307,21,395.62,8.47,19.9 17 | 1.05393,0,8.14,0,0.538,5.935,29.3,4.4986,4,307,21,386.85,6.58,23.1 18 | 0.7842,0,8.14,0,0.538,5.99,81.7,4.2579,4,307,21,386.75,14.67,17.5 19 | 0.80271,0,8.14,0,0.538,5.456,36.6,3.7965,4,307,21,288.99,11.69,20.2 20 | 0.7258,0,8.14,0,0.538,5.727,69.5,3.7965,4,307,21,390.95,11.28,18.2 21 | 1.25179,0,8.14,0,0.538,5.57,98.1,3.7979,4,307,21,376.57,21.02,13.6 22 | 0.85204,0,8.14,0,0.538,5.965,89.2,4.0123,4,307,21,392.53,13.83,19.6 23 | 1.23247,0,8.14,0,0.538,6.142,91.7,3.9769,4,307,21,396.9,18.72,15.2 24 | 0.98843,0,8.14,0,0.538,5.813,100.0,4.0952,4,307,21,394.54,19.88,14.5 25 | 0.75026,0,8.14,0,0.538,5.924,94.1,4.3996,4,307,21,394.33,16.3,15.6 26 | 0.84054,0,8.14,0,0.538,5.599,85.7,4.4546,4,307,21,303.42,16.51,13.9 27 | 0.67191,0,8.14,0,0.538,5.813,90.3,4.682,4,307,21,376.88,14.81,16.6 28 | 0.95577,0,8.14,0,0.538,6.047,88.8,4.4534,4,307,21,306.38,17.28,14.8 29 | 0.77299,0,8.14,0,0.538,6.495,94.4,4.4547,4,307,21,387.94,12.8,18.4 30 | 1.00245,0,8.14,0,0.538,6.674,87.3,4.239,4,307,21,380.23,11.98,21.0 31 | 1.13081,0,8.14,0,0.538,5.713,94.1,4.233,4,307,21,360.17,22.6,12.7 32 | 1.35472,0,8.14,0,0.538,6.072,100.0,4.175,4,307,21,376.73,13.04,14.5 33 | 1.38799,0,8.14,0,0.538,5.95,82.0,3.99,4,307,21,232.6,27.71,13.2 34 | 1.15172,0,8.14,0,0.538,5.701,95.0,3.7872,4,307,21,358.77,18.35,13.1 35 | 1.61282,0,8.14,0,0.538,6.096,96.9,3.7598,4,307,21,248.31,20.34,13.5 36 | 0.06417,0,5.96,0,0.499,5.933,68.2,3.3603,5,279,19,396.9,9.68,18.9 37 | 0.09744,0,5.96,0,0.499,5.841,61.4,3.3779,5,279,19,377.56,11.41,20.0 38 | 0.08014,0,5.96,0,0.499,5.85,41.5,3.9342,5,279,19,396.9,8.77,21.0 39 | 0.17505,0,5.96,0,0.499,5.966,30.2,3.8473,5,279,19,393.43,10.13,24.7 40 | 0.02763,75,2.95,0,0.428,6.595,21.8,5.4011,3,252,18,395.63,4.32,30.8 41 | 0.03359,75,2.95,0,0.428,7.024,15.8,5.4011,3,252,18,395.62,1.98,34.9 42 | 0.12744,0,6.91,0,0.448,6.77,2.9,5.7209,3,233,17,385.41,4.84,26.6 43 | 0.1415,0,6.91,0,0.448,6.169,6.6,5.7209,3,233,17,383.37,5.81,25.3 44 | 0.15936,0,6.91,0,0.448,6.211,6.5,5.7209,3,233,17,394.46,7.44,24.7 45 | 0.12269,0,6.91,0,0.448,6.069,40.0,5.7209,3,233,17,389.39,9.55,21.2 46 | 0.17142,0,6.91,0,0.448,5.682,33.8,5.1004,3,233,17,396.9,10.21,19.3 47 | 0.18836,0,6.91,0,0.448,5.786,33.3,5.1004,3,233,17,396.9,14.15,20.0 48 | 0.22927,0,6.91,0,0.448,6.03,85.5,5.6894,3,233,17,392.74,18.8,16.6 49 | 0.25387,0,6.91,0,0.448,5.399,95.3,5.87,3,233,17,396.9,30.81,14.4 50 | 0.21977,0,6.91,0,0.448,5.602,62.0,6.0877,3,233,17,396.9,16.2,19.4 51 | 0.08873,21,5.64,0,0.439,5.963,45.7,6.8147,4,243,16,395.56,13.45,19.7 52 | 0.04337,21,5.64,0,0.439,6.115,63.0,6.8147,4,243,16,393.97,9.43,20.5 53 | 0.0536,21,5.64,0,0.439,6.511,21.1,6.8147,4,243,16,396.9,5.28,25.0 54 | 0.04981,21,5.64,0,0.439,5.998,21.4,6.8147,4,243,16,396.9,8.43,23.4 55 | 0.0136,75,4.0,0,0.41,5.888,47.6,7.3197,3,469,21,396.9,14.8,18.9 56 | 0.01311,90,1.22,0,0.403,7.249,21.9,8.6966,5,226,17,395.93,4.81,35.4 57 | 0.02055,85,0.74,0,0.41,6.383,35.7,9.1876,2,313,17,396.9,5.77,24.7 58 | 0.01432,100,1.32,0,0.411,6.816,40.5,8.3248,5,256,15,392.9,3.95,31.6 59 | 0.15445,25,5.13,0,0.453,6.145,29.2,7.8148,8,284,19,390.68,6.86,23.3 60 | 0.10328,25,5.13,0,0.453,5.927,47.2,6.932,8,284,19,396.9,9.22,19.6 61 | 0.14932,25,5.13,0,0.453,5.741,66.2,7.2254,8,284,19,395.11,13.15,18.7 62 | 0.17171,25,5.13,0,0.453,5.966,93.4,6.8185,8,284,19,378.08,14.44,16.0 63 | 0.11027,25,5.13,0,0.453,6.456,67.8,7.2255,8,284,19,396.9,6.73,22.2 64 | 0.1265,25,5.13,0,0.453,6.762,43.4,7.9809,8,284,19,395.58,9.5,25.0 65 | 0.01951,17,1.38,0,0.4161,7.104,59.5,9.2229,3,216,18,393.24,8.05,33.0 66 | 0.03584,80,3.37,0,0.398,6.29,17.8,6.6115,4,337,16,396.9,4.67,23.5 67 | 0.04379,80,3.37,0,0.398,5.787,31.1,6.6115,4,337,16,396.9,10.24,19.4 68 | 0.05789,12,6.07,0,0.409,5.878,21.4,6.498,4,345,18,396.21,8.1,22.0 69 | 0.13554,12,6.07,0,0.409,5.594,36.8,6.498,4,345,18,396.9,13.09,17.4 70 | 0.12816,12,6.07,0,0.409,5.885,33.0,6.498,4,345,18,396.9,8.79,20.9 71 | 0.08826,0,10.81,0,0.413,6.417,6.6,5.2873,4,305,19,383.73,6.72,24.2 72 | 0.15876,0,10.81,0,0.413,5.961,17.5,5.2873,4,305,19,376.94,9.88,21.7 73 | 0.09164,0,10.81,0,0.413,6.065,7.8,5.2873,4,305,19,390.91,5.52,22.8 74 | 0.19539,0,10.81,0,0.413,6.245,6.2,5.2873,4,305,19,377.17,7.54,23.4 75 | 0.07896,0,12.83,0,0.437,6.273,6.0,4.2515,5,398,18,394.92,6.78,24.1 76 | 0.09512,0,12.83,0,0.437,6.286,45.0,4.5026,5,398,18,383.23,8.94,21.4 77 | 0.10153,0,12.83,0,0.437,6.279,74.5,4.0522,5,398,18,373.66,11.97,20.0 78 | 0.08707,0,12.83,0,0.437,6.14,45.8,4.0905,5,398,18,386.96,10.27,20.8 79 | 0.05646,0,12.83,0,0.437,6.232,53.7,5.0141,5,398,18,386.4,12.34,21.2 80 | 0.08387,0,12.83,0,0.437,5.874,36.6,4.5026,5,398,18,396.06,9.1,20.3 81 | 0.04113,25,4.86,0,0.426,6.727,33.5,5.4007,4,281,19,396.9,5.29,28.0 82 | 0.04462,25,4.86,0,0.426,6.619,70.4,5.4007,4,281,19,395.63,7.22,23.9 83 | 0.03659,25,4.86,0,0.426,6.302,32.2,5.4007,4,281,19,396.9,6.72,24.8 84 | 0.03551,25,4.86,0,0.426,6.167,46.7,5.4007,4,281,19,390.64,7.51,22.9 85 | 0.05059,0,4.49,0,0.449,6.389,48.0,4.7794,3,247,18,396.9,9.62,23.9 86 | 0.05735,0,4.49,0,0.449,6.63,56.1,4.4377,3,247,18,392.3,6.53,26.6 87 | 0.05188,0,4.49,0,0.449,6.015,45.1,4.4272,3,247,18,395.99,12.86,22.5 88 | 0.07151,0,4.49,0,0.449,6.121,56.8,3.7476,3,247,18,395.15,8.44,22.2 89 | 0.0566,0,3.41,0,0.489,7.007,86.3,3.4217,2,270,17,396.9,5.5,23.6 90 | 0.05302,0,3.41,0,0.489,7.079,63.1,3.4145,2,270,17,396.06,5.7,28.7 91 | 0.04684,0,3.41,0,0.489,6.417,66.1,3.0923,2,270,17,392.18,8.81,22.6 92 | 0.03932,0,3.41,0,0.489,6.405,73.9,3.0921,2,270,17,393.55,8.2,22.0 93 | 0.04203,28,15.04,0,0.464,6.442,53.6,3.6659,4,270,18,395.01,8.16,22.9 94 | 0.02875,28,15.04,0,0.464,6.211,28.9,3.6659,4,270,18,396.33,6.21,25.0 95 | 0.04294,28,15.04,0,0.464,6.249,77.3,3.615,4,270,18,396.9,10.59,20.6 96 | 0.12204,0,2.89,0,0.445,6.625,57.8,3.4952,2,276,18,357.98,6.65,28.4 97 | 0.11504,0,2.89,0,0.445,6.163,69.6,3.4952,2,276,18,391.83,11.34,21.4 98 | 0.12083,0,2.89,0,0.445,8.069,76.0,3.4952,2,276,18,396.9,4.21,38.7 99 | 0.08187,0,2.89,0,0.445,7.82,36.9,3.4952,2,276,18,393.53,3.57,43.8 100 | 0.0686,0,2.89,0,0.445,7.416,62.5,3.4952,2,276,18,396.9,6.19,33.2 101 | 0.14866,0,8.56,0,0.52,6.727,79.9,2.7778,5,384,20,394.76,9.42,27.5 102 | 0.11432,0,8.56,0,0.52,6.781,71.3,2.8561,5,384,20,395.58,7.67,26.5 103 | 0.22876,0,8.56,0,0.52,6.405,85.4,2.7147,5,384,20,70.8,10.63,18.6 104 | 0.21161,0,8.56,0,0.52,6.137,87.4,2.7147,5,384,20,394.47,13.44,19.3 105 | 0.1396,0,8.56,0,0.52,6.167,90.0,2.421,5,384,20,392.69,12.33,20.1 106 | 0.13262,0,8.56,0,0.52,5.851,96.7,2.1069,5,384,20,394.05,16.47,19.5 107 | 0.1712,0,8.56,0,0.52,5.836,91.9,2.211,5,384,20,395.67,18.66,19.5 108 | 0.13117,0,8.56,0,0.52,6.127,85.2,2.1224,5,384,20,387.69,14.09,20.4 109 | 0.12802,0,8.56,0,0.52,6.474,97.1,2.4329,5,384,20,395.24,12.27,19.8 110 | 0.26363,0,8.56,0,0.52,6.229,91.2,2.5451,5,384,20,391.23,15.55,19.4 111 | 0.10793,0,8.56,0,0.52,6.195,54.4,2.7778,5,384,20,393.49,13.0,21.7 112 | 0.10084,0,10.01,0,0.547,6.715,81.6,2.6775,6,432,17,395.59,10.16,22.8 113 | 0.12329,0,10.01,0,0.547,5.913,92.9,2.3534,6,432,17,394.95,16.21,18.8 114 | 0.22212,0,10.01,0,0.547,6.092,95.4,2.548,6,432,17,396.9,17.09,18.7 115 | 0.14231,0,10.01,0,0.547,6.254,84.2,2.2565,6,432,17,388.74,10.45,18.5 116 | 0.17134,0,10.01,0,0.547,5.928,88.2,2.4631,6,432,17,344.91,15.76,18.3 117 | 0.13158,0,10.01,0,0.547,6.176,72.5,2.7301,6,432,17,393.3,12.04,21.2 118 | 0.15098,0,10.01,0,0.547,6.021,82.6,2.7474,6,432,17,394.51,10.3,19.2 119 | 0.13058,0,10.01,0,0.547,5.872,73.1,2.4775,6,432,17,338.63,15.37,20.4 120 | 0.14476,0,10.01,0,0.547,5.731,65.2,2.7592,6,432,17,391.5,13.61,19.3 121 | 0.06899,0,25.65,0,0.581,5.87,69.7,2.2577,2,188,19,389.15,14.37,22.0 122 | 0.07165,0,25.65,0,0.581,6.004,84.1,2.1974,2,188,19,377.67,14.27,20.3 123 | 0.09299,0,25.65,0,0.581,5.961,92.9,2.0869,2,188,19,378.09,17.93,20.5 124 | 0.15038,0,25.65,0,0.581,5.856,97.0,1.9444,2,188,19,370.31,25.41,17.3 125 | 0.09849,0,25.65,0,0.581,5.879,95.8,2.0063,2,188,19,379.38,17.58,18.8 126 | 0.16902,0,25.65,0,0.581,5.986,88.4,1.9929,2,188,19,385.02,14.81,21.4 127 | 0.38735,0,25.65,0,0.581,5.613,95.6,1.7572,2,188,19,359.29,27.26,15.7 128 | 0.25915,0,21.89,0,0.624,5.693,96.0,1.7883,4,437,21,392.11,17.19,16.2 129 | 0.32543,0,21.89,0,0.624,6.431,98.8,1.8125,4,437,21,396.9,15.39,18.0 130 | 0.88125,0,21.89,0,0.624,5.637,94.7,1.9799,4,437,21,396.9,18.34,14.3 131 | 0.34006,0,21.89,0,0.624,6.458,98.9,2.1185,4,437,21,395.04,12.6,19.2 132 | 1.19294,0,21.89,0,0.624,6.326,97.7,2.271,4,437,21,396.9,12.26,19.6 133 | 0.59005,0,21.89,0,0.624,6.372,97.9,2.3274,4,437,21,385.76,11.12,23.0 134 | 0.32982,0,21.89,0,0.624,5.822,95.4,2.4699,4,437,21,388.69,15.03,18.4 135 | 0.97617,0,21.89,0,0.624,5.757,98.4,2.346,4,437,21,262.76,17.31,15.6 136 | 0.55778,0,21.89,0,0.624,6.335,98.2,2.1107,4,437,21,394.67,16.96,18.1 137 | 0.32264,0,21.89,0,0.624,5.942,93.5,1.9669,4,437,21,378.25,16.9,17.4 138 | 0.35233,0,21.89,0,0.624,6.454,98.4,1.8498,4,437,21,394.08,14.59,17.1 139 | 0.2498,0,21.89,0,0.624,5.857,98.2,1.6686,4,437,21,392.04,21.32,13.3 140 | 0.54452,0,21.89,0,0.624,6.151,97.9,1.6687,4,437,21,396.9,18.46,17.8 141 | 0.2909,0,21.89,0,0.624,6.174,93.6,1.6119,4,437,21,388.08,24.16,14.0 142 | 1.62864,0,21.89,0,0.624,5.019,100.0,1.4394,4,437,21,396.9,34.41,14.4 143 | 3.32105,0,19.58,1,0.871,5.403,100.0,1.3216,5,403,14,396.9,26.82,13.4 144 | 4.0974,0,19.58,0,0.871,5.468,100.0,1.4118,5,403,14,396.9,26.42,15.6 145 | 2.77974,0,19.58,0,0.871,4.903,97.8,1.3459,5,403,14,396.9,29.29,11.8 146 | 2.37934,0,19.58,0,0.871,6.13,100.0,1.4191,5,403,14,172.91,27.8,13.8 147 | 2.15505,0,19.58,0,0.871,5.628,100.0,1.5166,5,403,14,169.27,16.65,15.6 148 | 2.36862,0,19.58,0,0.871,4.926,95.7,1.4608,5,403,14,391.71,29.53,14.6 149 | 2.33099,0,19.58,0,0.871,5.186,93.8,1.5296,5,403,14,356.99,28.32,17.8 150 | 2.73397,0,19.58,0,0.871,5.597,94.9,1.5257,5,403,14,351.85,21.45,15.4 151 | 1.6566,0,19.58,0,0.871,6.122,97.3,1.618,5,403,14,372.8,14.1,21.5 152 | 1.49632,0,19.58,0,0.871,5.404,100.0,1.5916,5,403,14,341.6,13.28,19.6 153 | 1.12658,0,19.58,1,0.871,5.012,88.0,1.6102,5,403,14,343.28,12.12,15.3 154 | 2.14918,0,19.58,0,0.871,5.709,98.5,1.6232,5,403,14,261.95,15.79,19.4 155 | 1.41385,0,19.58,1,0.871,6.129,96.0,1.7494,5,403,14,321.02,15.12,17.0 156 | 3.53501,0,19.58,1,0.871,6.152,82.6,1.7455,5,403,14,88.01,15.02,15.6 157 | 2.44668,0,19.58,0,0.871,5.272,94.0,1.7364,5,403,14,88.63,16.14,13.1 158 | 1.22358,0,19.58,0,0.605,6.943,97.4,1.8773,5,403,14,363.43,4.59,41.3 159 | 1.34284,0,19.58,0,0.605,6.066,100.0,1.7573,5,403,14,353.89,6.43,24.3 160 | 1.42502,0,19.58,0,0.871,6.51,100.0,1.7659,5,403,14,364.31,7.39,23.3 161 | 1.27346,0,19.58,1,0.605,6.25,92.6,1.7984,5,403,14,338.92,5.5,27.0 162 | 1.46336,0,19.58,0,0.605,7.489,90.8,1.9709,5,403,14,374.43,1.73,50.0 163 | 1.83377,0,19.58,1,0.605,7.802,98.2,2.0407,5,403,14,389.61,1.92,50.0 164 | 1.51902,0,19.58,1,0.605,8.375,93.9,2.162,5,403,14,388.45,3.32,50.0 165 | 2.24236,0,19.58,0,0.605,5.854,91.8,2.422,5,403,14,395.11,11.64,22.7 166 | 2.924,0,19.58,0,0.605,6.101,93.0,2.2834,5,403,14,240.16,9.81,25.0 167 | 2.01019,0,19.58,0,0.605,7.929,96.2,2.0459,5,403,14,369.3,3.7,50.0 168 | 1.80028,0,19.58,0,0.605,5.877,79.2,2.4259,5,403,14,227.61,12.14,23.8 169 | 2.3004,0,19.58,0,0.605,6.319,96.1,2.1,5,403,14,297.09,11.1,23.8 170 | 2.44953,0,19.58,0,0.605,6.402,95.2,2.2625,5,403,14,330.04,11.32,22.3 171 | 1.20742,0,19.58,0,0.605,5.875,94.6,2.4259,5,403,14,292.29,14.43,17.4 172 | 2.3139,0,19.58,0,0.605,5.88,97.3,2.3887,5,403,14,348.13,12.03,19.1 173 | 0.13914,0,4.05,0,0.51,5.572,88.5,2.5961,5,296,16,396.9,14.69,23.1 174 | 0.09178,0,4.05,0,0.51,6.416,84.1,2.6463,5,296,16,395.5,9.04,23.6 175 | 0.08447,0,4.05,0,0.51,5.859,68.7,2.7019,5,296,16,393.23,9.64,22.6 176 | 0.06664,0,4.05,0,0.51,6.546,33.1,3.1323,5,296,16,390.96,5.33,29.4 177 | 0.07022,0,4.05,0,0.51,6.02,47.2,3.5549,5,296,16,393.23,10.11,23.2 178 | 0.05425,0,4.05,0,0.51,6.315,73.4,3.3175,5,296,16,395.6,6.29,24.6 179 | 0.06642,0,4.05,0,0.51,6.86,74.4,2.9153,5,296,16,391.27,6.92,29.9 180 | 0.0578,0,2.46,0,0.488,6.98,58.4,2.829,3,193,17,396.9,5.04,37.2 181 | 0.06588,0,2.46,0,0.488,7.765,83.3,2.741,3,193,17,395.56,7.56,39.8 182 | 0.06888,0,2.46,0,0.488,6.144,62.2,2.5979,3,193,17,396.9,9.45,36.2 183 | 0.09103,0,2.46,0,0.488,7.155,92.2,2.7006,3,193,17,394.12,4.82,37.9 184 | 0.10008,0,2.46,0,0.488,6.563,95.6,2.847,3,193,17,396.9,5.68,32.5 185 | 0.08308,0,2.46,0,0.488,5.604,89.8,2.9879,3,193,17,391.0,13.98,26.4 186 | 0.06047,0,2.46,0,0.488,6.153,68.8,3.2797,3,193,17,387.11,13.15,29.6 187 | 0.05602,0,2.46,0,0.488,7.831,53.6,3.1992,3,193,17,392.63,4.45,50.0 188 | 0.07875,45,3.44,0,0.437,6.782,41.1,3.7886,5,398,15,393.87,6.68,32.0 189 | 0.12579,45,3.44,0,0.437,6.556,29.1,4.5667,5,398,15,382.84,4.56,29.8 190 | 0.0837,45,3.44,0,0.437,7.185,38.9,4.5667,5,398,15,396.9,5.39,34.9 191 | 0.09068,45,3.44,0,0.437,6.951,21.5,6.4798,5,398,15,377.68,5.1,37.0 192 | 0.06911,45,3.44,0,0.437,6.739,30.8,6.4798,5,398,15,389.71,4.69,30.5 193 | 0.08664,45,3.44,0,0.437,7.178,26.3,6.4798,5,398,15,390.49,2.87,36.4 194 | 0.02187,60,2.93,0,0.401,6.8,9.9,6.2196,1,265,15,393.37,5.03,31.1 195 | 0.01439,60,2.93,0,0.401,6.604,18.8,6.2196,1,265,15,376.7,4.38,29.1 196 | 0.01381,80,0.46,0,0.422,7.875,32.0,5.6484,4,255,14,394.23,2.97,50.0 197 | 0.04011,80,1.52,0,0.404,7.287,34.1,7.309,2,329,12,396.9,4.08,33.3 198 | 0.04666,80,1.52,0,0.404,7.107,36.6,7.309,2,329,12,354.31,8.61,30.3 199 | 0.03768,80,1.52,0,0.404,7.274,38.3,7.309,2,329,12,392.2,6.62,34.6 200 | 0.0315,95,1.47,0,0.403,6.975,15.3,7.6534,3,402,17,396.9,4.56,34.9 201 | 0.01778,95,1.47,0,0.403,7.135,13.9,7.6534,3,402,17,384.3,4.45,32.9 202 | 0.03445,82,2.03,0,0.415,6.162,38.4,6.27,2,348,14,393.77,7.43,24.1 203 | 0.02177,82,2.03,0,0.415,7.61,15.7,6.27,2,348,14,395.38,3.11,42.3 204 | 0.0351,95,2.68,0,0.4161,7.853,33.2,5.118,4,224,14,392.78,3.81,48.5 205 | 0.02009,95,2.68,0,0.4161,8.034,31.9,5.118,4,224,14,390.55,2.88,50.0 206 | 0.13642,0,10.59,0,0.489,5.891,22.3,3.9454,4,277,18,396.9,10.87,22.6 207 | 0.22969,0,10.59,0,0.489,6.326,52.5,4.3549,4,277,18,394.87,10.97,24.4 208 | 0.25199,0,10.59,0,0.489,5.783,72.7,4.3549,4,277,18,389.43,18.06,22.5 209 | 0.13587,0,10.59,1,0.489,6.064,59.1,4.2392,4,277,18,381.32,14.66,24.4 210 | 0.43571,0,10.59,1,0.489,5.344,100.0,3.875,4,277,18,396.9,23.09,20.0 211 | 0.17446,0,10.59,1,0.489,5.96,92.1,3.8771,4,277,18,393.25,17.27,21.7 212 | 0.37578,0,10.59,1,0.489,5.404,88.6,3.665,4,277,18,395.24,23.98,19.3 213 | 0.21719,0,10.59,1,0.489,5.807,53.8,3.6526,4,277,18,390.94,16.03,22.4 214 | 0.14052,0,10.59,0,0.489,6.375,32.3,3.9454,4,277,18,385.81,9.38,28.1 215 | 0.28955,0,10.59,0,0.489,5.412,9.8,3.5875,4,277,18,348.93,29.55,23.7 216 | 0.19802,0,10.59,0,0.489,6.182,42.4,3.9454,4,277,18,393.63,9.47,25.0 217 | 0.0456,0,13.89,1,0.55,5.888,56.0,3.1121,5,276,16,392.8,13.51,23.3 218 | 0.07013,0,13.89,0,0.55,6.642,85.1,3.4211,5,276,16,392.78,9.69,28.7 219 | 0.11069,0,13.89,1,0.55,5.951,93.8,2.8893,5,276,16,396.9,17.92,21.5 220 | 0.11425,0,13.89,1,0.55,6.373,92.4,3.3633,5,276,16,393.74,10.5,23.0 221 | 0.35809,0,6.2,1,0.507,6.951,88.5,2.8617,8,307,17,391.7,9.71,26.7 222 | 0.40771,0,6.2,1,0.507,6.164,91.3,3.048,8,307,17,395.24,21.46,21.7 223 | 0.62356,0,6.2,1,0.507,6.879,77.7,3.2721,8,307,17,390.39,9.93,27.5 224 | 0.6147,0,6.2,0,0.507,6.618,80.8,3.2721,8,307,17,396.9,7.6,30.1 225 | 0.31533,0,6.2,0,0.504,8.266,78.3,2.8944,8,307,17,385.05,4.14,44.8 226 | 0.52693,0,6.2,0,0.504,8.725,83.0,2.8944,8,307,17,382.0,4.63,50.0 227 | 0.38214,0,6.2,0,0.504,8.04,86.5,3.2157,8,307,17,387.38,3.13,37.6 228 | 0.41238,0,6.2,0,0.504,7.163,79.9,3.2157,8,307,17,372.08,6.36,31.6 229 | 0.29819,0,6.2,0,0.504,7.686,17.0,3.3751,8,307,17,377.51,3.92,46.7 230 | 0.44178,0,6.2,0,0.504,6.552,21.4,3.3751,8,307,17,380.34,3.76,31.5 231 | 0.537,0,6.2,0,0.504,5.981,68.1,3.6715,8,307,17,378.35,11.65,24.3 232 | 0.46296,0,6.2,0,0.504,7.412,76.9,3.6715,8,307,17,376.14,5.25,31.7 233 | 0.57529,0,6.2,0,0.507,8.337,73.3,3.8384,8,307,17,385.91,2.47,41.7 234 | 0.33147,0,6.2,0,0.507,8.247,70.4,3.6519,8,307,17,378.95,3.95,48.3 235 | 0.44791,0,6.2,1,0.507,6.726,66.5,3.6519,8,307,17,360.2,8.05,29.0 236 | 0.33045,0,6.2,0,0.507,6.086,61.5,3.6519,8,307,17,376.75,10.88,24.0 237 | 0.52058,0,6.2,1,0.507,6.631,76.5,4.148,8,307,17,388.45,9.54,25.1 238 | 0.51183,0,6.2,0,0.507,7.358,71.6,4.148,8,307,17,390.07,4.73,31.5 239 | 0.08244,30,4.93,0,0.428,6.481,18.5,6.1899,6,300,16,379.41,6.36,23.7 240 | 0.09252,30,4.93,0,0.428,6.606,42.2,6.1899,6,300,16,383.78,7.37,23.3 241 | 0.11329,30,4.93,0,0.428,6.897,54.3,6.3361,6,300,16,391.25,11.38,22.0 242 | 0.10612,30,4.93,0,0.428,6.095,65.1,6.3361,6,300,16,394.62,12.4,20.1 243 | 0.1029,30,4.93,0,0.428,6.358,52.9,7.0355,6,300,16,372.75,11.22,22.2 244 | 0.12757,30,4.93,0,0.428,6.393,7.8,7.0355,6,300,16,374.71,5.19,23.7 245 | 0.20608,22,5.86,0,0.431,5.593,76.5,7.9549,7,330,19,372.49,12.5,17.6 246 | 0.19133,22,5.86,0,0.431,5.605,70.2,7.9549,7,330,19,389.13,18.46,18.5 247 | 0.33983,22,5.86,0,0.431,6.108,34.9,8.0555,7,330,19,390.18,9.16,24.3 248 | 0.19657,22,5.86,0,0.431,6.226,79.2,8.0555,7,330,19,376.14,10.15,20.5 249 | 0.16439,22,5.86,0,0.431,6.433,49.1,7.8265,7,330,19,374.71,9.52,24.5 250 | 0.19073,22,5.86,0,0.431,6.718,17.5,7.8265,7,330,19,393.74,6.56,26.2 251 | 0.1403,22,5.86,0,0.431,6.487,13.0,7.3967,7,330,19,396.28,5.9,24.4 252 | 0.21409,22,5.86,0,0.431,6.438,8.9,7.3967,7,330,19,377.07,3.59,24.8 253 | 0.08221,22,5.86,0,0.431,6.957,6.8,8.9067,7,330,19,386.09,3.53,29.6 254 | 0.36894,22,5.86,0,0.431,8.259,8.4,8.9067,7,330,19,396.9,3.54,42.8 255 | 0.04819,80,3.64,0,0.392,6.108,32.0,9.2203,1,315,16,392.89,6.57,21.9 256 | 0.03548,80,3.64,0,0.392,5.876,19.1,9.2203,1,315,16,395.18,9.25,20.9 257 | 0.01538,90,3.75,0,0.394,7.454,34.2,6.3361,3,244,15,386.34,3.11,44.0 258 | 0.61154,20,3.97,0,0.647,8.704,86.9,1.801,5,264,13,389.7,5.12,50.0 259 | 0.66351,20,3.97,0,0.647,7.333,100.0,1.8946,5,264,13,383.29,7.79,36.0 260 | 0.65665,20,3.97,0,0.647,6.842,100.0,2.0107,5,264,13,391.93,6.9,30.1 261 | 0.54011,20,3.97,0,0.647,7.203,81.8,2.1121,5,264,13,392.8,9.59,33.8 262 | 0.53412,20,3.97,0,0.647,7.52,89.4,2.1398,5,264,13,388.37,7.26,43.1 263 | 0.52014,20,3.97,0,0.647,8.398,91.5,2.2885,5,264,13,386.86,5.91,48.8 264 | 0.82526,20,3.97,0,0.647,7.327,94.5,2.0788,5,264,13,393.42,11.25,31.0 265 | 0.55007,20,3.97,0,0.647,7.206,91.6,1.9301,5,264,13,387.89,8.1,36.5 266 | 0.76162,20,3.97,0,0.647,5.56,62.8,1.9865,5,264,13,392.4,10.45,22.8 267 | 0.7857,20,3.97,0,0.647,7.014,84.6,2.1329,5,264,13,384.07,14.79,30.7 268 | 0.57834,20,3.97,0,0.575,8.297,67.0,2.4216,5,264,13,384.54,7.44,50.0 269 | 0.5405,20,3.97,0,0.575,7.47,52.6,2.872,5,264,13,390.3,3.16,43.5 270 | 0.09065,20,6.96,1,0.464,5.92,61.5,3.9175,3,223,18,391.34,13.65,20.7 271 | 0.29916,20,6.96,0,0.464,5.856,42.1,4.429,3,223,18,388.65,13.0,21.1 272 | 0.16211,20,6.96,0,0.464,6.24,16.3,4.429,3,223,18,396.9,6.59,25.2 273 | 0.1146,20,6.96,0,0.464,6.538,58.7,3.9175,3,223,18,394.96,7.73,24.4 274 | 0.22188,20,6.96,1,0.464,7.691,51.8,4.3665,3,223,18,390.77,6.58,35.2 275 | 0.05644,40,6.41,1,0.447,6.758,32.9,4.0776,4,254,17,396.9,3.53,32.4 276 | 0.09604,40,6.41,0,0.447,6.854,42.8,4.2673,4,254,17,396.9,2.98,32.0 277 | 0.10469,40,6.41,1,0.447,7.267,49.0,4.7872,4,254,17,389.25,6.05,33.2 278 | 0.06127,40,6.41,1,0.447,6.826,27.6,4.8628,4,254,17,393.45,4.16,33.1 279 | 0.07978,40,6.41,0,0.447,6.482,32.1,4.1403,4,254,17,396.9,7.19,29.1 280 | 0.21038,20,3.33,0,0.4429,6.812,32.2,4.1007,5,216,14,396.9,4.85,35.1 281 | 0.03578,20,3.33,0,0.4429,7.82,64.5,4.6947,5,216,14,387.31,3.76,45.4 282 | 0.03705,20,3.33,0,0.4429,6.968,37.2,5.2447,5,216,14,392.23,4.59,35.4 283 | 0.06129,20,3.33,1,0.4429,7.645,49.7,5.2119,5,216,14,377.07,3.01,46.0 284 | 0.01501,90,1.21,1,0.401,7.923,24.8,5.885,1,198,13,395.52,3.16,50.0 285 | 0.00906,90,2.97,0,0.4,7.088,20.8,7.3073,1,285,15,394.72,7.85,32.2 286 | 0.01096,55,2.25,0,0.389,6.453,31.9,7.3073,1,300,15,394.72,8.23,22.0 287 | 0.01965,80,1.76,0,0.385,6.23,31.5,9.0892,1,241,18,341.6,12.93,20.1 288 | 0.03871,52,5.32,0,0.405,6.209,31.3,7.3172,6,293,16,396.9,7.14,23.2 289 | 0.0459,52,5.32,0,0.405,6.315,45.6,7.3172,6,293,16,396.9,7.6,22.3 290 | 0.04297,52,5.32,0,0.405,6.565,22.9,7.3172,6,293,16,371.72,9.51,24.8 291 | 0.03502,80,4.95,0,0.411,6.861,27.9,5.1167,4,245,19,396.9,3.33,28.5 292 | 0.07886,80,4.95,0,0.411,7.148,27.7,5.1167,4,245,19,396.9,3.56,37.3 293 | 0.03615,80,4.95,0,0.411,6.63,23.4,5.1167,4,245,19,396.9,4.7,27.9 294 | 0.08265,0,13.92,0,0.437,6.127,18.4,5.5027,4,289,16,396.9,8.58,23.9 295 | 0.08199,0,13.92,0,0.437,6.009,42.3,5.5027,4,289,16,396.9,10.4,21.7 296 | 0.12932,0,13.92,0,0.437,6.678,31.1,5.9604,4,289,16,396.9,6.27,28.6 297 | 0.05372,0,13.92,0,0.437,6.549,51.0,5.9604,4,289,16,392.85,7.39,27.1 298 | 0.14103,0,13.92,0,0.437,5.79,58.0,6.32,4,289,16,396.9,15.84,20.3 299 | 0.06466,70,2.24,0,0.4,6.345,20.1,7.8278,5,358,14,368.24,4.97,22.5 300 | 0.05561,70,2.24,0,0.4,7.041,10.0,7.8278,5,358,14,371.58,4.74,29.0 301 | 0.04417,70,2.24,0,0.4,6.871,47.4,7.8278,5,358,14,390.86,6.07,24.8 302 | 0.03537,34,6.09,0,0.433,6.59,40.4,5.4917,7,329,16,395.75,9.5,22.0 303 | 0.09266,34,6.09,0,0.433,6.495,18.4,5.4917,7,329,16,383.61,8.67,26.4 304 | 0.1,34,6.09,0,0.433,6.982,17.7,5.4917,7,329,16,390.43,4.86,33.1 305 | 0.05515,33,2.18,0,0.472,7.236,41.1,4.022,7,222,18,393.68,6.93,36.1 306 | 0.05479,33,2.18,0,0.472,6.616,58.1,3.37,7,222,18,393.36,8.93,28.4 307 | 0.07503,33,2.18,0,0.472,7.42,71.9,3.0992,7,222,18,396.9,6.47,33.4 308 | 0.04932,33,2.18,0,0.472,6.849,70.3,3.1827,7,222,18,396.9,7.53,28.2 309 | 0.49298,0,9.9,0,0.544,6.635,82.5,3.3175,4,304,18,396.9,4.54,22.8 310 | 0.3494,0,9.9,0,0.544,5.972,76.7,3.1025,4,304,18,396.24,9.97,20.3 311 | 2.63548,0,9.9,0,0.544,4.973,37.8,2.5194,4,304,18,350.45,12.64,16.1 312 | 0.79041,0,9.9,0,0.544,6.122,52.8,2.6403,4,304,18,396.9,5.98,22.1 313 | 0.26169,0,9.9,0,0.544,6.023,90.4,2.834,4,304,18,396.3,11.72,19.4 314 | 0.26938,0,9.9,0,0.544,6.266,82.8,3.2628,4,304,18,393.39,7.9,21.6 315 | 0.3692,0,9.9,0,0.544,6.567,87.3,3.6023,4,304,18,395.69,9.28,23.8 316 | 0.25356,0,9.9,0,0.544,5.705,77.7,3.945,4,304,18,396.42,11.5,16.2 317 | 0.31827,0,9.9,0,0.544,5.914,83.2,3.9986,4,304,18,390.7,18.33,17.8 318 | 0.24522,0,9.9,0,0.544,5.782,71.7,4.0317,4,304,18,396.9,15.94,19.8 319 | 0.40202,0,9.9,0,0.544,6.382,67.2,3.5325,4,304,18,395.21,10.36,23.1 320 | 0.47547,0,9.9,0,0.544,6.113,58.8,4.0019,4,304,18,396.23,12.73,21.0 321 | 0.1676,0,7.38,0,0.493,6.426,52.3,4.5404,5,287,19,396.9,7.2,23.8 322 | 0.18159,0,7.38,0,0.493,6.376,54.3,4.5404,5,287,19,396.9,6.87,23.1 323 | 0.35114,0,7.38,0,0.493,6.041,49.9,4.7211,5,287,19,396.9,7.7,20.4 324 | 0.28392,0,7.38,0,0.493,5.708,74.3,4.7211,5,287,19,391.13,11.74,18.5 325 | 0.34109,0,7.38,0,0.493,6.415,40.1,4.7211,5,287,19,396.9,6.12,25.0 326 | 0.19186,0,7.38,0,0.493,6.431,14.7,5.4159,5,287,19,393.68,5.08,24.6 327 | 0.30347,0,7.38,0,0.493,6.312,28.9,5.4159,5,287,19,396.9,6.15,23.0 328 | 0.24103,0,7.38,0,0.493,6.083,43.7,5.4159,5,287,19,396.9,12.79,22.2 329 | 0.06617,0,3.24,0,0.46,5.868,25.8,5.2146,4,430,16,382.44,9.97,19.3 330 | 0.06724,0,3.24,0,0.46,6.333,17.2,5.2146,4,430,16,375.21,7.34,22.6 331 | 0.04544,0,3.24,0,0.46,6.144,32.2,5.8736,4,430,16,368.57,9.09,19.8 332 | 0.05023,35,6.06,0,0.4379,5.706,28.4,6.6407,1,304,16,394.02,12.43,17.1 333 | 0.03466,35,6.06,0,0.4379,6.031,23.3,6.6407,1,304,16,362.25,7.83,19.4 334 | 0.05083,0,5.19,0,0.515,6.316,38.1,6.4584,5,224,20,389.71,5.68,22.2 335 | 0.03738,0,5.19,0,0.515,6.31,38.5,6.4584,5,224,20,389.4,6.75,20.7 336 | 0.03961,0,5.19,0,0.515,6.037,34.5,5.9853,5,224,20,396.9,8.01,21.1 337 | 0.03427,0,5.19,0,0.515,5.869,46.3,5.2311,5,224,20,396.9,9.8,19.5 338 | 0.03041,0,5.19,0,0.515,5.895,59.6,5.615,5,224,20,394.81,10.56,18.5 339 | 0.03306,0,5.19,0,0.515,6.059,37.3,4.8122,5,224,20,396.14,8.51,20.6 340 | 0.05497,0,5.19,0,0.515,5.985,45.4,4.8122,5,224,20,396.9,9.74,19.0 341 | 0.06151,0,5.19,0,0.515,5.968,58.5,4.8122,5,224,20,396.9,9.29,18.7 342 | 0.01301,35,1.52,0,0.442,7.241,49.3,7.0379,1,284,15,394.74,5.49,32.7 343 | 0.02498,0,1.89,0,0.518,6.54,59.7,6.2669,1,422,15,389.96,8.65,16.5 344 | 0.02543,55,3.78,0,0.484,6.696,56.4,5.7321,5,370,17,396.9,7.18,23.9 345 | 0.03049,55,3.78,0,0.484,6.874,28.1,6.4654,5,370,17,387.97,4.61,31.2 346 | 0.03113,0,4.39,0,0.442,6.014,48.5,8.0136,3,352,18,385.64,10.53,17.5 347 | 0.06162,0,4.39,0,0.442,5.898,52.3,8.0136,3,352,18,364.61,12.67,17.2 348 | 0.0187,85,4.15,0,0.429,6.516,27.7,8.5353,4,351,17,392.43,6.36,23.1 349 | 0.01501,80,2.01,0,0.435,6.635,29.7,8.344,4,280,17,390.94,5.99,24.5 350 | 0.02899,40,1.25,0,0.429,6.939,34.5,8.7921,1,335,19,389.85,5.89,26.6 351 | 0.06211,40,1.25,0,0.429,6.49,44.4,8.7921,1,335,19,396.9,5.98,22.9 352 | 0.0795,60,1.69,0,0.411,6.579,35.9,10.7103,4,411,18,370.78,5.49,24.1 353 | 0.07244,60,1.69,0,0.411,5.884,18.5,10.7103,4,411,18,392.33,7.79,18.6 354 | 0.01709,90,2.02,0,0.41,6.728,36.1,12.1265,5,187,17,384.46,4.5,30.1 355 | 0.04301,80,1.91,0,0.413,5.663,21.9,10.5857,4,334,22,382.8,8.05,18.2 356 | 0.10659,80,1.91,0,0.413,5.936,19.5,10.5857,4,334,22,376.04,5.57,20.6 357 | 8.98296,0,18.1,1,0.77,6.212,97.4,2.1222,24,666,20,377.73,17.6,17.8 358 | 3.8497,0,18.1,1,0.77,6.395,91.0,2.5052,24,666,20,391.34,13.27,21.7 359 | 5.20177,0,18.1,1,0.77,6.127,83.4,2.7227,24,666,20,395.43,11.48,22.7 360 | 4.26131,0,18.1,0,0.77,6.112,81.3,2.5091,24,666,20,390.74,12.67,22.6 361 | 4.54192,0,18.1,0,0.77,6.398,88.0,2.5182,24,666,20,374.56,7.79,25.0 362 | 3.83684,0,18.1,0,0.77,6.251,91.1,2.2955,24,666,20,350.65,14.19,19.9 363 | 3.67822,0,18.1,0,0.77,5.362,96.2,2.1036,24,666,20,380.79,10.19,20.8 364 | 4.22239,0,18.1,1,0.77,5.803,89.0,1.9047,24,666,20,353.04,14.64,16.8 365 | 3.47428,0,18.1,1,0.718,8.78,82.9,1.9047,24,666,20,354.55,5.29,21.9 366 | 4.55587,0,18.1,0,0.718,3.561,87.9,1.6132,24,666,20,354.7,7.12,27.5 367 | 3.69695,0,18.1,0,0.718,4.963,91.4,1.7523,24,666,20,316.03,14.0,21.9 368 | 13.5222,0,18.1,0,0.631,3.863,100.0,1.5106,24,666,20,131.42,13.33,23.1 369 | 4.89822,0,18.1,0,0.631,4.97,100.0,1.3325,24,666,20,375.52,3.26,50.0 370 | 5.66998,0,18.1,1,0.631,6.683,96.8,1.3567,24,666,20,375.33,3.73,50.0 371 | 6.53876,0,18.1,1,0.631,7.016,97.5,1.2024,24,666,20,392.05,2.96,50.0 372 | 9.2323,0,18.1,0,0.631,6.216,100.0,1.1691,24,666,20,366.15,9.53,50.0 373 | 8.26725,0,18.1,1,0.668,5.875,89.6,1.1296,24,666,20,347.88,8.88,50.0 374 | 11.1081,0,18.1,0,0.668,4.906,100.0,1.1742,24,666,20,396.9,34.77,13.8 375 | 18.4982,0,18.1,0,0.668,4.138,100.0,1.137,24,666,20,396.9,37.97,13.8 376 | 19.6091,0,18.1,0,0.671,7.313,97.9,1.3163,24,666,20,396.9,13.44,15.0 377 | 15.288,0,18.1,0,0.671,6.649,93.3,1.3449,24,666,20,363.02,23.24,13.9 378 | 9.82349,0,18.1,0,0.671,6.794,98.8,1.358,24,666,20,396.9,21.24,13.3 379 | 23.6482,0,18.1,0,0.671,6.38,96.2,1.3861,24,666,20,396.9,23.69,13.1 380 | 17.8667,0,18.1,0,0.671,6.223,100.0,1.3861,24,666,20,393.74,21.78,10.2 381 | 88.9762,0,18.1,0,0.671,6.968,91.9,1.4165,24,666,20,396.9,17.21,10.4 382 | 15.8744,0,18.1,0,0.671,6.545,99.1,1.5192,24,666,20,396.9,21.08,10.9 383 | 9.18702,0,18.1,0,0.7,5.536,100.0,1.5804,24,666,20,396.9,23.6,11.3 384 | 7.99248,0,18.1,0,0.7,5.52,100.0,1.5331,24,666,20,396.9,24.56,12.3 385 | 20.0849,0,18.1,0,0.7,4.368,91.2,1.4395,24,666,20,285.83,30.63,8.8 386 | 16.8118,0,18.1,0,0.7,5.277,98.1,1.4261,24,666,20,396.9,30.81,7.2 387 | 24.3938,0,18.1,0,0.7,4.652,100.0,1.4672,24,666,20,396.9,28.28,10.5 388 | 22.5971,0,18.1,0,0.7,5.0,89.5,1.5184,24,666,20,396.9,31.99,7.4 389 | 14.3337,0,18.1,0,0.7,4.88,100.0,1.5895,24,666,20,372.92,30.62,10.2 390 | 8.15174,0,18.1,0,0.7,5.39,98.9,1.7281,24,666,20,396.9,20.85,11.5 391 | 6.96215,0,18.1,0,0.7,5.713,97.0,1.9265,24,666,20,394.43,17.11,15.1 392 | 5.29305,0,18.1,0,0.7,6.051,82.5,2.1678,24,666,20,378.38,18.76,23.2 393 | 11.5779,0,18.1,0,0.7,5.036,97.0,1.77,24,666,20,396.9,25.68,9.7 394 | 8.64476,0,18.1,0,0.693,6.193,92.6,1.7912,24,666,20,396.9,15.17,13.8 395 | 13.3598,0,18.1,0,0.693,5.887,94.7,1.7821,24,666,20,396.9,16.35,12.7 396 | 8.71675,0,18.1,0,0.693,6.471,98.8,1.7257,24,666,20,391.98,17.12,13.1 397 | 5.87205,0,18.1,0,0.693,6.405,96.0,1.6768,24,666,20,396.9,19.37,12.5 398 | 7.67202,0,18.1,0,0.693,5.747,98.9,1.6334,24,666,20,393.1,19.92,8.5 399 | 38.3518,0,18.1,0,0.693,5.453,100.0,1.4896,24,666,20,396.9,30.59,5.0 400 | 9.91655,0,18.1,0,0.693,5.852,77.8,1.5004,24,666,20,338.16,29.97,6.3 401 | 25.0461,0,18.1,0,0.693,5.987,100.0,1.5888,24,666,20,396.9,26.77,5.6 402 | 14.2362,0,18.1,0,0.693,6.343,100.0,1.5741,24,666,20,396.9,20.32,7.2 403 | 9.59571,0,18.1,0,0.693,6.404,100.0,1.639,24,666,20,376.11,20.31,12.1 404 | 24.8017,0,18.1,0,0.693,5.349,96.0,1.7028,24,666,20,396.9,19.77,8.3 405 | 41.5292,0,18.1,0,0.693,5.531,85.4,1.6074,24,666,20,329.46,27.38,8.5 406 | 67.9208,0,18.1,0,0.693,5.683,100.0,1.4254,24,666,20,384.97,22.98,5.0 407 | 20.7162,0,18.1,0,0.659,4.138,100.0,1.1781,24,666,20,370.22,23.34,11.9 408 | 11.9511,0,18.1,0,0.659,5.608,100.0,1.2852,24,666,20,332.09,12.13,27.9 409 | 7.40389,0,18.1,0,0.597,5.617,97.9,1.4547,24,666,20,314.64,26.4,17.2 410 | 14.4383,0,18.1,0,0.597,6.852,100.0,1.4655,24,666,20,179.36,19.78,27.5 411 | 51.1358,0,18.1,0,0.597,5.757,100.0,1.413,24,666,20,2.6,10.11,15.0 412 | 14.0507,0,18.1,0,0.597,6.657,100.0,1.5275,24,666,20,35.05,21.22,17.2 413 | 18.811,0,18.1,0,0.597,4.628,100.0,1.5539,24,666,20,28.79,34.37,17.9 414 | 28.6558,0,18.1,0,0.597,5.155,100.0,1.5894,24,666,20,210.97,20.08,16.3 415 | 45.7461,0,18.1,0,0.693,4.519,100.0,1.6582,24,666,20,88.27,36.98,7.0 416 | 18.0846,0,18.1,0,0.679,6.434,100.0,1.8347,24,666,20,27.25,29.05,7.2 417 | 10.8342,0,18.1,0,0.679,6.782,90.8,1.8195,24,666,20,21.57,25.79,7.5 418 | 25.9406,0,18.1,0,0.679,5.304,89.1,1.6475,24,666,20,127.36,26.64,10.4 419 | 73.5341,0,18.1,0,0.679,5.957,100.0,1.8026,24,666,20,16.45,20.62,8.8 420 | 11.8123,0,18.1,0,0.718,6.824,76.5,1.794,24,666,20,48.45,22.74,8.4 421 | 11.0874,0,18.1,0,0.718,6.411,100.0,1.8589,24,666,20,318.75,15.02,16.7 422 | 7.02259,0,18.1,0,0.718,6.006,95.3,1.8746,24,666,20,319.98,15.7,14.2 423 | 12.0482,0,18.1,0,0.614,5.648,87.6,1.9512,24,666,20,291.55,14.1,20.8 424 | 7.05042,0,18.1,0,0.614,6.103,85.1,2.0218,24,666,20,2.52,23.29,13.4 425 | 8.79212,0,18.1,0,0.584,5.565,70.6,2.0635,24,666,20,3.65,17.16,11.7 426 | 15.8603,0,18.1,0,0.679,5.896,95.4,1.9096,24,666,20,7.68,24.39,8.3 427 | 12.2472,0,18.1,0,0.584,5.837,59.7,1.9976,24,666,20,24.65,15.69,10.2 428 | 37.6619,0,18.1,0,0.679,6.202,78.7,1.8629,24,666,20,18.82,14.52,10.9 429 | 7.36711,0,18.1,0,0.679,6.193,78.1,1.9356,24,666,20,96.73,21.52,11.0 430 | 9.33889,0,18.1,0,0.679,6.38,95.6,1.9682,24,666,20,60.72,24.08,9.5 431 | 8.49213,0,18.1,0,0.584,6.348,86.1,2.0527,24,666,20,83.45,17.64,14.5 432 | 10.0623,0,18.1,0,0.584,6.833,94.3,2.0882,24,666,20,81.33,19.69,14.1 433 | 6.44405,0,18.1,0,0.584,6.425,74.8,2.2004,24,666,20,97.95,12.03,16.1 434 | 5.58107,0,18.1,0,0.713,6.436,87.9,2.3158,24,666,20,100.19,16.22,14.3 435 | 13.9134,0,18.1,0,0.713,6.208,95.0,2.2222,24,666,20,100.63,15.17,11.7 436 | 11.1604,0,18.1,0,0.74,6.629,94.6,2.1247,24,666,20,109.85,23.27,13.4 437 | 14.4208,0,18.1,0,0.74,6.461,93.3,2.0026,24,666,20,27.49,18.05,9.6 438 | 15.1772,0,18.1,0,0.74,6.152,100.0,1.9142,24,666,20,9.32,26.45,8.7 439 | 13.6781,0,18.1,0,0.74,5.935,87.9,1.8206,24,666,20,68.95,34.02,8.4 440 | 9.39063,0,18.1,0,0.74,5.627,93.9,1.8172,24,666,20,396.9,22.88,12.8 441 | 22.0511,0,18.1,0,0.74,5.818,92.4,1.8662,24,666,20,391.45,22.11,10.5 442 | 9.72418,0,18.1,0,0.74,6.406,97.2,2.0651,24,666,20,385.96,19.52,17.1 443 | 5.66637,0,18.1,0,0.74,6.219,100.0,2.0048,24,666,20,395.69,16.59,18.4 444 | 9.96654,0,18.1,0,0.74,6.485,100.0,1.9784,24,666,20,386.73,18.85,15.4 445 | 12.8023,0,18.1,0,0.74,5.854,96.6,1.8956,24,666,20,240.52,23.79,10.8 446 | 10.6718,0,18.1,0,0.74,6.459,94.8,1.9879,24,666,20,43.06,23.98,11.8 447 | 6.28807,0,18.1,0,0.74,6.341,96.4,2.072,24,666,20,318.01,17.79,14.9 448 | 9.92485,0,18.1,0,0.74,6.251,96.6,2.198,24,666,20,388.52,16.44,12.6 449 | 9.32909,0,18.1,0,0.713,6.185,98.7,2.2616,24,666,20,396.9,18.13,14.1 450 | 7.52601,0,18.1,0,0.713,6.417,98.3,2.185,24,666,20,304.21,19.31,13.0 451 | 6.71772,0,18.1,0,0.713,6.749,92.6,2.3236,24,666,20,0.32,17.44,13.4 452 | 5.44114,0,18.1,0,0.713,6.655,98.2,2.3552,24,666,20,355.29,17.73,15.2 453 | 5.09017,0,18.1,0,0.713,6.297,91.8,2.3682,24,666,20,385.09,17.27,16.1 454 | 8.24809,0,18.1,0,0.713,7.393,99.3,2.4527,24,666,20,375.87,16.74,17.8 455 | 9.51363,0,18.1,0,0.713,6.728,94.1,2.4961,24,666,20,6.68,18.71,14.9 456 | 4.75237,0,18.1,0,0.713,6.525,86.5,2.4358,24,666,20,50.92,18.13,14.1 457 | 4.66883,0,18.1,0,0.713,5.976,87.9,2.5806,24,666,20,10.48,19.01,12.7 458 | 8.20058,0,18.1,0,0.713,5.936,80.3,2.7792,24,666,20,3.5,16.94,13.5 459 | 7.75223,0,18.1,0,0.713,6.301,83.7,2.7831,24,666,20,272.21,16.23,14.9 460 | 6.80117,0,18.1,0,0.713,6.081,84.4,2.7175,24,666,20,396.9,14.7,20.0 461 | 4.81213,0,18.1,0,0.713,6.701,90.0,2.5975,24,666,20,255.23,16.42,16.4 462 | 3.69311,0,18.1,0,0.713,6.376,88.4,2.5671,24,666,20,391.43,14.65,17.7 463 | 6.65492,0,18.1,0,0.713,6.317,83.0,2.7344,24,666,20,396.9,13.99,19.5 464 | 5.82115,0,18.1,0,0.713,6.513,89.9,2.8016,24,666,20,393.82,10.29,20.2 465 | 7.83932,0,18.1,0,0.655,6.209,65.4,2.9634,24,666,20,396.9,13.22,21.4 466 | 3.1636,0,18.1,0,0.655,5.759,48.2,3.0665,24,666,20,334.4,14.13,19.9 467 | 3.77498,0,18.1,0,0.655,5.952,84.7,2.8715,24,666,20,22.01,17.15,19.0 468 | 4.42228,0,18.1,0,0.584,6.003,94.5,2.5403,24,666,20,331.29,21.32,19.1 469 | 15.5757,0,18.1,0,0.58,5.926,71.0,2.9084,24,666,20,368.74,18.13,19.1 470 | 13.0751,0,18.1,0,0.58,5.713,56.7,2.8237,24,666,20,396.9,14.76,20.1 471 | 4.34879,0,18.1,0,0.58,6.167,84.0,3.0334,24,666,20,396.9,16.29,19.9 472 | 4.03841,0,18.1,0,0.532,6.229,90.7,3.0993,24,666,20,395.33,12.87,19.6 473 | 3.56868,0,18.1,0,0.58,6.437,75.0,2.8965,24,666,20,393.37,14.36,23.2 474 | 4.64689,0,18.1,0,0.614,6.98,67.6,2.5329,24,666,20,374.68,11.66,29.8 475 | 8.05579,0,18.1,0,0.584,5.427,95.4,2.4298,24,666,20,352.58,18.14,13.8 476 | 6.39312,0,18.1,0,0.584,6.162,97.4,2.206,24,666,20,302.76,24.1,13.3 477 | 4.87141,0,18.1,0,0.614,6.484,93.6,2.3053,24,666,20,396.21,18.68,16.7 478 | 15.0234,0,18.1,0,0.614,5.304,97.3,2.1007,24,666,20,349.48,24.91,12.0 479 | 10.233,0,18.1,0,0.614,6.185,96.7,2.1705,24,666,20,379.7,18.03,14.6 480 | 14.3337,0,18.1,0,0.614,6.229,88.0,1.9512,24,666,20,383.32,13.11,21.4 481 | 5.82401,0,18.1,0,0.532,6.242,64.7,3.4242,24,666,20,396.9,10.74,23.0 482 | 5.70818,0,18.1,0,0.532,6.75,74.9,3.3317,24,666,20,393.07,7.74,23.7 483 | 5.73116,0,18.1,0,0.532,7.061,77.0,3.4106,24,666,20,395.28,7.01,25.0 484 | 2.81838,0,18.1,0,0.532,5.762,40.3,4.0983,24,666,20,392.92,10.42,21.8 485 | 2.37857,0,18.1,0,0.583,5.871,41.9,3.724,24,666,20,370.73,13.34,20.6 486 | 3.67367,0,18.1,0,0.583,6.312,51.9,3.9917,24,666,20,388.62,10.58,21.2 487 | 5.69175,0,18.1,0,0.583,6.114,79.8,3.5459,24,666,20,392.68,14.98,19.1 488 | 4.83567,0,18.1,0,0.583,5.905,53.2,3.1523,24,666,20,388.22,11.45,20.6 489 | 0.15086,0,27.74,0,0.609,5.454,92.7,1.8209,4,711,20,395.09,18.06,15.2 490 | 0.18337,0,27.74,0,0.609,5.414,98.3,1.7554,4,711,20,344.05,23.97,7.0 491 | 0.20746,0,27.74,0,0.609,5.093,98.0,1.8226,4,711,20,318.43,29.68,8.1 492 | 0.10574,0,27.74,0,0.609,5.983,98.8,1.8681,4,711,20,390.11,18.07,13.6 493 | 0.11132,0,27.74,0,0.609,5.983,83.5,2.1099,4,711,20,396.9,13.35,20.1 494 | 0.17331,0,9.69,0,0.585,5.707,54.0,2.3817,6,391,19,396.9,12.01,21.8 495 | 0.27957,0,9.69,0,0.585,5.926,42.6,2.3817,6,391,19,396.9,13.59,24.5 496 | 0.17899,0,9.69,0,0.585,5.67,28.8,2.7986,6,391,19,393.29,17.6,23.1 497 | 0.2896,0,9.69,0,0.585,5.39,72.9,2.7986,6,391,19,396.9,21.14,19.7 498 | 0.26838,0,9.69,0,0.585,5.794,70.6,2.8927,6,391,19,396.9,14.1,18.3 499 | 0.23912,0,9.69,0,0.585,6.019,65.3,2.4091,6,391,19,396.9,12.92,21.2 500 | 0.17783,0,9.69,0,0.585,5.569,73.5,2.3999,6,391,19,395.77,15.1,17.5 501 | 0.22438,0,9.69,0,0.585,6.027,79.7,2.4982,6,391,19,396.9,14.33,16.8 502 | 0.06263,0,11.93,0,0.573,6.593,69.1,2.4786,1,273,21,391.99,9.67,22.4 503 | 0.04527,0,11.93,0,0.573,6.12,76.7,2.2875,1,273,21,396.9,9.08,20.6 504 | 0.06076,0,11.93,0,0.573,6.976,91.0,2.1675,1,273,21,396.9,5.64,23.9 505 | 0.10959,0,11.93,0,0.573,6.794,89.3,2.3889,1,273,21,393.45,6.48,22.0 506 | 0.04741,0,11.93,0,0.573,6.03,80.8,2.505,1,273,21,396.9,7.88,11.9 507 | -------------------------------------------------------------------------------- /Chapter2/a_loading_example_1.csv: -------------------------------------------------------------------------------- 1 | Date,Temperature_city_1,Temperature_city_2,Temperature_city_3,Which_destination 2 | 20140910,80,32,40,1 3 | 20140911,100,50,36,2 4 | 20140912,102,55,46,1 5 | 20140913,60,20,35,3 6 | 20140914,60,,32,3 7 | 20140915,,57,42,2 -------------------------------------------------------------------------------- /Chapter2/a_loading_example_2.csv: -------------------------------------------------------------------------------- 1 | Val1,Val2,Val3 2 | 0,0,0 3 | 1,1,1 4 | 2,2,2,2 5 | 3,3,3 -------------------------------------------------------------------------------- /Chapter2/a_preprocessing_example_1.csv: -------------------------------------------------------------------------------- 1 | -1.85628901e-01 2 | -7.92423800e-02 3 | -7.88260714e-02 4 | -4.83158246e-02 5 | 2.59205760e-01 6 | 1.05402740e+00 7 | 1.12624149e+00 8 | 4.68185524e-01 9 | 5.88427391e-01 10 | 1.25932547e+00 11 | 1.38128205e+00 12 | 4.90871074e-01 13 | 7.29114730e-01 14 | 1.29651394e+00 15 | 1.21513409e+00 16 | 1.23895984e+00 17 | 5.13962693e-01 18 | 1.15297141e+00 19 | 1.15366125e+00 20 | 2.96134478e-01 21 | 7.22603953e-01 22 | 1.71718551e-01 23 | 7.28317306e-01 24 | 1.44527666e-01 25 | 3.23348505e-01 26 | 3.64472534e-01 27 | -1.36799633e-03 28 | -4.71698541e-01 29 | -5.56529861e-01 30 | -2.02594828e-01 31 | -8.77917525e-01 32 | -1.17821653e+00 33 | -8.52952044e-01 34 | -4.61380710e-01 35 | -7.80148153e-01 36 | -1.03307782e+00 37 | -1.24530692e+00 38 | -5.24939741e-01 39 | -1.32733116e+00 40 | -7.79119470e-01 41 | -4.80625177e-01 42 | -7.96520528e-01 43 | -1.25946270e+00 44 | -6.96078043e-01 45 | -1.13978310e+00 46 | -5.11905428e-01 47 | -2.80752657e-02 48 | -8.04218109e-01 49 | -3.48803380e-01 50 | -2.06970369e-01 51 | -3.24731843e-02 52 | 4.82331630e-01 53 | -1.71344894e-01 54 | 1.41969617e-01 55 | 6.69545954e-01 56 | 9.39000592e-01 57 | 3.90362819e-01 58 | 3.05017150e-01 59 | 1.31008390e+00 60 | 7.92284810e-01 61 | 9.57323075e-01 62 | 9.06564318e-01 63 | 7.74952035e-01 64 | 8.19816769e-01 65 | 1.04681352e+00 66 | 1.15238407e+00 67 | 7.26883044e-01 68 | 4.00497745e-01 69 | 4.39017107e-01 70 | 9.02082076e-01 71 | 3.80416584e-01 72 | 3.80108316e-01 73 | 4.51395114e-01 74 | -1.19991377e-01 75 | -1.56604008e-01 76 | 2.09754137e-01 77 | -1.17161764e-01 78 | 1.20992548e-01 79 | -5.71337891e-02 80 | -4.59951601e-01 81 | -1.02113719e+00 82 | -7.17426279e-01 83 | -1.02802263e+00 84 | -9.19694505e-01 85 | -1.14234212e+00 86 | -1.30157560e+00 87 | -9.74651859e-01 88 | -9.49110772e-01 89 | -5.69529922e-01 90 | -1.28473428e+00 91 | -7.08085095e-01 92 | -7.95006581e-01 93 | -1.10945192e+00 94 | -7.09324270e-01 95 | -6.18100653e-01 96 | -6.80711393e-01 97 | -7.44098294e-01 98 | -5.66205429e-01 99 | 2.37146651e-01 100 | 3.07718119e-01 -------------------------------------------------------------------------------- /Chapter2/a_selection_example_1.csv: -------------------------------------------------------------------------------- 1 | n,val1,val2,val3 2 | 100,10,10,C 3 | 101,10,20,C 4 | 102,10,30,B 5 | 103,10,40,B 6 | 104,10,50,A -------------------------------------------------------------------------------- /Chapter2/datasets-uci-iris.csv: -------------------------------------------------------------------------------- 1 | 5.1,3.5,1.4,0.2,Iris-setosa 2 | 4.9,3.0,1.4,0.2,Iris-setosa 3 | 4.7,3.2,1.3,0.2,Iris-setosa 4 | 4.6,3.1,1.5,0.2,Iris-setosa 5 | 5.0,3.6,1.4,0.2,Iris-setosa 6 | 5.4,3.9,1.7,0.4,Iris-setosa 7 | 4.6,3.4,1.4,0.3,Iris-setosa 8 | 5.0,3.4,1.5,0.2,Iris-setosa 9 | 4.4,2.9,1.4,0.2,Iris-setosa 10 | 4.9,3.1,1.5,0.1,Iris-setosa 11 | 5.4,3.7,1.5,0.2,Iris-setosa 12 | 4.8,3.4,1.6,0.2,Iris-setosa 13 | 4.8,3.0,1.4,0.1,Iris-setosa 14 | 4.3,3.0,1.1,0.1,Iris-setosa 15 | 5.8,4.0,1.2,0.2,Iris-setosa 16 | 5.7,4.4,1.5,0.4,Iris-setosa 17 | 5.4,3.9,1.3,0.4,Iris-setosa 18 | 5.1,3.5,1.4,0.3,Iris-setosa 19 | 5.7,3.8,1.7,0.3,Iris-setosa 20 | 5.1,3.8,1.5,0.3,Iris-setosa 21 | 5.4,3.4,1.7,0.2,Iris-setosa 22 | 5.1,3.7,1.5,0.4,Iris-setosa 23 | 4.6,3.6,1.0,0.2,Iris-setosa 24 | 5.1,3.3,1.7,0.5,Iris-setosa 25 | 4.8,3.4,1.9,0.2,Iris-setosa 26 | 5.0,3.0,1.6,0.2,Iris-setosa 27 | 5.0,3.4,1.6,0.4,Iris-setosa 28 | 5.2,3.5,1.5,0.2,Iris-setosa 29 | 5.2,3.4,1.4,0.2,Iris-setosa 30 | 4.7,3.2,1.6,0.2,Iris-setosa 31 | 4.8,3.1,1.6,0.2,Iris-setosa 32 | 5.4,3.4,1.5,0.4,Iris-setosa 33 | 5.2,4.1,1.5,0.1,Iris-setosa 34 | 5.5,4.2,1.4,0.2,Iris-setosa 35 | 4.9,3.1,1.5,0.1,Iris-setosa 36 | 5.0,3.2,1.2,0.2,Iris-setosa 37 | 5.5,3.5,1.3,0.2,Iris-setosa 38 | 4.9,3.1,1.5,0.1,Iris-setosa 39 | 4.4,3.0,1.3,0.2,Iris-setosa 40 | 5.1,3.4,1.5,0.2,Iris-setosa 41 | 5.0,3.5,1.3,0.3,Iris-setosa 42 | 4.5,2.3,1.3,0.3,Iris-setosa 43 | 4.4,3.2,1.3,0.2,Iris-setosa 44 | 5.0,3.5,1.6,0.6,Iris-setosa 45 | 5.1,3.8,1.9,0.4,Iris-setosa 46 | 4.8,3.0,1.4,0.3,Iris-setosa 47 | 5.1,3.8,1.6,0.2,Iris-setosa 48 | 4.6,3.2,1.4,0.2,Iris-setosa 49 | 5.3,3.7,1.5,0.2,Iris-setosa 50 | 5.0,3.3,1.4,0.2,Iris-setosa 51 | 7.0,3.2,4.7,1.4,Iris-versicolor 52 | 6.4,3.2,4.5,1.5,Iris-versicolor 53 | 6.9,3.1,4.9,1.5,Iris-versicolor 54 | 5.5,2.3,4.0,1.3,Iris-versicolor 55 | 6.5,2.8,4.6,1.5,Iris-versicolor 56 | 5.7,2.8,4.5,1.3,Iris-versicolor 57 | 6.3,3.3,4.7,1.6,Iris-versicolor 58 | 4.9,2.4,3.3,1.0,Iris-versicolor 59 | 6.6,2.9,4.6,1.3,Iris-versicolor 60 | 5.2,2.7,3.9,1.4,Iris-versicolor 61 | 5.0,2.0,3.5,1.0,Iris-versicolor 62 | 5.9,3.0,4.2,1.5,Iris-versicolor 63 | 6.0,2.2,4.0,1.0,Iris-versicolor 64 | 6.1,2.9,4.7,1.4,Iris-versicolor 65 | 5.6,2.9,3.6,1.3,Iris-versicolor 66 | 6.7,3.1,4.4,1.4,Iris-versicolor 67 | 5.6,3.0,4.5,1.5,Iris-versicolor 68 | 5.8,2.7,4.1,1.0,Iris-versicolor 69 | 6.2,2.2,4.5,1.5,Iris-versicolor 70 | 5.6,2.5,3.9,1.1,Iris-versicolor 71 | 5.9,3.2,4.8,1.8,Iris-versicolor 72 | 6.1,2.8,4.0,1.3,Iris-versicolor 73 | 6.3,2.5,4.9,1.5,Iris-versicolor 74 | 6.1,2.8,4.7,1.2,Iris-versicolor 75 | 6.4,2.9,4.3,1.3,Iris-versicolor 76 | 6.6,3.0,4.4,1.4,Iris-versicolor 77 | 6.8,2.8,4.8,1.4,Iris-versicolor 78 | 6.7,3.0,5.0,1.7,Iris-versicolor 79 | 6.0,2.9,4.5,1.5,Iris-versicolor 80 | 5.7,2.6,3.5,1.0,Iris-versicolor 81 | 5.5,2.4,3.8,1.1,Iris-versicolor 82 | 5.5,2.4,3.7,1.0,Iris-versicolor 83 | 5.8,2.7,3.9,1.2,Iris-versicolor 84 | 6.0,2.7,5.1,1.6,Iris-versicolor 85 | 5.4,3.0,4.5,1.5,Iris-versicolor 86 | 6.0,3.4,4.5,1.6,Iris-versicolor 87 | 6.7,3.1,4.7,1.5,Iris-versicolor 88 | 6.3,2.3,4.4,1.3,Iris-versicolor 89 | 5.6,3.0,4.1,1.3,Iris-versicolor 90 | 5.5,2.5,4.0,1.3,Iris-versicolor 91 | 5.5,2.6,4.4,1.2,Iris-versicolor 92 | 6.1,3.0,4.6,1.4,Iris-versicolor 93 | 5.8,2.6,4.0,1.2,Iris-versicolor 94 | 5.0,2.3,3.3,1.0,Iris-versicolor 95 | 5.6,2.7,4.2,1.3,Iris-versicolor 96 | 5.7,3.0,4.2,1.2,Iris-versicolor 97 | 5.7,2.9,4.2,1.3,Iris-versicolor 98 | 6.2,2.9,4.3,1.3,Iris-versicolor 99 | 5.1,2.5,3.0,1.1,Iris-versicolor 100 | 5.7,2.8,4.1,1.3,Iris-versicolor 101 | 6.3,3.3,6.0,2.5,Iris-virginica 102 | 5.8,2.7,5.1,1.9,Iris-virginica 103 | 7.1,3.0,5.9,2.1,Iris-virginica 104 | 6.3,2.9,5.6,1.8,Iris-virginica 105 | 6.5,3.0,5.8,2.2,Iris-virginica 106 | 7.6,3.0,6.6,2.1,Iris-virginica 107 | 4.9,2.5,4.5,1.7,Iris-virginica 108 | 7.3,2.9,6.3,1.8,Iris-virginica 109 | 6.7,2.5,5.8,1.8,Iris-virginica 110 | 7.2,3.6,6.1,2.5,Iris-virginica 111 | 6.5,3.2,5.1,2.0,Iris-virginica 112 | 6.4,2.7,5.3,1.9,Iris-virginica 113 | 6.8,3.0,5.5,2.1,Iris-virginica 114 | 5.7,2.5,5.0,2.0,Iris-virginica 115 | 5.8,2.8,5.1,2.4,Iris-virginica 116 | 6.4,3.2,5.3,2.3,Iris-virginica 117 | 6.5,3.0,5.5,1.8,Iris-virginica 118 | 7.7,3.8,6.7,2.2,Iris-virginica 119 | 7.7,2.6,6.9,2.3,Iris-virginica 120 | 6.0,2.2,5.0,1.5,Iris-virginica 121 | 6.9,3.2,5.7,2.3,Iris-virginica 122 | 5.6,2.8,4.9,2.0,Iris-virginica 123 | 7.7,2.8,6.7,2.0,Iris-virginica 124 | 6.3,2.7,4.9,1.8,Iris-virginica 125 | 6.7,3.3,5.7,2.1,Iris-virginica 126 | 7.2,3.2,6.0,1.8,Iris-virginica 127 | 6.2,2.8,4.8,1.8,Iris-virginica 128 | 6.1,3.0,4.9,1.8,Iris-virginica 129 | 6.4,2.8,5.6,2.1,Iris-virginica 130 | 7.2,3.0,5.8,1.6,Iris-virginica 131 | 7.4,2.8,6.1,1.9,Iris-virginica 132 | 7.9,3.8,6.4,2.0,Iris-virginica 133 | 6.4,2.8,5.6,2.2,Iris-virginica 134 | 6.3,2.8,5.1,1.5,Iris-virginica 135 | 6.1,2.6,5.6,1.4,Iris-virginica 136 | 7.7,3.0,6.1,2.3,Iris-virginica 137 | 6.3,3.4,5.6,2.4,Iris-virginica 138 | 6.4,3.1,5.5,1.8,Iris-virginica 139 | 6.0,3.0,4.8,1.8,Iris-virginica 140 | 6.9,3.1,5.4,2.1,Iris-virginica 141 | 6.7,3.1,5.6,2.4,Iris-virginica 142 | 6.9,3.1,5.1,2.3,Iris-virginica 143 | 5.8,2.7,5.1,1.9,Iris-virginica 144 | 6.8,3.2,5.9,2.3,Iris-virginica 145 | 6.7,3.3,5.7,2.5,Iris-virginica 146 | 6.7,3.0,5.2,2.3,Iris-virginica 147 | 6.3,2.5,5.0,1.9,Iris-virginica 148 | 6.5,3.0,5.2,2.0,Iris-virginica 149 | 6.2,3.4,5.4,2.3,Iris-virginica 150 | 5.9,3.0,5.1,1.8,Iris-virginica 151 | -------------------------------------------------------------------------------- /Chapter2/example.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Python-Data-Science-Essentials-Third-Edition/ecc0a4a85c95ccf487ad8872cd233da9e1078f1d/Chapter2/example.db -------------------------------------------------------------------------------- /Chapter2/example.h5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Python-Data-Science-Essentials-Third-Edition/ecc0a4a85c95ccf487ad8872cd233da9e1078f1d/Chapter2/example.h5 -------------------------------------------------------------------------------- /Chapter2/regression-datasets-housing.csv: -------------------------------------------------------------------------------- 1 | 0.00632,18,2.31,0,0.538,6.575,65.2,4.09,1,296,15,396.9,4.98,24.0 2 | 0.02731,0,7.07,0,0.469,6.421,78.9,4.9671,2,242,17,396.9,9.14,21.6 3 | 0.02729,0,7.07,0,0.469,7.185,61.1,4.9671,2,242,17,392.83,4.03,34.7 4 | 0.03237,0,2.18,0,0.458,6.998,45.8,6.0622,3,222,18,394.63,2.94,33.4 5 | 0.06905,0,2.18,0,0.458,7.147,54.2,6.0622,3,222,18,396.9,5.33,36.2 6 | 0.02985,0,2.18,0,0.458,6.43,58.7,6.0622,3,222,18,394.12,5.21,28.7 7 | 0.08829,12,7.87,0,0.524,6.012,66.6,5.5605,5,311,15,395.6,12.43,22.9 8 | 0.14455,12,7.87,0,0.524,6.172,96.1,5.9505,5,311,15,396.9,19.15,27.1 9 | 0.21124,12,7.87,0,0.524,5.631,100.0,6.0821,5,311,15,386.63,29.93,16.5 10 | 0.17004,12,7.87,0,0.524,6.004,85.9,6.5921,5,311,15,386.71,17.1,18.9 11 | 0.22489,12,7.87,0,0.524,6.377,94.3,6.3467,5,311,15,392.52,20.45,15.0 12 | 0.11747,12,7.87,0,0.524,6.009,82.9,6.2267,5,311,15,396.9,13.27,18.9 13 | 0.09378,12,7.87,0,0.524,5.889,39.0,5.4509,5,311,15,390.5,15.71,21.7 14 | 0.62976,0,8.14,0,0.538,5.949,61.8,4.7075,4,307,21,396.9,8.26,20.4 15 | 0.63796,0,8.14,0,0.538,6.096,84.5,4.4619,4,307,21,380.02,10.26,18.2 16 | 0.62739,0,8.14,0,0.538,5.834,56.5,4.4986,4,307,21,395.62,8.47,19.9 17 | 1.05393,0,8.14,0,0.538,5.935,29.3,4.4986,4,307,21,386.85,6.58,23.1 18 | 0.7842,0,8.14,0,0.538,5.99,81.7,4.2579,4,307,21,386.75,14.67,17.5 19 | 0.80271,0,8.14,0,0.538,5.456,36.6,3.7965,4,307,21,288.99,11.69,20.2 20 | 0.7258,0,8.14,0,0.538,5.727,69.5,3.7965,4,307,21,390.95,11.28,18.2 21 | 1.25179,0,8.14,0,0.538,5.57,98.1,3.7979,4,307,21,376.57,21.02,13.6 22 | 0.85204,0,8.14,0,0.538,5.965,89.2,4.0123,4,307,21,392.53,13.83,19.6 23 | 1.23247,0,8.14,0,0.538,6.142,91.7,3.9769,4,307,21,396.9,18.72,15.2 24 | 0.98843,0,8.14,0,0.538,5.813,100.0,4.0952,4,307,21,394.54,19.88,14.5 25 | 0.75026,0,8.14,0,0.538,5.924,94.1,4.3996,4,307,21,394.33,16.3,15.6 26 | 0.84054,0,8.14,0,0.538,5.599,85.7,4.4546,4,307,21,303.42,16.51,13.9 27 | 0.67191,0,8.14,0,0.538,5.813,90.3,4.682,4,307,21,376.88,14.81,16.6 28 | 0.95577,0,8.14,0,0.538,6.047,88.8,4.4534,4,307,21,306.38,17.28,14.8 29 | 0.77299,0,8.14,0,0.538,6.495,94.4,4.4547,4,307,21,387.94,12.8,18.4 30 | 1.00245,0,8.14,0,0.538,6.674,87.3,4.239,4,307,21,380.23,11.98,21.0 31 | 1.13081,0,8.14,0,0.538,5.713,94.1,4.233,4,307,21,360.17,22.6,12.7 32 | 1.35472,0,8.14,0,0.538,6.072,100.0,4.175,4,307,21,376.73,13.04,14.5 33 | 1.38799,0,8.14,0,0.538,5.95,82.0,3.99,4,307,21,232.6,27.71,13.2 34 | 1.15172,0,8.14,0,0.538,5.701,95.0,3.7872,4,307,21,358.77,18.35,13.1 35 | 1.61282,0,8.14,0,0.538,6.096,96.9,3.7598,4,307,21,248.31,20.34,13.5 36 | 0.06417,0,5.96,0,0.499,5.933,68.2,3.3603,5,279,19,396.9,9.68,18.9 37 | 0.09744,0,5.96,0,0.499,5.841,61.4,3.3779,5,279,19,377.56,11.41,20.0 38 | 0.08014,0,5.96,0,0.499,5.85,41.5,3.9342,5,279,19,396.9,8.77,21.0 39 | 0.17505,0,5.96,0,0.499,5.966,30.2,3.8473,5,279,19,393.43,10.13,24.7 40 | 0.02763,75,2.95,0,0.428,6.595,21.8,5.4011,3,252,18,395.63,4.32,30.8 41 | 0.03359,75,2.95,0,0.428,7.024,15.8,5.4011,3,252,18,395.62,1.98,34.9 42 | 0.12744,0,6.91,0,0.448,6.77,2.9,5.7209,3,233,17,385.41,4.84,26.6 43 | 0.1415,0,6.91,0,0.448,6.169,6.6,5.7209,3,233,17,383.37,5.81,25.3 44 | 0.15936,0,6.91,0,0.448,6.211,6.5,5.7209,3,233,17,394.46,7.44,24.7 45 | 0.12269,0,6.91,0,0.448,6.069,40.0,5.7209,3,233,17,389.39,9.55,21.2 46 | 0.17142,0,6.91,0,0.448,5.682,33.8,5.1004,3,233,17,396.9,10.21,19.3 47 | 0.18836,0,6.91,0,0.448,5.786,33.3,5.1004,3,233,17,396.9,14.15,20.0 48 | 0.22927,0,6.91,0,0.448,6.03,85.5,5.6894,3,233,17,392.74,18.8,16.6 49 | 0.25387,0,6.91,0,0.448,5.399,95.3,5.87,3,233,17,396.9,30.81,14.4 50 | 0.21977,0,6.91,0,0.448,5.602,62.0,6.0877,3,233,17,396.9,16.2,19.4 51 | 0.08873,21,5.64,0,0.439,5.963,45.7,6.8147,4,243,16,395.56,13.45,19.7 52 | 0.04337,21,5.64,0,0.439,6.115,63.0,6.8147,4,243,16,393.97,9.43,20.5 53 | 0.0536,21,5.64,0,0.439,6.511,21.1,6.8147,4,243,16,396.9,5.28,25.0 54 | 0.04981,21,5.64,0,0.439,5.998,21.4,6.8147,4,243,16,396.9,8.43,23.4 55 | 0.0136,75,4.0,0,0.41,5.888,47.6,7.3197,3,469,21,396.9,14.8,18.9 56 | 0.01311,90,1.22,0,0.403,7.249,21.9,8.6966,5,226,17,395.93,4.81,35.4 57 | 0.02055,85,0.74,0,0.41,6.383,35.7,9.1876,2,313,17,396.9,5.77,24.7 58 | 0.01432,100,1.32,0,0.411,6.816,40.5,8.3248,5,256,15,392.9,3.95,31.6 59 | 0.15445,25,5.13,0,0.453,6.145,29.2,7.8148,8,284,19,390.68,6.86,23.3 60 | 0.10328,25,5.13,0,0.453,5.927,47.2,6.932,8,284,19,396.9,9.22,19.6 61 | 0.14932,25,5.13,0,0.453,5.741,66.2,7.2254,8,284,19,395.11,13.15,18.7 62 | 0.17171,25,5.13,0,0.453,5.966,93.4,6.8185,8,284,19,378.08,14.44,16.0 63 | 0.11027,25,5.13,0,0.453,6.456,67.8,7.2255,8,284,19,396.9,6.73,22.2 64 | 0.1265,25,5.13,0,0.453,6.762,43.4,7.9809,8,284,19,395.58,9.5,25.0 65 | 0.01951,17,1.38,0,0.4161,7.104,59.5,9.2229,3,216,18,393.24,8.05,33.0 66 | 0.03584,80,3.37,0,0.398,6.29,17.8,6.6115,4,337,16,396.9,4.67,23.5 67 | 0.04379,80,3.37,0,0.398,5.787,31.1,6.6115,4,337,16,396.9,10.24,19.4 68 | 0.05789,12,6.07,0,0.409,5.878,21.4,6.498,4,345,18,396.21,8.1,22.0 69 | 0.13554,12,6.07,0,0.409,5.594,36.8,6.498,4,345,18,396.9,13.09,17.4 70 | 0.12816,12,6.07,0,0.409,5.885,33.0,6.498,4,345,18,396.9,8.79,20.9 71 | 0.08826,0,10.81,0,0.413,6.417,6.6,5.2873,4,305,19,383.73,6.72,24.2 72 | 0.15876,0,10.81,0,0.413,5.961,17.5,5.2873,4,305,19,376.94,9.88,21.7 73 | 0.09164,0,10.81,0,0.413,6.065,7.8,5.2873,4,305,19,390.91,5.52,22.8 74 | 0.19539,0,10.81,0,0.413,6.245,6.2,5.2873,4,305,19,377.17,7.54,23.4 75 | 0.07896,0,12.83,0,0.437,6.273,6.0,4.2515,5,398,18,394.92,6.78,24.1 76 | 0.09512,0,12.83,0,0.437,6.286,45.0,4.5026,5,398,18,383.23,8.94,21.4 77 | 0.10153,0,12.83,0,0.437,6.279,74.5,4.0522,5,398,18,373.66,11.97,20.0 78 | 0.08707,0,12.83,0,0.437,6.14,45.8,4.0905,5,398,18,386.96,10.27,20.8 79 | 0.05646,0,12.83,0,0.437,6.232,53.7,5.0141,5,398,18,386.4,12.34,21.2 80 | 0.08387,0,12.83,0,0.437,5.874,36.6,4.5026,5,398,18,396.06,9.1,20.3 81 | 0.04113,25,4.86,0,0.426,6.727,33.5,5.4007,4,281,19,396.9,5.29,28.0 82 | 0.04462,25,4.86,0,0.426,6.619,70.4,5.4007,4,281,19,395.63,7.22,23.9 83 | 0.03659,25,4.86,0,0.426,6.302,32.2,5.4007,4,281,19,396.9,6.72,24.8 84 | 0.03551,25,4.86,0,0.426,6.167,46.7,5.4007,4,281,19,390.64,7.51,22.9 85 | 0.05059,0,4.49,0,0.449,6.389,48.0,4.7794,3,247,18,396.9,9.62,23.9 86 | 0.05735,0,4.49,0,0.449,6.63,56.1,4.4377,3,247,18,392.3,6.53,26.6 87 | 0.05188,0,4.49,0,0.449,6.015,45.1,4.4272,3,247,18,395.99,12.86,22.5 88 | 0.07151,0,4.49,0,0.449,6.121,56.8,3.7476,3,247,18,395.15,8.44,22.2 89 | 0.0566,0,3.41,0,0.489,7.007,86.3,3.4217,2,270,17,396.9,5.5,23.6 90 | 0.05302,0,3.41,0,0.489,7.079,63.1,3.4145,2,270,17,396.06,5.7,28.7 91 | 0.04684,0,3.41,0,0.489,6.417,66.1,3.0923,2,270,17,392.18,8.81,22.6 92 | 0.03932,0,3.41,0,0.489,6.405,73.9,3.0921,2,270,17,393.55,8.2,22.0 93 | 0.04203,28,15.04,0,0.464,6.442,53.6,3.6659,4,270,18,395.01,8.16,22.9 94 | 0.02875,28,15.04,0,0.464,6.211,28.9,3.6659,4,270,18,396.33,6.21,25.0 95 | 0.04294,28,15.04,0,0.464,6.249,77.3,3.615,4,270,18,396.9,10.59,20.6 96 | 0.12204,0,2.89,0,0.445,6.625,57.8,3.4952,2,276,18,357.98,6.65,28.4 97 | 0.11504,0,2.89,0,0.445,6.163,69.6,3.4952,2,276,18,391.83,11.34,21.4 98 | 0.12083,0,2.89,0,0.445,8.069,76.0,3.4952,2,276,18,396.9,4.21,38.7 99 | 0.08187,0,2.89,0,0.445,7.82,36.9,3.4952,2,276,18,393.53,3.57,43.8 100 | 0.0686,0,2.89,0,0.445,7.416,62.5,3.4952,2,276,18,396.9,6.19,33.2 101 | 0.14866,0,8.56,0,0.52,6.727,79.9,2.7778,5,384,20,394.76,9.42,27.5 102 | 0.11432,0,8.56,0,0.52,6.781,71.3,2.8561,5,384,20,395.58,7.67,26.5 103 | 0.22876,0,8.56,0,0.52,6.405,85.4,2.7147,5,384,20,70.8,10.63,18.6 104 | 0.21161,0,8.56,0,0.52,6.137,87.4,2.7147,5,384,20,394.47,13.44,19.3 105 | 0.1396,0,8.56,0,0.52,6.167,90.0,2.421,5,384,20,392.69,12.33,20.1 106 | 0.13262,0,8.56,0,0.52,5.851,96.7,2.1069,5,384,20,394.05,16.47,19.5 107 | 0.1712,0,8.56,0,0.52,5.836,91.9,2.211,5,384,20,395.67,18.66,19.5 108 | 0.13117,0,8.56,0,0.52,6.127,85.2,2.1224,5,384,20,387.69,14.09,20.4 109 | 0.12802,0,8.56,0,0.52,6.474,97.1,2.4329,5,384,20,395.24,12.27,19.8 110 | 0.26363,0,8.56,0,0.52,6.229,91.2,2.5451,5,384,20,391.23,15.55,19.4 111 | 0.10793,0,8.56,0,0.52,6.195,54.4,2.7778,5,384,20,393.49,13.0,21.7 112 | 0.10084,0,10.01,0,0.547,6.715,81.6,2.6775,6,432,17,395.59,10.16,22.8 113 | 0.12329,0,10.01,0,0.547,5.913,92.9,2.3534,6,432,17,394.95,16.21,18.8 114 | 0.22212,0,10.01,0,0.547,6.092,95.4,2.548,6,432,17,396.9,17.09,18.7 115 | 0.14231,0,10.01,0,0.547,6.254,84.2,2.2565,6,432,17,388.74,10.45,18.5 116 | 0.17134,0,10.01,0,0.547,5.928,88.2,2.4631,6,432,17,344.91,15.76,18.3 117 | 0.13158,0,10.01,0,0.547,6.176,72.5,2.7301,6,432,17,393.3,12.04,21.2 118 | 0.15098,0,10.01,0,0.547,6.021,82.6,2.7474,6,432,17,394.51,10.3,19.2 119 | 0.13058,0,10.01,0,0.547,5.872,73.1,2.4775,6,432,17,338.63,15.37,20.4 120 | 0.14476,0,10.01,0,0.547,5.731,65.2,2.7592,6,432,17,391.5,13.61,19.3 121 | 0.06899,0,25.65,0,0.581,5.87,69.7,2.2577,2,188,19,389.15,14.37,22.0 122 | 0.07165,0,25.65,0,0.581,6.004,84.1,2.1974,2,188,19,377.67,14.27,20.3 123 | 0.09299,0,25.65,0,0.581,5.961,92.9,2.0869,2,188,19,378.09,17.93,20.5 124 | 0.15038,0,25.65,0,0.581,5.856,97.0,1.9444,2,188,19,370.31,25.41,17.3 125 | 0.09849,0,25.65,0,0.581,5.879,95.8,2.0063,2,188,19,379.38,17.58,18.8 126 | 0.16902,0,25.65,0,0.581,5.986,88.4,1.9929,2,188,19,385.02,14.81,21.4 127 | 0.38735,0,25.65,0,0.581,5.613,95.6,1.7572,2,188,19,359.29,27.26,15.7 128 | 0.25915,0,21.89,0,0.624,5.693,96.0,1.7883,4,437,21,392.11,17.19,16.2 129 | 0.32543,0,21.89,0,0.624,6.431,98.8,1.8125,4,437,21,396.9,15.39,18.0 130 | 0.88125,0,21.89,0,0.624,5.637,94.7,1.9799,4,437,21,396.9,18.34,14.3 131 | 0.34006,0,21.89,0,0.624,6.458,98.9,2.1185,4,437,21,395.04,12.6,19.2 132 | 1.19294,0,21.89,0,0.624,6.326,97.7,2.271,4,437,21,396.9,12.26,19.6 133 | 0.59005,0,21.89,0,0.624,6.372,97.9,2.3274,4,437,21,385.76,11.12,23.0 134 | 0.32982,0,21.89,0,0.624,5.822,95.4,2.4699,4,437,21,388.69,15.03,18.4 135 | 0.97617,0,21.89,0,0.624,5.757,98.4,2.346,4,437,21,262.76,17.31,15.6 136 | 0.55778,0,21.89,0,0.624,6.335,98.2,2.1107,4,437,21,394.67,16.96,18.1 137 | 0.32264,0,21.89,0,0.624,5.942,93.5,1.9669,4,437,21,378.25,16.9,17.4 138 | 0.35233,0,21.89,0,0.624,6.454,98.4,1.8498,4,437,21,394.08,14.59,17.1 139 | 0.2498,0,21.89,0,0.624,5.857,98.2,1.6686,4,437,21,392.04,21.32,13.3 140 | 0.54452,0,21.89,0,0.624,6.151,97.9,1.6687,4,437,21,396.9,18.46,17.8 141 | 0.2909,0,21.89,0,0.624,6.174,93.6,1.6119,4,437,21,388.08,24.16,14.0 142 | 1.62864,0,21.89,0,0.624,5.019,100.0,1.4394,4,437,21,396.9,34.41,14.4 143 | 3.32105,0,19.58,1,0.871,5.403,100.0,1.3216,5,403,14,396.9,26.82,13.4 144 | 4.0974,0,19.58,0,0.871,5.468,100.0,1.4118,5,403,14,396.9,26.42,15.6 145 | 2.77974,0,19.58,0,0.871,4.903,97.8,1.3459,5,403,14,396.9,29.29,11.8 146 | 2.37934,0,19.58,0,0.871,6.13,100.0,1.4191,5,403,14,172.91,27.8,13.8 147 | 2.15505,0,19.58,0,0.871,5.628,100.0,1.5166,5,403,14,169.27,16.65,15.6 148 | 2.36862,0,19.58,0,0.871,4.926,95.7,1.4608,5,403,14,391.71,29.53,14.6 149 | 2.33099,0,19.58,0,0.871,5.186,93.8,1.5296,5,403,14,356.99,28.32,17.8 150 | 2.73397,0,19.58,0,0.871,5.597,94.9,1.5257,5,403,14,351.85,21.45,15.4 151 | 1.6566,0,19.58,0,0.871,6.122,97.3,1.618,5,403,14,372.8,14.1,21.5 152 | 1.49632,0,19.58,0,0.871,5.404,100.0,1.5916,5,403,14,341.6,13.28,19.6 153 | 1.12658,0,19.58,1,0.871,5.012,88.0,1.6102,5,403,14,343.28,12.12,15.3 154 | 2.14918,0,19.58,0,0.871,5.709,98.5,1.6232,5,403,14,261.95,15.79,19.4 155 | 1.41385,0,19.58,1,0.871,6.129,96.0,1.7494,5,403,14,321.02,15.12,17.0 156 | 3.53501,0,19.58,1,0.871,6.152,82.6,1.7455,5,403,14,88.01,15.02,15.6 157 | 2.44668,0,19.58,0,0.871,5.272,94.0,1.7364,5,403,14,88.63,16.14,13.1 158 | 1.22358,0,19.58,0,0.605,6.943,97.4,1.8773,5,403,14,363.43,4.59,41.3 159 | 1.34284,0,19.58,0,0.605,6.066,100.0,1.7573,5,403,14,353.89,6.43,24.3 160 | 1.42502,0,19.58,0,0.871,6.51,100.0,1.7659,5,403,14,364.31,7.39,23.3 161 | 1.27346,0,19.58,1,0.605,6.25,92.6,1.7984,5,403,14,338.92,5.5,27.0 162 | 1.46336,0,19.58,0,0.605,7.489,90.8,1.9709,5,403,14,374.43,1.73,50.0 163 | 1.83377,0,19.58,1,0.605,7.802,98.2,2.0407,5,403,14,389.61,1.92,50.0 164 | 1.51902,0,19.58,1,0.605,8.375,93.9,2.162,5,403,14,388.45,3.32,50.0 165 | 2.24236,0,19.58,0,0.605,5.854,91.8,2.422,5,403,14,395.11,11.64,22.7 166 | 2.924,0,19.58,0,0.605,6.101,93.0,2.2834,5,403,14,240.16,9.81,25.0 167 | 2.01019,0,19.58,0,0.605,7.929,96.2,2.0459,5,403,14,369.3,3.7,50.0 168 | 1.80028,0,19.58,0,0.605,5.877,79.2,2.4259,5,403,14,227.61,12.14,23.8 169 | 2.3004,0,19.58,0,0.605,6.319,96.1,2.1,5,403,14,297.09,11.1,23.8 170 | 2.44953,0,19.58,0,0.605,6.402,95.2,2.2625,5,403,14,330.04,11.32,22.3 171 | 1.20742,0,19.58,0,0.605,5.875,94.6,2.4259,5,403,14,292.29,14.43,17.4 172 | 2.3139,0,19.58,0,0.605,5.88,97.3,2.3887,5,403,14,348.13,12.03,19.1 173 | 0.13914,0,4.05,0,0.51,5.572,88.5,2.5961,5,296,16,396.9,14.69,23.1 174 | 0.09178,0,4.05,0,0.51,6.416,84.1,2.6463,5,296,16,395.5,9.04,23.6 175 | 0.08447,0,4.05,0,0.51,5.859,68.7,2.7019,5,296,16,393.23,9.64,22.6 176 | 0.06664,0,4.05,0,0.51,6.546,33.1,3.1323,5,296,16,390.96,5.33,29.4 177 | 0.07022,0,4.05,0,0.51,6.02,47.2,3.5549,5,296,16,393.23,10.11,23.2 178 | 0.05425,0,4.05,0,0.51,6.315,73.4,3.3175,5,296,16,395.6,6.29,24.6 179 | 0.06642,0,4.05,0,0.51,6.86,74.4,2.9153,5,296,16,391.27,6.92,29.9 180 | 0.0578,0,2.46,0,0.488,6.98,58.4,2.829,3,193,17,396.9,5.04,37.2 181 | 0.06588,0,2.46,0,0.488,7.765,83.3,2.741,3,193,17,395.56,7.56,39.8 182 | 0.06888,0,2.46,0,0.488,6.144,62.2,2.5979,3,193,17,396.9,9.45,36.2 183 | 0.09103,0,2.46,0,0.488,7.155,92.2,2.7006,3,193,17,394.12,4.82,37.9 184 | 0.10008,0,2.46,0,0.488,6.563,95.6,2.847,3,193,17,396.9,5.68,32.5 185 | 0.08308,0,2.46,0,0.488,5.604,89.8,2.9879,3,193,17,391.0,13.98,26.4 186 | 0.06047,0,2.46,0,0.488,6.153,68.8,3.2797,3,193,17,387.11,13.15,29.6 187 | 0.05602,0,2.46,0,0.488,7.831,53.6,3.1992,3,193,17,392.63,4.45,50.0 188 | 0.07875,45,3.44,0,0.437,6.782,41.1,3.7886,5,398,15,393.87,6.68,32.0 189 | 0.12579,45,3.44,0,0.437,6.556,29.1,4.5667,5,398,15,382.84,4.56,29.8 190 | 0.0837,45,3.44,0,0.437,7.185,38.9,4.5667,5,398,15,396.9,5.39,34.9 191 | 0.09068,45,3.44,0,0.437,6.951,21.5,6.4798,5,398,15,377.68,5.1,37.0 192 | 0.06911,45,3.44,0,0.437,6.739,30.8,6.4798,5,398,15,389.71,4.69,30.5 193 | 0.08664,45,3.44,0,0.437,7.178,26.3,6.4798,5,398,15,390.49,2.87,36.4 194 | 0.02187,60,2.93,0,0.401,6.8,9.9,6.2196,1,265,15,393.37,5.03,31.1 195 | 0.01439,60,2.93,0,0.401,6.604,18.8,6.2196,1,265,15,376.7,4.38,29.1 196 | 0.01381,80,0.46,0,0.422,7.875,32.0,5.6484,4,255,14,394.23,2.97,50.0 197 | 0.04011,80,1.52,0,0.404,7.287,34.1,7.309,2,329,12,396.9,4.08,33.3 198 | 0.04666,80,1.52,0,0.404,7.107,36.6,7.309,2,329,12,354.31,8.61,30.3 199 | 0.03768,80,1.52,0,0.404,7.274,38.3,7.309,2,329,12,392.2,6.62,34.6 200 | 0.0315,95,1.47,0,0.403,6.975,15.3,7.6534,3,402,17,396.9,4.56,34.9 201 | 0.01778,95,1.47,0,0.403,7.135,13.9,7.6534,3,402,17,384.3,4.45,32.9 202 | 0.03445,82,2.03,0,0.415,6.162,38.4,6.27,2,348,14,393.77,7.43,24.1 203 | 0.02177,82,2.03,0,0.415,7.61,15.7,6.27,2,348,14,395.38,3.11,42.3 204 | 0.0351,95,2.68,0,0.4161,7.853,33.2,5.118,4,224,14,392.78,3.81,48.5 205 | 0.02009,95,2.68,0,0.4161,8.034,31.9,5.118,4,224,14,390.55,2.88,50.0 206 | 0.13642,0,10.59,0,0.489,5.891,22.3,3.9454,4,277,18,396.9,10.87,22.6 207 | 0.22969,0,10.59,0,0.489,6.326,52.5,4.3549,4,277,18,394.87,10.97,24.4 208 | 0.25199,0,10.59,0,0.489,5.783,72.7,4.3549,4,277,18,389.43,18.06,22.5 209 | 0.13587,0,10.59,1,0.489,6.064,59.1,4.2392,4,277,18,381.32,14.66,24.4 210 | 0.43571,0,10.59,1,0.489,5.344,100.0,3.875,4,277,18,396.9,23.09,20.0 211 | 0.17446,0,10.59,1,0.489,5.96,92.1,3.8771,4,277,18,393.25,17.27,21.7 212 | 0.37578,0,10.59,1,0.489,5.404,88.6,3.665,4,277,18,395.24,23.98,19.3 213 | 0.21719,0,10.59,1,0.489,5.807,53.8,3.6526,4,277,18,390.94,16.03,22.4 214 | 0.14052,0,10.59,0,0.489,6.375,32.3,3.9454,4,277,18,385.81,9.38,28.1 215 | 0.28955,0,10.59,0,0.489,5.412,9.8,3.5875,4,277,18,348.93,29.55,23.7 216 | 0.19802,0,10.59,0,0.489,6.182,42.4,3.9454,4,277,18,393.63,9.47,25.0 217 | 0.0456,0,13.89,1,0.55,5.888,56.0,3.1121,5,276,16,392.8,13.51,23.3 218 | 0.07013,0,13.89,0,0.55,6.642,85.1,3.4211,5,276,16,392.78,9.69,28.7 219 | 0.11069,0,13.89,1,0.55,5.951,93.8,2.8893,5,276,16,396.9,17.92,21.5 220 | 0.11425,0,13.89,1,0.55,6.373,92.4,3.3633,5,276,16,393.74,10.5,23.0 221 | 0.35809,0,6.2,1,0.507,6.951,88.5,2.8617,8,307,17,391.7,9.71,26.7 222 | 0.40771,0,6.2,1,0.507,6.164,91.3,3.048,8,307,17,395.24,21.46,21.7 223 | 0.62356,0,6.2,1,0.507,6.879,77.7,3.2721,8,307,17,390.39,9.93,27.5 224 | 0.6147,0,6.2,0,0.507,6.618,80.8,3.2721,8,307,17,396.9,7.6,30.1 225 | 0.31533,0,6.2,0,0.504,8.266,78.3,2.8944,8,307,17,385.05,4.14,44.8 226 | 0.52693,0,6.2,0,0.504,8.725,83.0,2.8944,8,307,17,382.0,4.63,50.0 227 | 0.38214,0,6.2,0,0.504,8.04,86.5,3.2157,8,307,17,387.38,3.13,37.6 228 | 0.41238,0,6.2,0,0.504,7.163,79.9,3.2157,8,307,17,372.08,6.36,31.6 229 | 0.29819,0,6.2,0,0.504,7.686,17.0,3.3751,8,307,17,377.51,3.92,46.7 230 | 0.44178,0,6.2,0,0.504,6.552,21.4,3.3751,8,307,17,380.34,3.76,31.5 231 | 0.537,0,6.2,0,0.504,5.981,68.1,3.6715,8,307,17,378.35,11.65,24.3 232 | 0.46296,0,6.2,0,0.504,7.412,76.9,3.6715,8,307,17,376.14,5.25,31.7 233 | 0.57529,0,6.2,0,0.507,8.337,73.3,3.8384,8,307,17,385.91,2.47,41.7 234 | 0.33147,0,6.2,0,0.507,8.247,70.4,3.6519,8,307,17,378.95,3.95,48.3 235 | 0.44791,0,6.2,1,0.507,6.726,66.5,3.6519,8,307,17,360.2,8.05,29.0 236 | 0.33045,0,6.2,0,0.507,6.086,61.5,3.6519,8,307,17,376.75,10.88,24.0 237 | 0.52058,0,6.2,1,0.507,6.631,76.5,4.148,8,307,17,388.45,9.54,25.1 238 | 0.51183,0,6.2,0,0.507,7.358,71.6,4.148,8,307,17,390.07,4.73,31.5 239 | 0.08244,30,4.93,0,0.428,6.481,18.5,6.1899,6,300,16,379.41,6.36,23.7 240 | 0.09252,30,4.93,0,0.428,6.606,42.2,6.1899,6,300,16,383.78,7.37,23.3 241 | 0.11329,30,4.93,0,0.428,6.897,54.3,6.3361,6,300,16,391.25,11.38,22.0 242 | 0.10612,30,4.93,0,0.428,6.095,65.1,6.3361,6,300,16,394.62,12.4,20.1 243 | 0.1029,30,4.93,0,0.428,6.358,52.9,7.0355,6,300,16,372.75,11.22,22.2 244 | 0.12757,30,4.93,0,0.428,6.393,7.8,7.0355,6,300,16,374.71,5.19,23.7 245 | 0.20608,22,5.86,0,0.431,5.593,76.5,7.9549,7,330,19,372.49,12.5,17.6 246 | 0.19133,22,5.86,0,0.431,5.605,70.2,7.9549,7,330,19,389.13,18.46,18.5 247 | 0.33983,22,5.86,0,0.431,6.108,34.9,8.0555,7,330,19,390.18,9.16,24.3 248 | 0.19657,22,5.86,0,0.431,6.226,79.2,8.0555,7,330,19,376.14,10.15,20.5 249 | 0.16439,22,5.86,0,0.431,6.433,49.1,7.8265,7,330,19,374.71,9.52,24.5 250 | 0.19073,22,5.86,0,0.431,6.718,17.5,7.8265,7,330,19,393.74,6.56,26.2 251 | 0.1403,22,5.86,0,0.431,6.487,13.0,7.3967,7,330,19,396.28,5.9,24.4 252 | 0.21409,22,5.86,0,0.431,6.438,8.9,7.3967,7,330,19,377.07,3.59,24.8 253 | 0.08221,22,5.86,0,0.431,6.957,6.8,8.9067,7,330,19,386.09,3.53,29.6 254 | 0.36894,22,5.86,0,0.431,8.259,8.4,8.9067,7,330,19,396.9,3.54,42.8 255 | 0.04819,80,3.64,0,0.392,6.108,32.0,9.2203,1,315,16,392.89,6.57,21.9 256 | 0.03548,80,3.64,0,0.392,5.876,19.1,9.2203,1,315,16,395.18,9.25,20.9 257 | 0.01538,90,3.75,0,0.394,7.454,34.2,6.3361,3,244,15,386.34,3.11,44.0 258 | 0.61154,20,3.97,0,0.647,8.704,86.9,1.801,5,264,13,389.7,5.12,50.0 259 | 0.66351,20,3.97,0,0.647,7.333,100.0,1.8946,5,264,13,383.29,7.79,36.0 260 | 0.65665,20,3.97,0,0.647,6.842,100.0,2.0107,5,264,13,391.93,6.9,30.1 261 | 0.54011,20,3.97,0,0.647,7.203,81.8,2.1121,5,264,13,392.8,9.59,33.8 262 | 0.53412,20,3.97,0,0.647,7.52,89.4,2.1398,5,264,13,388.37,7.26,43.1 263 | 0.52014,20,3.97,0,0.647,8.398,91.5,2.2885,5,264,13,386.86,5.91,48.8 264 | 0.82526,20,3.97,0,0.647,7.327,94.5,2.0788,5,264,13,393.42,11.25,31.0 265 | 0.55007,20,3.97,0,0.647,7.206,91.6,1.9301,5,264,13,387.89,8.1,36.5 266 | 0.76162,20,3.97,0,0.647,5.56,62.8,1.9865,5,264,13,392.4,10.45,22.8 267 | 0.7857,20,3.97,0,0.647,7.014,84.6,2.1329,5,264,13,384.07,14.79,30.7 268 | 0.57834,20,3.97,0,0.575,8.297,67.0,2.4216,5,264,13,384.54,7.44,50.0 269 | 0.5405,20,3.97,0,0.575,7.47,52.6,2.872,5,264,13,390.3,3.16,43.5 270 | 0.09065,20,6.96,1,0.464,5.92,61.5,3.9175,3,223,18,391.34,13.65,20.7 271 | 0.29916,20,6.96,0,0.464,5.856,42.1,4.429,3,223,18,388.65,13.0,21.1 272 | 0.16211,20,6.96,0,0.464,6.24,16.3,4.429,3,223,18,396.9,6.59,25.2 273 | 0.1146,20,6.96,0,0.464,6.538,58.7,3.9175,3,223,18,394.96,7.73,24.4 274 | 0.22188,20,6.96,1,0.464,7.691,51.8,4.3665,3,223,18,390.77,6.58,35.2 275 | 0.05644,40,6.41,1,0.447,6.758,32.9,4.0776,4,254,17,396.9,3.53,32.4 276 | 0.09604,40,6.41,0,0.447,6.854,42.8,4.2673,4,254,17,396.9,2.98,32.0 277 | 0.10469,40,6.41,1,0.447,7.267,49.0,4.7872,4,254,17,389.25,6.05,33.2 278 | 0.06127,40,6.41,1,0.447,6.826,27.6,4.8628,4,254,17,393.45,4.16,33.1 279 | 0.07978,40,6.41,0,0.447,6.482,32.1,4.1403,4,254,17,396.9,7.19,29.1 280 | 0.21038,20,3.33,0,0.4429,6.812,32.2,4.1007,5,216,14,396.9,4.85,35.1 281 | 0.03578,20,3.33,0,0.4429,7.82,64.5,4.6947,5,216,14,387.31,3.76,45.4 282 | 0.03705,20,3.33,0,0.4429,6.968,37.2,5.2447,5,216,14,392.23,4.59,35.4 283 | 0.06129,20,3.33,1,0.4429,7.645,49.7,5.2119,5,216,14,377.07,3.01,46.0 284 | 0.01501,90,1.21,1,0.401,7.923,24.8,5.885,1,198,13,395.52,3.16,50.0 285 | 0.00906,90,2.97,0,0.4,7.088,20.8,7.3073,1,285,15,394.72,7.85,32.2 286 | 0.01096,55,2.25,0,0.389,6.453,31.9,7.3073,1,300,15,394.72,8.23,22.0 287 | 0.01965,80,1.76,0,0.385,6.23,31.5,9.0892,1,241,18,341.6,12.93,20.1 288 | 0.03871,52,5.32,0,0.405,6.209,31.3,7.3172,6,293,16,396.9,7.14,23.2 289 | 0.0459,52,5.32,0,0.405,6.315,45.6,7.3172,6,293,16,396.9,7.6,22.3 290 | 0.04297,52,5.32,0,0.405,6.565,22.9,7.3172,6,293,16,371.72,9.51,24.8 291 | 0.03502,80,4.95,0,0.411,6.861,27.9,5.1167,4,245,19,396.9,3.33,28.5 292 | 0.07886,80,4.95,0,0.411,7.148,27.7,5.1167,4,245,19,396.9,3.56,37.3 293 | 0.03615,80,4.95,0,0.411,6.63,23.4,5.1167,4,245,19,396.9,4.7,27.9 294 | 0.08265,0,13.92,0,0.437,6.127,18.4,5.5027,4,289,16,396.9,8.58,23.9 295 | 0.08199,0,13.92,0,0.437,6.009,42.3,5.5027,4,289,16,396.9,10.4,21.7 296 | 0.12932,0,13.92,0,0.437,6.678,31.1,5.9604,4,289,16,396.9,6.27,28.6 297 | 0.05372,0,13.92,0,0.437,6.549,51.0,5.9604,4,289,16,392.85,7.39,27.1 298 | 0.14103,0,13.92,0,0.437,5.79,58.0,6.32,4,289,16,396.9,15.84,20.3 299 | 0.06466,70,2.24,0,0.4,6.345,20.1,7.8278,5,358,14,368.24,4.97,22.5 300 | 0.05561,70,2.24,0,0.4,7.041,10.0,7.8278,5,358,14,371.58,4.74,29.0 301 | 0.04417,70,2.24,0,0.4,6.871,47.4,7.8278,5,358,14,390.86,6.07,24.8 302 | 0.03537,34,6.09,0,0.433,6.59,40.4,5.4917,7,329,16,395.75,9.5,22.0 303 | 0.09266,34,6.09,0,0.433,6.495,18.4,5.4917,7,329,16,383.61,8.67,26.4 304 | 0.1,34,6.09,0,0.433,6.982,17.7,5.4917,7,329,16,390.43,4.86,33.1 305 | 0.05515,33,2.18,0,0.472,7.236,41.1,4.022,7,222,18,393.68,6.93,36.1 306 | 0.05479,33,2.18,0,0.472,6.616,58.1,3.37,7,222,18,393.36,8.93,28.4 307 | 0.07503,33,2.18,0,0.472,7.42,71.9,3.0992,7,222,18,396.9,6.47,33.4 308 | 0.04932,33,2.18,0,0.472,6.849,70.3,3.1827,7,222,18,396.9,7.53,28.2 309 | 0.49298,0,9.9,0,0.544,6.635,82.5,3.3175,4,304,18,396.9,4.54,22.8 310 | 0.3494,0,9.9,0,0.544,5.972,76.7,3.1025,4,304,18,396.24,9.97,20.3 311 | 2.63548,0,9.9,0,0.544,4.973,37.8,2.5194,4,304,18,350.45,12.64,16.1 312 | 0.79041,0,9.9,0,0.544,6.122,52.8,2.6403,4,304,18,396.9,5.98,22.1 313 | 0.26169,0,9.9,0,0.544,6.023,90.4,2.834,4,304,18,396.3,11.72,19.4 314 | 0.26938,0,9.9,0,0.544,6.266,82.8,3.2628,4,304,18,393.39,7.9,21.6 315 | 0.3692,0,9.9,0,0.544,6.567,87.3,3.6023,4,304,18,395.69,9.28,23.8 316 | 0.25356,0,9.9,0,0.544,5.705,77.7,3.945,4,304,18,396.42,11.5,16.2 317 | 0.31827,0,9.9,0,0.544,5.914,83.2,3.9986,4,304,18,390.7,18.33,17.8 318 | 0.24522,0,9.9,0,0.544,5.782,71.7,4.0317,4,304,18,396.9,15.94,19.8 319 | 0.40202,0,9.9,0,0.544,6.382,67.2,3.5325,4,304,18,395.21,10.36,23.1 320 | 0.47547,0,9.9,0,0.544,6.113,58.8,4.0019,4,304,18,396.23,12.73,21.0 321 | 0.1676,0,7.38,0,0.493,6.426,52.3,4.5404,5,287,19,396.9,7.2,23.8 322 | 0.18159,0,7.38,0,0.493,6.376,54.3,4.5404,5,287,19,396.9,6.87,23.1 323 | 0.35114,0,7.38,0,0.493,6.041,49.9,4.7211,5,287,19,396.9,7.7,20.4 324 | 0.28392,0,7.38,0,0.493,5.708,74.3,4.7211,5,287,19,391.13,11.74,18.5 325 | 0.34109,0,7.38,0,0.493,6.415,40.1,4.7211,5,287,19,396.9,6.12,25.0 326 | 0.19186,0,7.38,0,0.493,6.431,14.7,5.4159,5,287,19,393.68,5.08,24.6 327 | 0.30347,0,7.38,0,0.493,6.312,28.9,5.4159,5,287,19,396.9,6.15,23.0 328 | 0.24103,0,7.38,0,0.493,6.083,43.7,5.4159,5,287,19,396.9,12.79,22.2 329 | 0.06617,0,3.24,0,0.46,5.868,25.8,5.2146,4,430,16,382.44,9.97,19.3 330 | 0.06724,0,3.24,0,0.46,6.333,17.2,5.2146,4,430,16,375.21,7.34,22.6 331 | 0.04544,0,3.24,0,0.46,6.144,32.2,5.8736,4,430,16,368.57,9.09,19.8 332 | 0.05023,35,6.06,0,0.4379,5.706,28.4,6.6407,1,304,16,394.02,12.43,17.1 333 | 0.03466,35,6.06,0,0.4379,6.031,23.3,6.6407,1,304,16,362.25,7.83,19.4 334 | 0.05083,0,5.19,0,0.515,6.316,38.1,6.4584,5,224,20,389.71,5.68,22.2 335 | 0.03738,0,5.19,0,0.515,6.31,38.5,6.4584,5,224,20,389.4,6.75,20.7 336 | 0.03961,0,5.19,0,0.515,6.037,34.5,5.9853,5,224,20,396.9,8.01,21.1 337 | 0.03427,0,5.19,0,0.515,5.869,46.3,5.2311,5,224,20,396.9,9.8,19.5 338 | 0.03041,0,5.19,0,0.515,5.895,59.6,5.615,5,224,20,394.81,10.56,18.5 339 | 0.03306,0,5.19,0,0.515,6.059,37.3,4.8122,5,224,20,396.14,8.51,20.6 340 | 0.05497,0,5.19,0,0.515,5.985,45.4,4.8122,5,224,20,396.9,9.74,19.0 341 | 0.06151,0,5.19,0,0.515,5.968,58.5,4.8122,5,224,20,396.9,9.29,18.7 342 | 0.01301,35,1.52,0,0.442,7.241,49.3,7.0379,1,284,15,394.74,5.49,32.7 343 | 0.02498,0,1.89,0,0.518,6.54,59.7,6.2669,1,422,15,389.96,8.65,16.5 344 | 0.02543,55,3.78,0,0.484,6.696,56.4,5.7321,5,370,17,396.9,7.18,23.9 345 | 0.03049,55,3.78,0,0.484,6.874,28.1,6.4654,5,370,17,387.97,4.61,31.2 346 | 0.03113,0,4.39,0,0.442,6.014,48.5,8.0136,3,352,18,385.64,10.53,17.5 347 | 0.06162,0,4.39,0,0.442,5.898,52.3,8.0136,3,352,18,364.61,12.67,17.2 348 | 0.0187,85,4.15,0,0.429,6.516,27.7,8.5353,4,351,17,392.43,6.36,23.1 349 | 0.01501,80,2.01,0,0.435,6.635,29.7,8.344,4,280,17,390.94,5.99,24.5 350 | 0.02899,40,1.25,0,0.429,6.939,34.5,8.7921,1,335,19,389.85,5.89,26.6 351 | 0.06211,40,1.25,0,0.429,6.49,44.4,8.7921,1,335,19,396.9,5.98,22.9 352 | 0.0795,60,1.69,0,0.411,6.579,35.9,10.7103,4,411,18,370.78,5.49,24.1 353 | 0.07244,60,1.69,0,0.411,5.884,18.5,10.7103,4,411,18,392.33,7.79,18.6 354 | 0.01709,90,2.02,0,0.41,6.728,36.1,12.1265,5,187,17,384.46,4.5,30.1 355 | 0.04301,80,1.91,0,0.413,5.663,21.9,10.5857,4,334,22,382.8,8.05,18.2 356 | 0.10659,80,1.91,0,0.413,5.936,19.5,10.5857,4,334,22,376.04,5.57,20.6 357 | 8.98296,0,18.1,1,0.77,6.212,97.4,2.1222,24,666,20,377.73,17.6,17.8 358 | 3.8497,0,18.1,1,0.77,6.395,91.0,2.5052,24,666,20,391.34,13.27,21.7 359 | 5.20177,0,18.1,1,0.77,6.127,83.4,2.7227,24,666,20,395.43,11.48,22.7 360 | 4.26131,0,18.1,0,0.77,6.112,81.3,2.5091,24,666,20,390.74,12.67,22.6 361 | 4.54192,0,18.1,0,0.77,6.398,88.0,2.5182,24,666,20,374.56,7.79,25.0 362 | 3.83684,0,18.1,0,0.77,6.251,91.1,2.2955,24,666,20,350.65,14.19,19.9 363 | 3.67822,0,18.1,0,0.77,5.362,96.2,2.1036,24,666,20,380.79,10.19,20.8 364 | 4.22239,0,18.1,1,0.77,5.803,89.0,1.9047,24,666,20,353.04,14.64,16.8 365 | 3.47428,0,18.1,1,0.718,8.78,82.9,1.9047,24,666,20,354.55,5.29,21.9 366 | 4.55587,0,18.1,0,0.718,3.561,87.9,1.6132,24,666,20,354.7,7.12,27.5 367 | 3.69695,0,18.1,0,0.718,4.963,91.4,1.7523,24,666,20,316.03,14.0,21.9 368 | 13.5222,0,18.1,0,0.631,3.863,100.0,1.5106,24,666,20,131.42,13.33,23.1 369 | 4.89822,0,18.1,0,0.631,4.97,100.0,1.3325,24,666,20,375.52,3.26,50.0 370 | 5.66998,0,18.1,1,0.631,6.683,96.8,1.3567,24,666,20,375.33,3.73,50.0 371 | 6.53876,0,18.1,1,0.631,7.016,97.5,1.2024,24,666,20,392.05,2.96,50.0 372 | 9.2323,0,18.1,0,0.631,6.216,100.0,1.1691,24,666,20,366.15,9.53,50.0 373 | 8.26725,0,18.1,1,0.668,5.875,89.6,1.1296,24,666,20,347.88,8.88,50.0 374 | 11.1081,0,18.1,0,0.668,4.906,100.0,1.1742,24,666,20,396.9,34.77,13.8 375 | 18.4982,0,18.1,0,0.668,4.138,100.0,1.137,24,666,20,396.9,37.97,13.8 376 | 19.6091,0,18.1,0,0.671,7.313,97.9,1.3163,24,666,20,396.9,13.44,15.0 377 | 15.288,0,18.1,0,0.671,6.649,93.3,1.3449,24,666,20,363.02,23.24,13.9 378 | 9.82349,0,18.1,0,0.671,6.794,98.8,1.358,24,666,20,396.9,21.24,13.3 379 | 23.6482,0,18.1,0,0.671,6.38,96.2,1.3861,24,666,20,396.9,23.69,13.1 380 | 17.8667,0,18.1,0,0.671,6.223,100.0,1.3861,24,666,20,393.74,21.78,10.2 381 | 88.9762,0,18.1,0,0.671,6.968,91.9,1.4165,24,666,20,396.9,17.21,10.4 382 | 15.8744,0,18.1,0,0.671,6.545,99.1,1.5192,24,666,20,396.9,21.08,10.9 383 | 9.18702,0,18.1,0,0.7,5.536,100.0,1.5804,24,666,20,396.9,23.6,11.3 384 | 7.99248,0,18.1,0,0.7,5.52,100.0,1.5331,24,666,20,396.9,24.56,12.3 385 | 20.0849,0,18.1,0,0.7,4.368,91.2,1.4395,24,666,20,285.83,30.63,8.8 386 | 16.8118,0,18.1,0,0.7,5.277,98.1,1.4261,24,666,20,396.9,30.81,7.2 387 | 24.3938,0,18.1,0,0.7,4.652,100.0,1.4672,24,666,20,396.9,28.28,10.5 388 | 22.5971,0,18.1,0,0.7,5.0,89.5,1.5184,24,666,20,396.9,31.99,7.4 389 | 14.3337,0,18.1,0,0.7,4.88,100.0,1.5895,24,666,20,372.92,30.62,10.2 390 | 8.15174,0,18.1,0,0.7,5.39,98.9,1.7281,24,666,20,396.9,20.85,11.5 391 | 6.96215,0,18.1,0,0.7,5.713,97.0,1.9265,24,666,20,394.43,17.11,15.1 392 | 5.29305,0,18.1,0,0.7,6.051,82.5,2.1678,24,666,20,378.38,18.76,23.2 393 | 11.5779,0,18.1,0,0.7,5.036,97.0,1.77,24,666,20,396.9,25.68,9.7 394 | 8.64476,0,18.1,0,0.693,6.193,92.6,1.7912,24,666,20,396.9,15.17,13.8 395 | 13.3598,0,18.1,0,0.693,5.887,94.7,1.7821,24,666,20,396.9,16.35,12.7 396 | 8.71675,0,18.1,0,0.693,6.471,98.8,1.7257,24,666,20,391.98,17.12,13.1 397 | 5.87205,0,18.1,0,0.693,6.405,96.0,1.6768,24,666,20,396.9,19.37,12.5 398 | 7.67202,0,18.1,0,0.693,5.747,98.9,1.6334,24,666,20,393.1,19.92,8.5 399 | 38.3518,0,18.1,0,0.693,5.453,100.0,1.4896,24,666,20,396.9,30.59,5.0 400 | 9.91655,0,18.1,0,0.693,5.852,77.8,1.5004,24,666,20,338.16,29.97,6.3 401 | 25.0461,0,18.1,0,0.693,5.987,100.0,1.5888,24,666,20,396.9,26.77,5.6 402 | 14.2362,0,18.1,0,0.693,6.343,100.0,1.5741,24,666,20,396.9,20.32,7.2 403 | 9.59571,0,18.1,0,0.693,6.404,100.0,1.639,24,666,20,376.11,20.31,12.1 404 | 24.8017,0,18.1,0,0.693,5.349,96.0,1.7028,24,666,20,396.9,19.77,8.3 405 | 41.5292,0,18.1,0,0.693,5.531,85.4,1.6074,24,666,20,329.46,27.38,8.5 406 | 67.9208,0,18.1,0,0.693,5.683,100.0,1.4254,24,666,20,384.97,22.98,5.0 407 | 20.7162,0,18.1,0,0.659,4.138,100.0,1.1781,24,666,20,370.22,23.34,11.9 408 | 11.9511,0,18.1,0,0.659,5.608,100.0,1.2852,24,666,20,332.09,12.13,27.9 409 | 7.40389,0,18.1,0,0.597,5.617,97.9,1.4547,24,666,20,314.64,26.4,17.2 410 | 14.4383,0,18.1,0,0.597,6.852,100.0,1.4655,24,666,20,179.36,19.78,27.5 411 | 51.1358,0,18.1,0,0.597,5.757,100.0,1.413,24,666,20,2.6,10.11,15.0 412 | 14.0507,0,18.1,0,0.597,6.657,100.0,1.5275,24,666,20,35.05,21.22,17.2 413 | 18.811,0,18.1,0,0.597,4.628,100.0,1.5539,24,666,20,28.79,34.37,17.9 414 | 28.6558,0,18.1,0,0.597,5.155,100.0,1.5894,24,666,20,210.97,20.08,16.3 415 | 45.7461,0,18.1,0,0.693,4.519,100.0,1.6582,24,666,20,88.27,36.98,7.0 416 | 18.0846,0,18.1,0,0.679,6.434,100.0,1.8347,24,666,20,27.25,29.05,7.2 417 | 10.8342,0,18.1,0,0.679,6.782,90.8,1.8195,24,666,20,21.57,25.79,7.5 418 | 25.9406,0,18.1,0,0.679,5.304,89.1,1.6475,24,666,20,127.36,26.64,10.4 419 | 73.5341,0,18.1,0,0.679,5.957,100.0,1.8026,24,666,20,16.45,20.62,8.8 420 | 11.8123,0,18.1,0,0.718,6.824,76.5,1.794,24,666,20,48.45,22.74,8.4 421 | 11.0874,0,18.1,0,0.718,6.411,100.0,1.8589,24,666,20,318.75,15.02,16.7 422 | 7.02259,0,18.1,0,0.718,6.006,95.3,1.8746,24,666,20,319.98,15.7,14.2 423 | 12.0482,0,18.1,0,0.614,5.648,87.6,1.9512,24,666,20,291.55,14.1,20.8 424 | 7.05042,0,18.1,0,0.614,6.103,85.1,2.0218,24,666,20,2.52,23.29,13.4 425 | 8.79212,0,18.1,0,0.584,5.565,70.6,2.0635,24,666,20,3.65,17.16,11.7 426 | 15.8603,0,18.1,0,0.679,5.896,95.4,1.9096,24,666,20,7.68,24.39,8.3 427 | 12.2472,0,18.1,0,0.584,5.837,59.7,1.9976,24,666,20,24.65,15.69,10.2 428 | 37.6619,0,18.1,0,0.679,6.202,78.7,1.8629,24,666,20,18.82,14.52,10.9 429 | 7.36711,0,18.1,0,0.679,6.193,78.1,1.9356,24,666,20,96.73,21.52,11.0 430 | 9.33889,0,18.1,0,0.679,6.38,95.6,1.9682,24,666,20,60.72,24.08,9.5 431 | 8.49213,0,18.1,0,0.584,6.348,86.1,2.0527,24,666,20,83.45,17.64,14.5 432 | 10.0623,0,18.1,0,0.584,6.833,94.3,2.0882,24,666,20,81.33,19.69,14.1 433 | 6.44405,0,18.1,0,0.584,6.425,74.8,2.2004,24,666,20,97.95,12.03,16.1 434 | 5.58107,0,18.1,0,0.713,6.436,87.9,2.3158,24,666,20,100.19,16.22,14.3 435 | 13.9134,0,18.1,0,0.713,6.208,95.0,2.2222,24,666,20,100.63,15.17,11.7 436 | 11.1604,0,18.1,0,0.74,6.629,94.6,2.1247,24,666,20,109.85,23.27,13.4 437 | 14.4208,0,18.1,0,0.74,6.461,93.3,2.0026,24,666,20,27.49,18.05,9.6 438 | 15.1772,0,18.1,0,0.74,6.152,100.0,1.9142,24,666,20,9.32,26.45,8.7 439 | 13.6781,0,18.1,0,0.74,5.935,87.9,1.8206,24,666,20,68.95,34.02,8.4 440 | 9.39063,0,18.1,0,0.74,5.627,93.9,1.8172,24,666,20,396.9,22.88,12.8 441 | 22.0511,0,18.1,0,0.74,5.818,92.4,1.8662,24,666,20,391.45,22.11,10.5 442 | 9.72418,0,18.1,0,0.74,6.406,97.2,2.0651,24,666,20,385.96,19.52,17.1 443 | 5.66637,0,18.1,0,0.74,6.219,100.0,2.0048,24,666,20,395.69,16.59,18.4 444 | 9.96654,0,18.1,0,0.74,6.485,100.0,1.9784,24,666,20,386.73,18.85,15.4 445 | 12.8023,0,18.1,0,0.74,5.854,96.6,1.8956,24,666,20,240.52,23.79,10.8 446 | 10.6718,0,18.1,0,0.74,6.459,94.8,1.9879,24,666,20,43.06,23.98,11.8 447 | 6.28807,0,18.1,0,0.74,6.341,96.4,2.072,24,666,20,318.01,17.79,14.9 448 | 9.92485,0,18.1,0,0.74,6.251,96.6,2.198,24,666,20,388.52,16.44,12.6 449 | 9.32909,0,18.1,0,0.713,6.185,98.7,2.2616,24,666,20,396.9,18.13,14.1 450 | 7.52601,0,18.1,0,0.713,6.417,98.3,2.185,24,666,20,304.21,19.31,13.0 451 | 6.71772,0,18.1,0,0.713,6.749,92.6,2.3236,24,666,20,0.32,17.44,13.4 452 | 5.44114,0,18.1,0,0.713,6.655,98.2,2.3552,24,666,20,355.29,17.73,15.2 453 | 5.09017,0,18.1,0,0.713,6.297,91.8,2.3682,24,666,20,385.09,17.27,16.1 454 | 8.24809,0,18.1,0,0.713,7.393,99.3,2.4527,24,666,20,375.87,16.74,17.8 455 | 9.51363,0,18.1,0,0.713,6.728,94.1,2.4961,24,666,20,6.68,18.71,14.9 456 | 4.75237,0,18.1,0,0.713,6.525,86.5,2.4358,24,666,20,50.92,18.13,14.1 457 | 4.66883,0,18.1,0,0.713,5.976,87.9,2.5806,24,666,20,10.48,19.01,12.7 458 | 8.20058,0,18.1,0,0.713,5.936,80.3,2.7792,24,666,20,3.5,16.94,13.5 459 | 7.75223,0,18.1,0,0.713,6.301,83.7,2.7831,24,666,20,272.21,16.23,14.9 460 | 6.80117,0,18.1,0,0.713,6.081,84.4,2.7175,24,666,20,396.9,14.7,20.0 461 | 4.81213,0,18.1,0,0.713,6.701,90.0,2.5975,24,666,20,255.23,16.42,16.4 462 | 3.69311,0,18.1,0,0.713,6.376,88.4,2.5671,24,666,20,391.43,14.65,17.7 463 | 6.65492,0,18.1,0,0.713,6.317,83.0,2.7344,24,666,20,396.9,13.99,19.5 464 | 5.82115,0,18.1,0,0.713,6.513,89.9,2.8016,24,666,20,393.82,10.29,20.2 465 | 7.83932,0,18.1,0,0.655,6.209,65.4,2.9634,24,666,20,396.9,13.22,21.4 466 | 3.1636,0,18.1,0,0.655,5.759,48.2,3.0665,24,666,20,334.4,14.13,19.9 467 | 3.77498,0,18.1,0,0.655,5.952,84.7,2.8715,24,666,20,22.01,17.15,19.0 468 | 4.42228,0,18.1,0,0.584,6.003,94.5,2.5403,24,666,20,331.29,21.32,19.1 469 | 15.5757,0,18.1,0,0.58,5.926,71.0,2.9084,24,666,20,368.74,18.13,19.1 470 | 13.0751,0,18.1,0,0.58,5.713,56.7,2.8237,24,666,20,396.9,14.76,20.1 471 | 4.34879,0,18.1,0,0.58,6.167,84.0,3.0334,24,666,20,396.9,16.29,19.9 472 | 4.03841,0,18.1,0,0.532,6.229,90.7,3.0993,24,666,20,395.33,12.87,19.6 473 | 3.56868,0,18.1,0,0.58,6.437,75.0,2.8965,24,666,20,393.37,14.36,23.2 474 | 4.64689,0,18.1,0,0.614,6.98,67.6,2.5329,24,666,20,374.68,11.66,29.8 475 | 8.05579,0,18.1,0,0.584,5.427,95.4,2.4298,24,666,20,352.58,18.14,13.8 476 | 6.39312,0,18.1,0,0.584,6.162,97.4,2.206,24,666,20,302.76,24.1,13.3 477 | 4.87141,0,18.1,0,0.614,6.484,93.6,2.3053,24,666,20,396.21,18.68,16.7 478 | 15.0234,0,18.1,0,0.614,5.304,97.3,2.1007,24,666,20,349.48,24.91,12.0 479 | 10.233,0,18.1,0,0.614,6.185,96.7,2.1705,24,666,20,379.7,18.03,14.6 480 | 14.3337,0,18.1,0,0.614,6.229,88.0,1.9512,24,666,20,383.32,13.11,21.4 481 | 5.82401,0,18.1,0,0.532,6.242,64.7,3.4242,24,666,20,396.9,10.74,23.0 482 | 5.70818,0,18.1,0,0.532,6.75,74.9,3.3317,24,666,20,393.07,7.74,23.7 483 | 5.73116,0,18.1,0,0.532,7.061,77.0,3.4106,24,666,20,395.28,7.01,25.0 484 | 2.81838,0,18.1,0,0.532,5.762,40.3,4.0983,24,666,20,392.92,10.42,21.8 485 | 2.37857,0,18.1,0,0.583,5.871,41.9,3.724,24,666,20,370.73,13.34,20.6 486 | 3.67367,0,18.1,0,0.583,6.312,51.9,3.9917,24,666,20,388.62,10.58,21.2 487 | 5.69175,0,18.1,0,0.583,6.114,79.8,3.5459,24,666,20,392.68,14.98,19.1 488 | 4.83567,0,18.1,0,0.583,5.905,53.2,3.1523,24,666,20,388.22,11.45,20.6 489 | 0.15086,0,27.74,0,0.609,5.454,92.7,1.8209,4,711,20,395.09,18.06,15.2 490 | 0.18337,0,27.74,0,0.609,5.414,98.3,1.7554,4,711,20,344.05,23.97,7.0 491 | 0.20746,0,27.74,0,0.609,5.093,98.0,1.8226,4,711,20,318.43,29.68,8.1 492 | 0.10574,0,27.74,0,0.609,5.983,98.8,1.8681,4,711,20,390.11,18.07,13.6 493 | 0.11132,0,27.74,0,0.609,5.983,83.5,2.1099,4,711,20,396.9,13.35,20.1 494 | 0.17331,0,9.69,0,0.585,5.707,54.0,2.3817,6,391,19,396.9,12.01,21.8 495 | 0.27957,0,9.69,0,0.585,5.926,42.6,2.3817,6,391,19,396.9,13.59,24.5 496 | 0.17899,0,9.69,0,0.585,5.67,28.8,2.7986,6,391,19,393.29,17.6,23.1 497 | 0.2896,0,9.69,0,0.585,5.39,72.9,2.7986,6,391,19,396.9,21.14,19.7 498 | 0.26838,0,9.69,0,0.585,5.794,70.6,2.8927,6,391,19,396.9,14.1,18.3 499 | 0.23912,0,9.69,0,0.585,6.019,65.3,2.4091,6,391,19,396.9,12.92,21.2 500 | 0.17783,0,9.69,0,0.585,5.569,73.5,2.3999,6,391,19,395.77,15.1,17.5 501 | 0.22438,0,9.69,0,0.585,6.027,79.7,2.4982,6,391,19,396.9,14.33,16.8 502 | 0.06263,0,11.93,0,0.573,6.593,69.1,2.4786,1,273,21,391.99,9.67,22.4 503 | 0.04527,0,11.93,0,0.573,6.12,76.7,2.2875,1,273,21,396.9,9.08,20.6 504 | 0.06076,0,11.93,0,0.573,6.976,91.0,2.1675,1,273,21,396.9,5.64,23.9 505 | 0.10959,0,11.93,0,0.573,6.794,89.3,2.3889,1,273,21,393.45,6.48,22.0 506 | 0.04741,0,11.93,0,0.573,6.03,80.8,2.505,1,273,21,396.9,7.88,11.9 507 | -------------------------------------------------------------------------------- /Chapter5/bottle1.py: -------------------------------------------------------------------------------- 1 | from bottle import route, run, template 2 | 3 | port = 9099 4 | 5 | 6 | @route('/personal/') 7 | def homepage(name): 8 | return template('Hi {{name}}!', name=name) 9 | 10 | 11 | print("Try going to http://localhost:{}/personal/Tom".format(port)) 12 | print("Try going to http://localhost:{}/personal/Carl".format(port)) 13 | 14 | run(host='localhost', port=port) 15 | -------------------------------------------------------------------------------- /Chapter5/bottle2.py: -------------------------------------------------------------------------------- 1 | from sklearn.datasets import load_iris 2 | from sklearn.linear_model import LogisticRegression 3 | from bottle import run, request, get, post 4 | import numpy as np 5 | 6 | port = 9099 7 | 8 | 9 | @get('/predict') 10 | def predict(): 11 | return ''' 12 |
13 | Sepal length [cm]:
14 | Sepal width [cm]:
15 | Petal length [cm]:
16 | Petal width [cm]:
17 | 18 |
19 | ''' 20 | 21 | 22 | @post('/prediction') 23 | def do_prediction(): 24 | 25 | try: 26 | sample = [float(request.POST.get('sl')), 27 | float(request.POST.get('sw')), 28 | float(request.POST.get('pl')), 29 | float(request.POST.get('pw'))] 30 | 31 | pred = classifier.predict(np.matrix(sample))[0] 32 | return "

The predictor says it's a {}

".format(iris['target_names'][pred]) 33 | except: 34 | return "

Error, values should be all numbers

" 35 | 36 | 37 | iris = load_iris() 38 | classifier = LogisticRegression() 39 | classifier.fit(iris.data, iris.target) 40 | 41 | 42 | print("Try going to http://localhost:{}/predict".format(port)) 43 | run(host='localhost', port=port) 44 | 45 | # Try insert the following values: 46 | # [ 5.1, 3.5, 1.4, 0.2] -> setosa 47 | # [ 7.0 3.2, 4.7, 1.4] -> versicolor 48 | # [ 6.3, 3.3, 6.0, 2.5] -> virginica 49 | -------------------------------------------------------------------------------- /Chapter5/bottle3.py: -------------------------------------------------------------------------------- 1 | from sklearn.datasets import load_iris 2 | from sklearn.linear_model import LogisticRegression 3 | from bottle import run, request, get, response 4 | import numpy as np 5 | import json 6 | 7 | port = 9099 8 | 9 | 10 | @get('/prediction') 11 | def do_prediction(): 12 | 13 | pred = {} 14 | 15 | try: 16 | sample = [float(request.GET.get('sl')), 17 | float(request.GET.get('sw')), 18 | float(request.GET.get('pl')), 19 | float(request.GET.get('pw'))] 20 | 21 | pred['predicted_label'] = iris['target_names'][classifier.predict(np.matrix(sample))[0]] 22 | pred['status'] = "OK" 23 | except: 24 | pred['status'] = "ERROR" 25 | 26 | response.content_type = 'application/json' 27 | return json.dumps(pred) 28 | 29 | 30 | 31 | iris = load_iris() 32 | classifier = LogisticRegression() 33 | classifier.fit(iris.data, iris.target) 34 | 35 | 36 | print("Try going to http://localhost:{}/prediction?sl=5.1&sw=3.5&pl=1.4&pw=0.2".format(port)) 37 | print("Try going to http://localhost:{}/prediction?sl=A&sw=B&pl=C&pw=D".format(port)) 38 | run(host='localhost', port=port) 39 | -------------------------------------------------------------------------------- /Chapter5/cosine.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Bokeh Plot 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
38 | 39 | 40 | 41 | 42 | 45 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /Chapter6/community/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | This package implements community detection. 5 | 6 | Package name is community but refer to python-louvain on pypi 7 | """ 8 | 9 | from .community_louvain import ( 10 | partition_at_level, 11 | modularity, 12 | best_partition, 13 | generate_dendrogram, 14 | induced_graph, 15 | load_binary, 16 | ) 17 | 18 | __version__ = "0.11" 19 | __author__ = """Thomas Aynaud (thomas.aynaud@lip6.fr)""" 20 | # Copyright (C) 2009 by 21 | # Thomas Aynaud 22 | # All rights reserved. 23 | # BSD license. 24 | -------------------------------------------------------------------------------- /Chapter6/community/community_louvain.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | This module implements community detection. 4 | """ 5 | from __future__ import print_function 6 | 7 | import array 8 | import random 9 | 10 | import networkx as nx 11 | 12 | from .community_status import Status 13 | 14 | __author__ = """Thomas Aynaud (thomas.aynaud@lip6.fr)""" 15 | # Copyright (C) 2009 by 16 | # Thomas Aynaud 17 | # All rights reserved. 18 | # BSD license. 19 | 20 | __PASS_MAX = -1 21 | __MIN = 0.0000001 22 | 23 | 24 | def partition_at_level(dendrogram, level): 25 | """Return the partition of the nodes at the given level 26 | 27 | A dendrogram is a tree and each level is a partition of the graph nodes. 28 | Level 0 is the first partition, which contains the smallest communities, 29 | and the best is len(dendrogram) - 1. 30 | The higher the level is, the bigger are the communities 31 | 32 | Parameters 33 | ---------- 34 | dendrogram : list of dict 35 | a list of partitions, ie dictionnaries where keys of the i+1 are the 36 | values of the i. 37 | level : int 38 | the level which belongs to [0..len(dendrogram)-1] 39 | 40 | Returns 41 | ------- 42 | partition : dictionnary 43 | A dictionary where keys are the nodes and the values are the set it 44 | belongs to 45 | 46 | Raises 47 | ------ 48 | KeyError 49 | If the dendrogram is not well formed or the level is too high 50 | 51 | See Also 52 | -------- 53 | best_partition which directly combines partition_at_level and 54 | generate_dendrogram to obtain the partition of highest modularity 55 | 56 | Examples 57 | -------- 58 | >>> G=nx.erdos_renyi_graph(100, 0.01) 59 | >>> dendrogram = generate_dendrogram(G) 60 | >>> for level in range(len(dendrogram) - 1) : 61 | >>> print("partition at level", level, "is", partition_at_level(dendrogram, level)) # NOQA 62 | """ 63 | partition = dendrogram[0].copy() 64 | for index in range(1, level + 1): 65 | for node, community in partition.items(): 66 | partition[node] = dendrogram[index][community] 67 | return partition 68 | 69 | 70 | def modularity(partition, graph, weight='weight'): 71 | """Compute the modularity of a partition of a graph 72 | 73 | Parameters 74 | ---------- 75 | partition : dict 76 | the partition of the nodes, i.e a dictionary where keys are their nodes 77 | and values the communities 78 | graph : networkx.Graph 79 | the networkx graph which is decomposed 80 | weight : str, optional 81 | the key in graph to use as weight. Default to 'weight' 82 | 83 | 84 | Returns 85 | ------- 86 | modularity : float 87 | The modularity 88 | 89 | Raises 90 | ------ 91 | KeyError 92 | If the partition is not a partition of all graph nodes 93 | ValueError 94 | If the graph has no link 95 | TypeError 96 | If graph is not a networkx.Graph 97 | 98 | References 99 | ---------- 100 | .. 1. Newman, M.E.J. & Girvan, M. Finding and evaluating community 101 | structure in networks. Physical Review E 69, 26113(2004). 102 | 103 | Examples 104 | -------- 105 | >>> G=nx.erdos_renyi_graph(100, 0.01) 106 | >>> part = best_partition(G) 107 | >>> modularity(part, G) 108 | """ 109 | if graph.is_directed(): 110 | raise TypeError("Bad graph type, use only non directed graph") 111 | 112 | inc = dict([]) 113 | deg = dict([]) 114 | links = graph.size(weight=weight) 115 | if links == 0: 116 | raise ValueError("A graph without link has an undefined modularity") 117 | 118 | for node in graph: 119 | com = partition[node] 120 | deg[com] = deg.get(com, 0.) + graph.degree(node, weight=weight) 121 | for neighbor, datas in graph[node].items(): 122 | edge_weight = datas.get(weight, 1) 123 | if partition[neighbor] == com: 124 | if neighbor == node: 125 | inc[com] = inc.get(com, 0.) + float(edge_weight) 126 | else: 127 | inc[com] = inc.get(com, 0.) + float(edge_weight) / 2. 128 | 129 | res = 0. 130 | for com in set(partition.values()): 131 | res += (inc.get(com, 0.) / links) - \ 132 | (deg.get(com, 0.) / (2. * links)) ** 2 133 | return res 134 | 135 | 136 | def best_partition(graph, partition=None, 137 | weight='weight', resolution=1., randomize=False): 138 | """Compute the partition of the graph nodes which maximises the modularity 139 | (or try..) using the Louvain heuristices 140 | 141 | This is the partition of highest modularity, i.e. the highest partition 142 | of the dendrogram generated by the Louvain algorithm. 143 | 144 | Parameters 145 | ---------- 146 | graph : networkx.Graph 147 | the networkx graph which is decomposed 148 | partition : dict, optional 149 | the algorithm will start using this partition of the nodes. 150 | It's a dictionary where keys are their nodes and values the communities 151 | weight : str, optional 152 | the key in graph to use as weight. Default to 'weight' 153 | resolution : double, optional 154 | Will change the size of the communities, default to 1. 155 | represents the time described in 156 | "Laplacian Dynamics and Multiscale Modular Structure in Networks", 157 | R. Lambiotte, J.-C. Delvenne, M. Barahona 158 | randomize : boolean, optional 159 | Will randomize the node evaluation order and the community evaluation 160 | order to get different partitions at each call 161 | 162 | Returns 163 | ------- 164 | partition : dictionnary 165 | The partition, with communities numbered from 0 to number of communities 166 | 167 | Raises 168 | ------ 169 | NetworkXError 170 | If the graph is not Eulerian. 171 | 172 | See Also 173 | -------- 174 | generate_dendrogram to obtain all the decompositions levels 175 | 176 | Notes 177 | ----- 178 | Uses Louvain algorithm 179 | 180 | References 181 | ---------- 182 | .. 1. Blondel, V.D. et al. Fast unfolding of communities in 183 | large networks. J. Stat. Mech 10008, 1-12(2008). 184 | 185 | Examples 186 | -------- 187 | >>> #Basic usage 188 | >>> G=nx.erdos_renyi_graph(100, 0.01) 189 | >>> part = best_partition(G) 190 | 191 | >>> #other example to display a graph with its community : 192 | >>> #better with karate_graph() as defined in networkx examples 193 | >>> #erdos renyi don't have true community structure 194 | >>> G = nx.erdos_renyi_graph(30, 0.05) 195 | >>> #first compute the best partition 196 | >>> partition = community.best_partition(G) 197 | >>> #drawing 198 | >>> size = float(len(set(partition.values()))) 199 | >>> pos = nx.spring_layout(G) 200 | >>> count = 0. 201 | >>> for com in set(partition.values()) : 202 | >>> count += 1. 203 | >>> list_nodes = [nodes for nodes in partition.keys() 204 | >>> if partition[nodes] == com] 205 | >>> nx.draw_networkx_nodes(G, pos, list_nodes, node_size = 20, 206 | node_color = str(count / size)) 207 | >>> nx.draw_networkx_edges(G, pos, alpha=0.5) 208 | >>> plt.show() 209 | """ 210 | dendo = generate_dendrogram(graph, 211 | partition, 212 | weight, 213 | resolution, 214 | randomize) 215 | return partition_at_level(dendo, len(dendo) - 1) 216 | 217 | 218 | def generate_dendrogram(graph, 219 | part_init=None, 220 | weight='weight', 221 | resolution=1., 222 | randomize=False): 223 | """Find communities in the graph and return the associated dendrogram 224 | 225 | A dendrogram is a tree and each level is a partition of the graph nodes. 226 | Level 0 is the first partition, which contains the smallest communities, 227 | and the best is len(dendrogram) - 1. The higher the level is, the bigger 228 | are the communities 229 | 230 | 231 | Parameters 232 | ---------- 233 | graph : networkx.Graph 234 | the networkx graph which will be decomposed 235 | part_init : dict, optional 236 | the algorithm will start using this partition of the nodes. It's a 237 | dictionary where keys are their nodes and values the communities 238 | weight : str, optional 239 | the key in graph to use as weight. Default to 'weight' 240 | resolution : double, optional 241 | Will change the size of the communities, default to 1. 242 | represents the time described in 243 | "Laplacian Dynamics and Multiscale Modular Structure in Networks", 244 | R. Lambiotte, J.-C. Delvenne, M. Barahona 245 | 246 | Returns 247 | ------- 248 | dendrogram : list of dictionaries 249 | a list of partitions, ie dictionnaries where keys of the i+1 are the 250 | values of the i. and where keys of the first are the nodes of graph 251 | 252 | Raises 253 | ------ 254 | TypeError 255 | If the graph is not a networkx.Graph 256 | 257 | See Also 258 | -------- 259 | best_partition 260 | 261 | Notes 262 | ----- 263 | Uses Louvain algorithm 264 | 265 | References 266 | ---------- 267 | .. 1. Blondel, V.D. et al. Fast unfolding of communities in large 268 | networks. J. Stat. Mech 10008, 1-12(2008). 269 | 270 | Examples 271 | -------- 272 | >>> G=nx.erdos_renyi_graph(100, 0.01) 273 | >>> dendo = generate_dendrogram(G) 274 | >>> for level in range(len(dendo) - 1) : 275 | >>> print("partition at level", level, 276 | >>> "is", partition_at_level(dendo, level)) 277 | :param weight: 278 | :type weight: 279 | """ 280 | if graph.is_directed(): 281 | raise TypeError("Bad graph type, use only non directed graph") 282 | 283 | # special case, when there is no link 284 | # the best partition is everyone in its community 285 | if graph.number_of_edges() == 0: 286 | part = dict([]) 287 | for node in graph.nodes(): 288 | part[node] = node 289 | return [part] 290 | 291 | current_graph = graph.copy() 292 | status = Status() 293 | status.init(current_graph, weight, part_init) 294 | status_list = list() 295 | __one_level(current_graph, status, weight, resolution, randomize) 296 | new_mod = __modularity(status) 297 | partition = __renumber(status.node2com) 298 | status_list.append(partition) 299 | mod = new_mod 300 | current_graph = induced_graph(partition, current_graph, weight) 301 | status.init(current_graph, weight) 302 | 303 | while True: 304 | __one_level(current_graph, status, weight, resolution, randomize) 305 | new_mod = __modularity(status) 306 | if new_mod - mod < __MIN: 307 | break 308 | partition = __renumber(status.node2com) 309 | status_list.append(partition) 310 | mod = new_mod 311 | current_graph = induced_graph(partition, current_graph, weight) 312 | status.init(current_graph, weight) 313 | return status_list[:] 314 | 315 | 316 | def induced_graph(partition, graph, weight="weight"): 317 | """Produce the graph where nodes are the communities 318 | 319 | there is a link of weight w between communities if the sum of the weights 320 | of the links between their elements is w 321 | 322 | Parameters 323 | ---------- 324 | partition : dict 325 | a dictionary where keys are graph nodes and values the part the node 326 | belongs to 327 | graph : networkx.Graph 328 | the initial graph 329 | weight : str, optional 330 | the key in graph to use as weight. Default to 'weight' 331 | 332 | 333 | Returns 334 | ------- 335 | g : networkx.Graph 336 | a networkx graph where nodes are the parts 337 | 338 | Examples 339 | -------- 340 | >>> n = 5 341 | >>> g = nx.complete_graph(2*n) 342 | >>> part = dict([]) 343 | >>> for node in g.nodes() : 344 | >>> part[node] = node % 2 345 | >>> ind = induced_graph(part, g) 346 | >>> goal = nx.Graph() 347 | >>> goal.add_weighted_edges_from([(0,1,n*n),(0,0,n*(n-1)/2), (1, 1, n*(n-1)/2)]) # NOQA 348 | >>> nx.is_isomorphic(int, goal) 349 | True 350 | """ 351 | ret = nx.Graph() 352 | ret.add_nodes_from(partition.values()) 353 | 354 | for node1, node2, datas in graph.edges(data=True): 355 | edge_weight = datas.get(weight, 1) 356 | com1 = partition[node1] 357 | com2 = partition[node2] 358 | w_prec = ret.get_edge_data(com1, com2, {weight: 0}).get(weight, 1) 359 | ret.add_edge(com1, com2, **{weight: w_prec + edge_weight}) 360 | 361 | return ret 362 | 363 | 364 | def __renumber(dictionary): 365 | """Renumber the values of the dictionary from 0 to n 366 | """ 367 | count = 0 368 | ret = dictionary.copy() 369 | new_values = dict([]) 370 | 371 | for key in dictionary.keys(): 372 | value = dictionary[key] 373 | new_value = new_values.get(value, -1) 374 | if new_value == -1: 375 | new_values[value] = count 376 | new_value = count 377 | count += 1 378 | ret[key] = new_value 379 | 380 | return ret 381 | 382 | 383 | def load_binary(data): 384 | """Load binary graph as used by the cpp implementation of this algorithm 385 | """ 386 | data = open(data, "rb") 387 | 388 | reader = array.array("I") 389 | reader.fromfile(data, 1) 390 | num_nodes = reader.pop() 391 | reader = array.array("I") 392 | reader.fromfile(data, num_nodes) 393 | cum_deg = reader.tolist() 394 | num_links = reader.pop() 395 | reader = array.array("I") 396 | reader.fromfile(data, num_links) 397 | links = reader.tolist() 398 | graph = nx.Graph() 399 | graph.add_nodes_from(range(num_nodes)) 400 | prec_deg = 0 401 | 402 | for index in range(num_nodes): 403 | last_deg = cum_deg[index] 404 | neighbors = links[prec_deg:last_deg] 405 | graph.add_edges_from([(index, int(neigh)) for neigh in neighbors]) 406 | prec_deg = last_deg 407 | 408 | return graph 409 | 410 | 411 | def __randomly(seq, randomize): 412 | """ Convert sequence or iterable to an iterable in random order if 413 | randomize """ 414 | if randomize: 415 | shuffled = list(seq) 416 | random.shuffle(shuffled) 417 | return iter(shuffled) 418 | return seq 419 | 420 | 421 | def __one_level(graph, status, weight_key, resolution, randomize): 422 | """Compute one level of communities 423 | """ 424 | modified = True 425 | nb_pass_done = 0 426 | cur_mod = __modularity(status) 427 | new_mod = cur_mod 428 | 429 | while modified and nb_pass_done != __PASS_MAX: 430 | cur_mod = new_mod 431 | modified = False 432 | nb_pass_done += 1 433 | 434 | for node in __randomly(graph.nodes(), randomize): 435 | com_node = status.node2com[node] 436 | degc_totw = status.gdegrees.get(node, 0.) / (status.total_weight * 2.) # NOQA 437 | neigh_communities = __neighcom(node, graph, status, weight_key) 438 | remove_cost = - resolution * neigh_communities.get(com_node,0) + \ 439 | (status.degrees.get(com_node, 0.) - status.gdegrees.get(node, 0.)) * degc_totw 440 | __remove(node, com_node, 441 | neigh_communities.get(com_node, 0.), status) 442 | best_com = com_node 443 | best_increase = 0 444 | for com, dnc in __randomly(neigh_communities.items(), 445 | randomize): 446 | incr = remove_cost + resolution * dnc - \ 447 | status.degrees.get(com, 0.) * degc_totw 448 | if incr > best_increase: 449 | best_increase = incr 450 | best_com = com 451 | __insert(node, best_com, 452 | neigh_communities.get(best_com, 0.), status) 453 | if best_com != com_node: 454 | modified = True 455 | new_mod = __modularity(status) 456 | if new_mod - cur_mod < __MIN: 457 | break 458 | 459 | 460 | def __neighcom(node, graph, status, weight_key): 461 | """ 462 | Compute the communities in the neighborhood of node in the graph given 463 | with the decomposition node2com 464 | """ 465 | weights = {} 466 | for neighbor, datas in graph[node].items(): 467 | if neighbor != node: 468 | edge_weight = datas.get(weight_key, 1) 469 | neighborcom = status.node2com[neighbor] 470 | weights[neighborcom] = weights.get(neighborcom, 0) + edge_weight 471 | 472 | return weights 473 | 474 | 475 | def __remove(node, com, weight, status): 476 | """ Remove node from community com and modify status""" 477 | status.degrees[com] = (status.degrees.get(com, 0.) 478 | - status.gdegrees.get(node, 0.)) 479 | status.internals[com] = float(status.internals.get(com, 0.) - 480 | weight - status.loops.get(node, 0.)) 481 | status.node2com[node] = -1 482 | 483 | 484 | def __insert(node, com, weight, status): 485 | """ Insert node into community and modify status""" 486 | status.node2com[node] = com 487 | status.degrees[com] = (status.degrees.get(com, 0.) + 488 | status.gdegrees.get(node, 0.)) 489 | status.internals[com] = float(status.internals.get(com, 0.) + 490 | weight + status.loops.get(node, 0.)) 491 | 492 | 493 | def __modularity(status): 494 | """ 495 | Fast compute the modularity of the partition of the graph using 496 | status precomputed 497 | """ 498 | links = float(status.total_weight) 499 | result = 0. 500 | for community in set(status.node2com.values()): 501 | in_degree = status.internals.get(community, 0.) 502 | degree = status.degrees.get(community, 0.) 503 | if links > 0: 504 | result += in_degree / links - ((degree / (2. * links)) ** 2) 505 | return result 506 | -------------------------------------------------------------------------------- /Chapter6/community/community_status.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | 3 | 4 | class Status(object): 5 | """ 6 | To handle several data in one struct. 7 | 8 | Could be replaced by named tuple, but don't want to depend on python 2.6 9 | """ 10 | node2com = {} 11 | total_weight = 0 12 | internals = {} 13 | degrees = {} 14 | gdegrees = {} 15 | 16 | def __init__(self): 17 | self.node2com = dict([]) 18 | self.total_weight = 0 19 | self.degrees = dict([]) 20 | self.gdegrees = dict([]) 21 | self.internals = dict([]) 22 | self.loops = dict([]) 23 | 24 | def __str__(self): 25 | return ("node2com : " + str(self.node2com) + " degrees : " 26 | + str(self.degrees) + " internals : " + str(self.internals) 27 | + " total_weight : " + str(self.total_weight)) 28 | 29 | def copy(self): 30 | """Perform a deep copy of status""" 31 | new_status = Status() 32 | new_status.node2com = self.node2com.copy() 33 | new_status.internals = self.internals.copy() 34 | new_status.degrees = self.degrees.copy() 35 | new_status.gdegrees = self.gdegrees.copy() 36 | new_status.total_weight = self.total_weight 37 | 38 | def init(self, graph, weight, part=None): 39 | """Initialize the status of a graph with every node in one community""" 40 | count = 0 41 | self.node2com = dict([]) 42 | self.total_weight = 0 43 | self.degrees = dict([]) 44 | self.gdegrees = dict([]) 45 | self.internals = dict([]) 46 | self.total_weight = graph.size(weight=weight) 47 | if part is None: 48 | for node in graph.nodes(): 49 | self.node2com[node] = count 50 | deg = float(graph.degree(node, weight=weight)) 51 | if deg < 0: 52 | error = "Bad node degree ({})".format(deg) 53 | raise ValueError(error) 54 | self.degrees[count] = deg 55 | self.gdegrees[node] = deg 56 | edge_data = graph.get_edge_data(node, node, default={weight: 0}) 57 | self.loops[node] = float(edge_data.get(weight, 1)) 58 | self.internals[count] = self.loops[node] 59 | count += 1 60 | else: 61 | for node in graph.nodes(): 62 | com = part[node] 63 | self.node2com[node] = com 64 | deg = float(graph.degree(node, weight=weight)) 65 | self.degrees[com] = self.degrees.get(com, 0) + deg 66 | self.gdegrees[node] = deg 67 | inc = 0. 68 | for neighbor, datas in graph[node].items(): 69 | edge_weight = datas.get(weight, 1) 70 | if edge_weight <= 0: 71 | error = "Bad graph type ({})".format(type(graph)) 72 | raise ValueError(error) 73 | if part[neighbor] == com: 74 | if neighbor == node: 75 | inc += float(edge_weight) 76 | else: 77 | inc += float(edge_weight) / 2. 78 | self.internals[com] = self.internals.get(com, 0) + inc 79 | -------------------------------------------------------------------------------- /Chapter6/dumped_graph.gml: -------------------------------------------------------------------------------- 1 | graph [ 2 | name "Krackhardt Kite Social Network" 3 | node [ 4 | id 0 5 | label "0" 6 | ] 7 | node [ 8 | id 1 9 | label "1" 10 | ] 11 | node [ 12 | id 2 13 | label "2" 14 | ] 15 | node [ 16 | id 3 17 | label "3" 18 | ] 19 | node [ 20 | id 4 21 | label "4" 22 | ] 23 | node [ 24 | id 5 25 | label "5" 26 | ] 27 | node [ 28 | id 6 29 | label "6" 30 | ] 31 | node [ 32 | id 7 33 | label "7" 34 | ] 35 | node [ 36 | id 8 37 | label "8" 38 | ] 39 | node [ 40 | id 9 41 | label "9" 42 | ] 43 | edge [ 44 | source 0 45 | target 1 46 | ] 47 | edge [ 48 | source 0 49 | target 2 50 | ] 51 | edge [ 52 | source 0 53 | target 3 54 | ] 55 | edge [ 56 | source 0 57 | target 5 58 | ] 59 | edge [ 60 | source 1 61 | target 3 62 | ] 63 | edge [ 64 | source 1 65 | target 4 66 | ] 67 | edge [ 68 | source 1 69 | target 6 70 | ] 71 | edge [ 72 | source 2 73 | target 3 74 | ] 75 | edge [ 76 | source 2 77 | target 5 78 | ] 79 | edge [ 80 | source 3 81 | target 4 82 | ] 83 | edge [ 84 | source 3 85 | target 5 86 | ] 87 | edge [ 88 | source 3 89 | target 6 90 | ] 91 | edge [ 92 | source 4 93 | target 6 94 | ] 95 | edge [ 96 | source 5 97 | target 6 98 | ] 99 | edge [ 100 | source 5 101 | target 7 102 | ] 103 | edge [ 104 | source 6 105 | target 7 106 | ] 107 | edge [ 108 | source 7 109 | target 8 110 | ] 111 | edge [ 112 | source 8 113 | target 9 114 | ] 115 | ] 116 | -------------------------------------------------------------------------------- /Chapter6/snowball_sampling.py: -------------------------------------------------------------------------------- 1 | import networkx as nx 2 | 3 | def get_json_name(graph, name): 4 | """ 5 | Download the LiveJournal page of name, and adds the related links to the graph 6 | Note: this function modifies the graph! 7 | """ 8 | try: 9 | import urllib.request as urllib2 10 | except ImportError: 11 | import urllib2 12 | 13 | response = urllib2.urlopen('http://www.livejournal.com/misc/fdata.bml?user=' + name) 14 | valid_lines = [line for line in response.read().splitlines() if (len(line) > 0 and not line.startswith(b'#'))] 15 | for line in valid_lines: 16 | chunks = line.decode('utf8').split(" ") 17 | if chunks[0] == ">": 18 | graph.add_edge(name, chunks[1]) 19 | else: 20 | graph.add_edge(chunks[1], name) 21 | return 22 | 23 | 24 | def snowball_sampling(graph, max_depth, central_name, sampling_rate=1.0): 25 | """ 26 | Recursively add nodes, one depth at the time, till max_depth is reached 27 | Note: this function modifies the graph! 28 | """ 29 | import random 30 | 31 | graph.add_node(central_name) 32 | 33 | for depth in range(max_depth): 34 | print ("Reching depth", depth) 35 | nodes_that_depth = [node for node in graph.nodes() if 36 | nx.shortest_path_length(graph, source=central_name, target=node) == depth] 37 | print (" new nodes to investigate:", nodes_that_depth) 38 | 39 | for node in nodes_that_depth: 40 | 41 | if len(nodes_that_depth) == 1: 42 | get_json_name(graph, node) 43 | 44 | elif random.random() <= sampling_rate: 45 | get_json_name(graph, node) 46 | 47 | else: 48 | # Sampling stops here 49 | pass 50 | 51 | 52 | if __name__ == "__main__": 53 | import matplotlib.pyplot as plt 54 | 55 | G = nx.Graph() 56 | snowball_sampling(G, 2, 'alberto') 57 | nx.draw(G) 58 | plt.show() -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Packt 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## $5 Tech Unlocked 2021! 2 | [Buy and download this product for only $5 on PacktPub.com](https://www.packtpub.com/) 3 | ----- 4 | *The $5 campaign runs from __December 15th 2020__ to __January 13th 2021.__* 5 | 6 | # Python Data Science Essentials - Third Edition 7 | 8 | Python Data Science Essentials - Third Edition 9 | 10 | This is the code repository for [Python Data Science Essentials - Third Edition](https://www.packtpub.com/big-data-and-business-intelligence/python-data-science-essentials-third-edition?utm_source=github&utm_medium=repository&utm_campaign=9781789537864 ), published by Packt. 11 | 12 | **A practitioner’s guide covering essential data science principles, tools, and techniques** 13 | 14 | ## What is this book about? 15 | Fully expanded and upgraded, the latest edition of Python Data Science Essentials will help you succeed in data science operations using the most common Python libraries. This book offers up-to-date insight into the core of Python, including the latest versions of the Jupyter Notebook, NumPy, pandas, and scikit-learn. 16 | 17 | This book covers the following exciting features: 18 | Set up your data science toolbox on Windows, Mac, and Linux 19 | Use the core machine learning methods offered by the scikit-learn library 20 | Manipulate, fix, and explore data to solve data science problems 21 | Learn advanced explorative and manipulative techniques to solve data operations 22 | Optimize your machine learning models for optimized performance 23 | Explore and cluster graphs, taking advantage of interconnections and links in your data 24 | 25 | If you feel this book is for you, get your [copy](https://www.amazon.com/dp/178953786X) today! 26 | 27 | https://www.packtpub.com/ 29 | 30 | ## Instructions and Navigations 31 | All of the code is organized into folders. For example, Chapter02. 32 | 33 | The code will look like the following: 34 | ``` 35 | In: G.add_edge(3,4) 36 | G.add_edges_from([(2, 3), (4, 1)]) 37 | nx.draw_networkx(G) 38 | plt.show() 39 | ``` 40 | 41 | **Following is what you need for this book:** 42 | If you’re a data science entrant, data analyst, or data engineer, this book will help you get ready to tackle real-world data science problems without wasting any time. Basic knowledge of probability/statistics and Python coding experience will assist you in understanding the concepts covered in this book. 43 | 44 | With the following software and hardware list you can run all code files present in the book (Chapter 1-8). 45 | ### Software and Hardware List 46 | | Chapter | Software required | OS required | 47 | | -------- | ------------------------------------ | ----------------------------------- | 48 | | 1-8 | Jupyter Notebook | Windows, Mac OS X, and Linux (Any) | 49 | 50 | 51 | We also provide a PDF file that has color images of the screenshots/diagrams used in this book. [Click here to download it](http://www.packtpub.com/sites/default/files/downloads/9781789537864_ColorImages.pdf). 52 | 53 | ### Related products 54 | * Practical Data Science Cookbook - Second Edition [[Packt]](https://www.packtpub.com/big-data-and-business-intelligence/practical-data-science-cookbook-second-edition?utm_source=github&utm_medium=repository&utm_campaign=9781787129627 ) [[Amazon]](https://www.amazon.com/dp/1787129624) 55 | 56 | * Python Machine Learning By Example [[Packt]](https://www.packtpub.com/big-data-and-business-intelligence/python-machine-learning-example?utm_source=github&utm_medium=repository&utm_campaign=) [[Amazon]](https://www.amazon.com/dp/1783553111) 57 | 58 | 59 | ## Get to Know the Authors 60 | **Alberto Boschetti** 61 | Alberto Boschetti is a data scientist with expertise in signal processing and statistics. He holds a Ph.D. in telecommunication engineering and currently lives and works in London. In his work projects, he faces challenges ranging from natural language processing (NLP) and behavioral analysis to machine learning and distributed processing. He is very passionate about his job and always tries to stay updated about the latest developments in data science technologies, attending meet-ups, conferences, and other events. 62 | 63 | **Luca Massaron** 64 | Luca Massaron is a data scientist and marketing research director specialized in multivariate statistical analysis, machine learning, and customer insight, with over a decade of experience of solving real-world problems and generating value for stakeholders by applying reasoning, statistics, data mining, and algorithms. From being a pioneer of web audience analysis in Italy to achieving the rank of a top-10 Kaggler, he has always been very passionate about every aspect of data and its analysis, and also about demonstrating the potential of data-driven knowledge discovery to both experts and non-experts. Favoring simplicity over unnecessary sophistication, Luca believes that a lot can be achieved in data science just by doing the essentials. 65 | 66 | 67 | ## Other books by the authors 68 | [](https://www.packtpub.com/big-data-and-business-intelligence/python-data-science-essentials?utm_source=github&utm_medium=repository&utm_campaign=) 69 | 70 | [](https://www.packtpub.com/big-data-and-business-intelligence/regression-analysis-python?utm_source=github&utm_medium=repository&utm_campaign=) 71 | 72 | [](https://www.packtpub.com/big-data-and-business-intelligence/large-scale-machine-learning-python?utm_source=github&utm_medium=repository&utm_campaign=) 73 | 74 | [Python Data Science Essentials - Second Edition](https://www.packtpub.com/big-data-and-business-intelligence/python-data-science-essentials-second-edition?utm_source=github&utm_medium=repository&utm_campaign=9781786462138 ) 75 | 76 | [Python: Real World Machine Learning](https://www.packtpub.com/big-data-and-business-intelligence/python-real-world-machine-learning?utm_source=github&utm_medium=repository&utm_campaign=9781787123212 ) 77 | 78 | ### Suggestions and Feedback 79 | [Click here](https://docs.google.com/forms/d/e/1FAIpQLSdy7dATC6QmEL81FIUuymZ0Wy9vH1jHkvpY57OiMeKGqib_Ow/viewform) if you have any feedback or suggestions. 80 | 81 | 82 | --------------------------------------------------------------------------------