├── README.md ├── .gitignore ├── Data ├── recommend_1.csv └── recommend_2.csv └── DS_recommender_exercise_A.ipynb /README.md: -------------------------------------------------------------------------------- 1 | # Formation Take Home exercise 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # IPython 81 | profile_default/ 82 | ipython_config.py 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # pipenv 88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 91 | # install all needed dependencies. 92 | #Pipfile.lock 93 | 94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 95 | __pypackages__/ 96 | 97 | # Celery stuff 98 | celerybeat-schedule 99 | celerybeat.pid 100 | 101 | # SageMath parsed files 102 | *.sage.py 103 | 104 | # Environments 105 | .env 106 | .venv 107 | env/ 108 | venv/ 109 | ENV/ 110 | env.bak/ 111 | venv.bak/ 112 | 113 | # Spyder project settings 114 | .spyderproject 115 | .spyproject 116 | 117 | # Rope project settings 118 | .ropeproject 119 | 120 | # mkdocs documentation 121 | /site 122 | 123 | # mypy 124 | .mypy_cache/ 125 | .dmypy.json 126 | dmypy.json 127 | 128 | # Pyre type checker 129 | .pyre/ 130 | -------------------------------------------------------------------------------- /Data/recommend_1.csv: -------------------------------------------------------------------------------- 1 | customerId 2 | 1553 3 | 20400 4 | 19750 5 | 6334 6 | 27773 7 | 20027 8 | 10104 9 | 5522 10 | 9978 11 | 20966 12 | 218 13 | 9023 14 | 22253 15 | 1705 16 | 10526 17 | 13702 18 | 18388 19 | 6591 20 | 821 21 | 15830 22 | 18056 23 | 13225 24 | 4871 25 | 16104 26 | 5365 27 | 7180 28 | 7096 29 | 21259 30 | 14082 31 | 14748 32 | 26434 33 | 12641 34 | 14102 35 | 18038 36 | 4175 37 | 18051 38 | 15867 39 | 1043 40 | 11837 41 | 2831 42 | 19026 43 | 6769 44 | 23105 45 | 8475 46 | 19762 47 | 13658 48 | 9806 49 | 4618 50 | 5648 51 | 4659 52 | 15831 53 | 9796 54 | 14723 55 | 18268 56 | 23277 57 | 17031 58 | 12535 59 | 13529 60 | 13433 61 | 539 62 | 26263 63 | 23162 64 | 21386 65 | 9961 66 | 8931 67 | 15567 68 | 26760 69 | 15913 70 | 9954 71 | 1127 72 | 122 73 | 2396 74 | 8865 75 | 7274 76 | 22303 77 | 11167 78 | 12750 79 | 16450 80 | 7650 81 | 15309 82 | 6455 83 | 27097 84 | 7118 85 | 21658 86 | 22172 87 | 1037 88 | 2478 89 | 11468 90 | 5684 91 | 10550 92 | 28099 93 | 5095 94 | 15398 95 | 25235 96 | 24909 97 | 22608 98 | 12532 99 | 20624 100 | 21949 101 | 18445 102 | 4152 103 | 3223 104 | 22559 105 | 4 106 | 6182 107 | 3240 108 | 15786 109 | 27647 110 | 20961 111 | 7551 112 | 5562 113 | 1412 114 | 15358 115 | 6680 116 | 25644 117 | 25532 118 | 15012 119 | 10820 120 | 12142 121 | 22182 122 | 19554 123 | 1851 124 | 13114 125 | 6344 126 | 16605 127 | 7326 128 | 26978 129 | 19298 130 | 13821 131 | 12735 132 | 14483 133 | 11523 134 | 7919 135 | 9398 136 | 9173 137 | 16005 138 | 1653 139 | 7153 140 | 1783 141 | 261 142 | 11330 143 | 6803 144 | 3171 145 | 2892 146 | 4717 147 | 2815 148 | 1090 149 | 3773 150 | 7443 151 | 1111 152 | 16143 153 | 10923 154 | 14443 155 | 1042 156 | 4527 157 | 1073 158 | 4613 159 | 14032 160 | 5430 161 | 2202 162 | 4405 163 | 2417 164 | 20858 165 | 7510 166 | 3593 167 | 9960 168 | 8734 169 | 25294 170 | 6646 171 | 4524 172 | 19004 173 | 263 174 | 320 175 | 16393 176 | 6326 177 | 11321 178 | 8844 179 | 7625 180 | 9646 181 | 6166 182 | 2052 183 | 2626 184 | 9889 185 | 16409 186 | 7005 187 | 13181 188 | 4442 189 | 7846 190 | 19221 191 | 9155 192 | 4070 193 | 1416 194 | 22687 195 | 14865 196 | 4087 197 | 17361 198 | 250 199 | 6799 200 | 19910 201 | 8230 202 | 26590 203 | 6777 204 | 26618 205 | 27551 206 | 10018 207 | 862 208 | 3984 209 | 5368 210 | 6294 211 | 4407 212 | 15192 213 | 806 214 | 5193 215 | 3300 216 | 2615 217 | 1156 218 | 23067 219 | 21941 220 | 17446 221 | 3651 222 | 11570 223 | 10871 224 | 22136 225 | 5264 226 | 7755 227 | 7228 228 | 3257 229 | 13895 230 | 7011 231 | 28015 232 | 25122 233 | 22428 234 | 19340 235 | 11119 236 | 12521 237 | 10838 238 | 12578 239 | 7394 240 | 12724 241 | 21818 242 | 28398 243 | 4476 244 | 6443 245 | 7722 246 | 9873 247 | 595 248 | 7299 249 | 171 250 | 1380 251 | 6032 252 | 10921 253 | 1267 254 | 305 255 | 7368 256 | 13874 257 | 6030 258 | 18003 259 | 7175 260 | 2654 261 | 1342 262 | 2670 263 | 10209 264 | 13039 265 | 14857 266 | 3045 267 | 4757 268 | 6560 269 | 16285 270 | 14986 271 | 27925 272 | 2724 273 | 11122 274 | 2833 275 | 4118 276 | 16990 277 | 1583 278 | 10269 279 | 12788 280 | 17248 281 | 7065 282 | 15008 283 | 2043 284 | 16616 285 | 3891 286 | 22882 287 | 9852 288 | 6977 289 | 12867 290 | 24556 291 | 13962 292 | 6795 293 | 10884 294 | 123 295 | 7855 296 | 15713 297 | 5461 298 | 27386 299 | 450 300 | 15042 301 | 24405 302 | 3716 303 | 15175 304 | 5065 305 | 863 306 | 15810 307 | 2403 308 | 24610 309 | 14136 310 | 21129 311 | 11096 312 | 24650 313 | 14162 314 | 13487 315 | 27325 316 | 7412 317 | 19093 318 | 9552 319 | 8738 320 | 19417 321 | 3230 322 | 4851 323 | 8907 324 | 3431 325 | 6655 326 | 3018 327 | 23695 328 | 25377 329 | 14110 330 | 6997 331 | 8423 332 | 182 333 | 19919 334 | 14116 335 | 14888 336 | 6010 337 | 866 338 | 462 339 | 15406 340 | 20836 341 | 12590 342 | 9284 343 | 7515 344 | 1870 345 | 3800 346 | 8609 347 | 27803 348 | 13943 349 | 11528 350 | 25656 351 | 1586 352 | 1347 353 | 6851 354 | 12952 355 | 16093 356 | 11995 357 | 706 358 | 18129 359 | 8817 360 | 884 361 | 8808 362 | 19141 363 | 27771 364 | 23038 365 | 3399 366 | 27237 367 | 10754 368 | 14601 369 | 20125 370 | 4418 371 | 6782 372 | 212 373 | 11281 374 | 23058 375 | 26646 376 | 1137 377 | 20137 378 | 20085 379 | 837 380 | 7714 381 | 6145 382 | 26123 383 | 20032 384 | 447 385 | 11013 386 | 14010 387 | 321 388 | 3797 389 | 3699 390 | 12321 391 | 23769 392 | 6132 393 | 19603 394 | 23691 395 | 2479 396 | 8627 397 | 25004 398 | 7062 399 | 12371 400 | 2285 401 | 21345 402 | 9733 403 | 482 404 | 4271 405 | 27459 406 | 2536 407 | 1743 408 | 8111 409 | 23035 410 | 13600 411 | 11350 412 | 3020 413 | 24300 414 | 9524 415 | 16304 416 | 5418 417 | 12464 418 | 9282 419 | 8046 420 | 27585 421 | 14294 422 | 7601 423 | 6346 424 | 3762 425 | 6323 426 | 5957 427 | 3557 428 | 9565 429 | 16879 430 | 20061 431 | 17959 432 | 14147 433 | 1286 434 | 16129 435 | 18983 436 | 7513 437 | 5891 438 | 20785 439 | 16281 440 | 15436 441 | 12221 442 | 861 443 | 13373 444 | 5501 445 | 858 446 | 418 447 | 9665 448 | 6730 449 | 731 450 | 13569 451 | 20539 452 | 3775 453 | 659 454 | 1916 455 | 1223 456 | 2279 457 | 27202 458 | 20883 459 | 12553 460 | 8272 461 | 2265 462 | 9949 463 | 24210 464 | 7569 465 | 19278 466 | 5361 467 | 17228 468 | 16937 469 | 1245 470 | 16583 471 | 3731 472 | 12278 473 | 22273 474 | 22487 475 | 5751 476 | 3386 477 | 11679 478 | 14934 479 | 2842 480 | 1139 481 | 17991 482 | 27547 483 | 22844 484 | 22536 485 | 16443 486 | 946 487 | 27241 488 | 4449 489 | 1149 490 | 17159 491 | 21934 492 | 14784 493 | 2624 494 | 15223 495 | 12122 496 | 22734 497 | 13680 498 | 788 499 | 17738 500 | 22930 501 | 5774 502 | 6337 503 | 16004 504 | 28034 505 | 6297 506 | 15833 507 | 661 508 | 14889 509 | 1290 510 | 18573 511 | 11392 512 | 1425 513 | 27872 514 | 5242 515 | 6774 516 | 4269 517 | 15851 518 | 13945 519 | 12836 520 | 17472 521 | 2409 522 | 1911 523 | 14744 524 | 3369 525 | 21228 526 | 11830 527 | 12768 528 | 10688 529 | 5092 530 | 4799 531 | 20208 532 | 21852 533 | 14626 534 | 7522 535 | 9239 536 | 3978 537 | 28168 538 | 8222 539 | 368 540 | 459 541 | 19541 542 | 137 543 | 14687 544 | 3444 545 | 9878 546 | 26116 547 | 15208 548 | 21 549 | 14310 550 | 548 551 | 10410 552 | 28577 553 | 677 554 | 9711 555 | 13685 556 | 9166 557 | 13800 558 | 27372 559 | 17123 560 | 7777 561 | 6427 562 | 10544 563 | 17611 564 | 141 565 | 2770 566 | 7106 567 | 8157 568 | 2978 569 | 10222 570 | 21219 571 | 4233 572 | 13289 573 | 2581 574 | 17049 575 | 13336 576 | 3549 577 | 9831 578 | 11081 579 | 3272 580 | 20724 581 | 24243 582 | 10850 583 | 4516 584 | 6657 585 | 7455 586 | 18401 587 | 6961 588 | 11015 589 | 13291 590 | 4950 591 | 3348 592 | 17120 593 | 23312 594 | 5022 595 | 27677 596 | 11985 597 | 18586 598 | 16000 599 | 708 600 | 20731 601 | 16721 602 | 5940 603 | 4392 604 | 690 605 | 7454 606 | 18267 607 | 12096 608 | 5926 609 | 13980 610 | 3003 611 | 8437 612 | 28042 613 | 12894 614 | 24751 615 | 10159 616 | 4537 617 | 6430 618 | 20654 619 | 9576 620 | 28481 621 | 15427 622 | 5512 623 | 2579 624 | 2315 625 | 9584 626 | 20931 627 | 7041 628 | 625 629 | 11459 630 | 5581 631 | 13992 632 | 1057 633 | 14669 634 | 11591 635 | 9668 636 | 9578 637 | 13267 638 | 6834 639 | 26686 640 | 7657 641 | 19091 642 | 26396 643 | 9612 644 | 18237 645 | 1175 646 | 21615 647 | 18353 648 | 1182 649 | 27601 650 | 9472 651 | 12458 652 | 8330 653 | 7133 654 | 5127 655 | 543 656 | 9648 657 | 23486 658 | 1504 659 | 24428 660 | 2977 661 | 13282 662 | 13167 663 | 7259 664 | 2062 665 | 6917 666 | 21902 667 | 18530 668 | 15720 669 | 13906 670 | 8838 671 | 18218 672 | 9501 673 | 5220 674 | 16509 675 | 9974 676 | 21038 677 | 8346 678 | 12253 679 | 13249 680 | 8877 681 | 13132 682 | 2087 683 | 5347 684 | 5001 685 | 24976 686 | 28462 687 | 17547 688 | 26573 689 | 12577 690 | 4671 691 | 14151 692 | 18458 693 | 3709 694 | 6701 695 | 1093 696 | 10545 697 | 17808 698 | 18585 699 | 4823 700 | 27506 701 | 2278 702 | 7207 703 | 14929 704 | 572 705 | 10444 706 | 5527 707 | 16608 708 | 8947 709 | 13198 710 | 3865 711 | 1455 712 | 4339 713 | 10951 714 | 7282 715 | 16107 716 | 26306 717 | 17367 718 | 5513 719 | 16358 720 | 7828 721 | 4589 722 | 23425 723 | 4800 724 | 11 725 | 23669 726 | 4608 727 | 3769 728 | 1475 729 | 11134 730 | 19993 731 | 2531 732 | 24103 733 | 18743 734 | 14741 735 | 247 736 | 17546 737 | 22877 738 | 6829 739 | 6345 740 | 25155 741 | 667 742 | 1085 743 | 2008 744 | 15348 745 | 1559 746 | 21120 747 | 8207 748 | 15206 749 | 326 750 | 2283 751 | 6394 752 | 15636 753 | 13711 754 | 13218 755 | 2430 756 | 19390 757 | 3115 758 | 3768 759 | 2347 760 | 4848 761 | 1768 762 | 8164 763 | 16023 764 | 23646 765 | 23318 766 | 9404 767 | 22564 768 | 10973 769 | 9449 770 | 15790 771 | 10656 772 | 26545 773 | 2414 774 | 3087 775 | 4776 776 | 7997 777 | 2143 778 | 1178 779 | 23247 780 | 10975 781 | 2914 782 | 10748 783 | 19085 784 | 3341 785 | 6258 786 | 6577 787 | 7034 788 | 1730 789 | 22872 790 | 2819 791 | 16757 792 | 10844 793 | 3645 794 | 10663 795 | 5666 796 | 28253 797 | 2865 798 | 20382 799 | 1668 800 | 14673 801 | 7981 802 | 8291 803 | 4564 804 | 11744 805 | 3843 806 | 16855 807 | 14247 808 | 26778 809 | 22126 810 | 3196 811 | 23551 812 | 665 813 | 10268 814 | 22069 815 | 3609 816 | 11555 817 | 6158 818 | 16545 819 | 7706 820 | 2590 821 | 11397 822 | 152 823 | 11500 824 | 8339 825 | 12525 826 | 16672 827 | 8619 828 | 6220 829 | 20645 830 | 21084 831 | 10382 832 | 11215 833 | 20190 834 | 21847 835 | 2232 836 | 14815 837 | 22386 838 | 14428 839 | 11433 840 | 18165 841 | 12432 842 | 17988 843 | 14697 844 | 11489 845 | 5200 846 | 6827 847 | 164 848 | 8540 849 | 3026 850 | 14544 851 | 28210 852 | 16755 853 | 12051 854 | 11932 855 | 12422 856 | 16883 857 | 13647 858 | 6385 859 | 15062 860 | 9545 861 | 18000 862 | 5118 863 | 6649 864 | 24413 865 | 24358 866 | 16723 867 | 14881 868 | 8108 869 | 3899 870 | 14902 871 | 12 872 | 12683 873 | 2029 874 | 16020 875 | 16819 876 | 18313 877 | 6967 878 | 7731 879 | 3851 880 | 25426 881 | 7951 882 | 7786 883 | 13204 884 | 18979 885 | 594 886 | 14109 887 | 15014 888 | 14671 889 | 23803 890 | 5113 891 | 9557 892 | 5459 893 | 19254 894 | 3879 895 | 20179 896 | 18032 897 | 9405 898 | 15287 899 | 14531 900 | 4657 901 | 1130 902 | 8323 903 | 2993 904 | 8047 905 | 9051 906 | 25146 907 | 12448 908 | 18978 909 | 1695 910 | 2466 911 | 18155 912 | 4007 913 | 16038 914 | 9720 915 | 718 916 | 5570 917 | 24187 918 | 21318 919 | 8099 920 | 10500 921 | 2410 922 | 10710 923 | 7505 924 | 26323 925 | 17006 926 | 16 927 | 22077 928 | 745 929 | 5273 930 | 19124 931 | 7286 932 | 1434 933 | 19373 934 | 12225 935 | 10016 936 | 6016 937 | 5524 938 | 22801 939 | 17210 940 | 11102 941 | 13764 942 | 5199 943 | 11899 944 | 11379 945 | 15219 946 | 1619 947 | 6395 948 | 25758 949 | 6787 950 | 8112 951 | 10285 952 | 7988 953 | 6665 954 | 32 955 | 7869 956 | 1387 957 | 20246 958 | 339 959 | 1143 960 | 1757 961 | 25739 962 | 13151 963 | 24147 964 | 9194 965 | 5555 966 | 23734 967 | 19310 968 | 6878 969 | 3955 970 | 8512 971 | 10948 972 | 6269 973 | 12286 974 | 13970 975 | 27107 976 | 19123 977 | 2715 978 | 121 979 | 654 980 | 255 981 | 2878 982 | 25800 983 | 14605 984 | 1270 985 | 6884 986 | 1939 987 | 17711 988 | 22911 989 | 6313 990 | 6167 991 | 20821 992 | 21743 993 | 3012 994 | 8296 995 | 2388 996 | 1091 997 | 15273 998 | 6975 999 | 16359 1000 | 1981 1001 | 4207 1002 | -------------------------------------------------------------------------------- /DS_recommender_exercise_A.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Data science candidate exercise\n", 8 | "\n", 9 | "Thank you for working on the Formation Data Science Exercise! The purpose of this exercise is to allow you to showcase your Data Science skill set in the following areas:\n", 10 | " * Transforming data\n", 11 | " * Training and tuning of model parameters\n", 12 | " * Evaluation of model performance and selecting the optimal model \n", 13 | " \n", 14 | "In addition to these areas, we’re interested in seeing how you utilize code to explore a new data set to both explore data and model performance and develop/implement models in our code base. \n", 15 | "\n", 16 | "\n", 17 | "As you work on the exercise, keep in mind that we value reusable code that your teammates can jump into quickly, so please be sure to comment frequently, and let us know which portions of your code you would use for more formal development to showcase your skills in coding style best practices.\n", 18 | "\n", 19 | "We also encourage you to use markdown cells to explain your thought process and observations as you move through the exercise. Feel free to use the software and toolbox of your own preference. \n", 20 | "\n", 21 | "\n", 22 | "### Timing and Questions\n", 23 | "We understand that your time is valuable, while you are welcome to spend as much time as you desire on the exercise, please do not feel obligated to spend more than 2-4 hours.\n", 24 | " \n", 25 | "* Questions are encouraged:\n", 26 | " * Please feel welcome to contact your Formation recruiter with any questions you might have for Formation that may help clarify what is expected, or you have questions about the data or other items for our data science team." 27 | ] 28 | }, 29 | { 30 | "cell_type": "markdown", 31 | "metadata": {}, 32 | "source": [ 33 | "# Problem Statement\n", 34 | "\n", 35 | "In this exercise, we would like to build collaborative filtering models for recommending product items. Imagine a fast food chain releases a new mobile app allowing its customers to place orders before they even have to walk into the store. There are several opportunities for the app to show recommendations: When a customer first tap on the \"order\" page, we may recommend the first item to be added to the basket (e.g. a burger). After that, items good for pairing with the existing basket could be recommended. For example, if there is a burger already in the order basket, the app may want to recommend fries and/or drinks, rather than recommending another burger.\n", 36 | "\n", 37 | "\n", 38 | "## Input data\n", 39 | "We provide the artificial transaction history data in `trx_data.csv`. Each row represents a past order. It has two columns - customerId and products (separated by \",\"). The products column contains 1 to 10 product ID(s) of those being purchased, separated by \"|\".\n", 40 | "\n", 41 | "Here is an example of the transaction records. You can find customer 0 purchased 1 item in the first log entery, and customer 1 purchased 10 items in the second log entery (some are duplicated).\n", 42 | "\n", 43 | "`customerId,products\n", 44 | "0,20\n", 45 | "1,2|2|23|68|68|111|29|86|107|152\n", 46 | "2,111|107|29|11|11|11|33|23\n", 47 | "1,164|227\n", 48 | "3,2|2\n", 49 | "6,144|144|55|267\n", 50 | "7,136|204|261\n", 51 | "3,79|8|8|48\n", 52 | "9,102|2|2|297\n", 53 | "10,84|77|286|259\n", 54 | "11,25|127|127\n", 55 | "0,18|183|288|171|289\n", 56 | "11,79|8|8|38\n", 57 | "1,2|2|20|20|20\n", 58 | "7,251|143\n", 59 | "`\n", 60 | "\n", 61 | "***Things to be aware of about the data.***\n", 62 | "* The `trx_data.csv` is a log of user purcases, so:\n", 63 | " * Users might be found on multiple lines in the csv with different basket items attached.\n", 64 | " * The products \"basket\" is not listed in any particular order.\n", 65 | " * For example the following data points can be considered as equivelent\n", 66 | " * `6,144|144|55|267` \n", 67 | " * `6,267|144|55|144`\n", 68 | " * **However** the order of the basket logs is temporal, so in the above example log:\n", 69 | " * `1,2|2|23|68|68|111|29|86|107|152` was a basket of earlier purchases by user `1` than\n", 70 | " * `1,164|227`\n", 71 | " \n", 72 | "\n", 73 | "## Models\n", 74 | "A collaborative filtering model can be built once given a user-item matrix with ratings. \n", 75 | "For this exercise, we ask you to build **ONE** of the following two recommender models. \n", 76 | "\n", 77 | "### Option 1:\n", 78 | "* Build a Model that recommends to the user the \"first item\" they may want to place into their \"basket\"\n", 79 | " * Input: user - customer ID\n", 80 | " * Returns: ranked list of items (product IDs), that the user is most likely to want to put in his/her (empty) \"basket\"\n", 81 | "\n", 82 | "### Option 2:\n", 83 | "* Build a Model for the recommending a \"second item\" after the first item has already been added to the basket.\n", 84 | " * Input: (user - customer ID, item - product ID)\n", 85 | " * Returns: ranked list of items (product IDs), that the user is most likely to want to put in his/her (empty) \"basket\"\n", 86 | "\n", 87 | "\n", 88 | "\n", 89 | "\n", 90 | "## Tasks\n", 91 | "\n", 92 | "Some of the things we will be looking at as we review your submission include:\n", 93 | "\n", 94 | "### 1. Data transformation\n", 95 | "How are you converting the raw data as you prepare a model? Please feel welcome to define and transform the ratings in the way you think would be optimal for generating the best possible product recommendations.\n", 96 | "\n", 97 | "### 2. Model selection and development\n", 98 | "What algorithms did you consider using in order to develop the collaborative filtering model? Why did you end up selecting the algorithm you ended up using. How did you end up implementing the selected model?\n", 99 | "\n", 100 | "### 3. Validate and evaluate the model performance\n", 101 | "During the training process, what steps did you use for validating and evaluating the model?\n", 102 | "* What holdout practices did you use?\n", 103 | "* What performance metrics did you for validation and testing?\n", 104 | "* How did you choose to present your results?\n", 105 | "* What actions did you take or improvements did you make based on your results?\n", 106 | "\n", 107 | "### 4. Apply model to test datasets\n", 108 | "##### Option 1 Model\n", 109 | "In `recommend_1.csv`, we provide a list of customer IDs. If you select option 1, use this data to generate a csv file that indicates top 10 recommendations for each of the customers. Note the order of the recommended products should be ordered by user preference, with the most preferred item in the beginning.\n", 110 | "\n", 111 | "Sample output:\n", 112 | "\n", 113 | "`customerId, recommendedProducts\n", 114 | "1,0|1|2|3|4|5|6|7|8|9\n", 115 | "2,8|3|1|2|4|7|9|10|11|13\n", 116 | "3,20|21|22|23|24|25|26|27|28|29\n", 117 | "...\n", 118 | "`\n", 119 | "\n", 120 | "##### Option 2 Model\n", 121 | "In recommend_2.csv, we provide a list of customer IDs and their first basket item. If you select option 2, use this data to generate a csv file that indicates top 10 pairing recommendations for each of the customer-basket combinations. Note the order of the recommended products should be ordered by user preference, with the most preferred item in the beginning.\n", 122 | "\n", 123 | "Sample output:\n", 124 | "\n", 125 | "`customerId, itemId, recommendedProducts\n", 126 | "1,0,1|2|3|4|5|6|7|8|9|10\n", 127 | "1,1,0|2|3|4|5|6|7|8|9|10\n", 128 | "2,8,20|21|22|23|24|25|26|27|28|29\n", 129 | "...\n", 130 | "`\n", 131 | "\n", 132 | "\n", 133 | "## Notes on the business use case for evaluation\n", 134 | "* The goal of this modeling project is to recommend to the user a list of items that they are most likely to purchase (option 1) or add to their existing basket (option 2). \n", 135 | "* As you are selecting metrics, please keep in mind that \n", 136 | " 1. the primary goal is to successfully recommend as many items in your list that they may be inclined to purchase/add, and \n", 137 | " 2. the secondary goal is that the items are ordered by the user's inclination (the more inclined they are, the higher up in your list of 10 recommendations.\n", 138 | "\n", 139 | "## Notes on implementation options\n", 140 | "\n", 141 | "For implementation of your modeling solution(s), please feel free to use any method that might be added to production were you to use it for development as a Formation employee. \n", 142 | "\n", 143 | "For example:\n", 144 | "* If you find an open source project licensed under e.g. the Apache 2.0 license or another license open for comercial purposes, you are welcome to use it for your code, or\n", 145 | "* If you feel like coding up a solution from scratch (assuming you have the time) you are welcome to do that as well.\n" 146 | ] 147 | }, 148 | { 149 | "cell_type": "code", 150 | "execution_count": 1, 151 | "metadata": { 152 | "collapsed": true 153 | }, 154 | "outputs": [], 155 | "source": [ 156 | "### Candidate code here\n" 157 | ] 158 | }, 159 | { 160 | "cell_type": "code", 161 | "execution_count": null, 162 | "metadata": { 163 | "collapsed": true 164 | }, 165 | "outputs": [], 166 | "source": [ 167 | "### Candidate code here\n" 168 | ] 169 | }, 170 | { 171 | "cell_type": "code", 172 | "execution_count": null, 173 | "metadata": { 174 | "collapsed": true 175 | }, 176 | "outputs": [], 177 | "source": [ 178 | "### Candidate code here\n" 179 | ] 180 | }, 181 | { 182 | "cell_type": "code", 183 | "execution_count": null, 184 | "metadata": { 185 | "collapsed": true 186 | }, 187 | "outputs": [], 188 | "source": [ 189 | "### Candidate code here\n" 190 | ] 191 | }, 192 | { 193 | "cell_type": "markdown", 194 | "metadata": {}, 195 | "source": [ 196 | "# Submission\n", 197 | "\n", 198 | "When you have completed your exercise, please email the following to your recruiter:\n", 199 | "1. This Raw .ipynb file with the stdout included under your cells\n", 200 | "1. An HTML export of the .ipynb file to ensure that no output is lost in submitting the raw .ipynb\n", 201 | " * [File] > [Download as] > [HTML (.html)]\n", 202 | "1. The output CSV file, with format passing the below sanity check\n" 203 | ] 204 | }, 205 | { 206 | "cell_type": "code", 207 | "execution_count": null, 208 | "metadata": { 209 | "collapsed": false 210 | }, 211 | "outputs": [], 212 | "source": [ 213 | "### The following is used to validate your submission format\n", 214 | "FILE_NAME = \"\" # Put your filename here\n", 215 | "\n", 216 | "submission_file = open(FILE_NAME)\n", 217 | "header = submission_file.readline()\n", 218 | "columns = header.strip().split(\",\")\n", 219 | "numColumns = 2\n", 220 | "# check columns in the header\n", 221 | "if len(columns) == 2 and columns[0] == \"customerId\" and columns[1] == \"recommendedProducts\":\n", 222 | " # The header matches the requirement of Option 1\n", 223 | " pass\n", 224 | "elif len(columns) == 3 and columns[0] == \"customerId\" and columns[2] == \"itemId\" and columns[2] == \"recommendedProducts\":\n", 225 | " # The header matches the requirement of Option 2\n", 226 | " numColumns = 3\n", 227 | "else:\n", 228 | " raise Exception(\"The header does not match the required format!\")\n", 229 | " \n", 230 | "# check data \n", 231 | "for (i, l) in enumerate(submission_file):\n", 232 | " fields = l.strip().split(\",\")\n", 233 | " if len(fields) != numColumns:\n", 234 | " raise Exception(\"Line %d does not have %d comma-separated fields!\" %(i+1, numColumns)) \n", 235 | " if len(fields[-1].split(\"|\")) != 10:\n", 236 | " raise Exception(\"Line %d does not have 10 recommended products!\" %(i+1))\n", 237 | "\n", 238 | "if i != 999:\n", 239 | " raise Exception(\"The submission file has %d lines (1000 expected)\" %(i+1))\n", 240 | "\n", 241 | "print(\"Your submission file has passed the format check!\")\n", 242 | " \n" 243 | ] 244 | } 245 | ], 246 | "metadata": { 247 | "anaconda-cloud": {}, 248 | "kernelspec": { 249 | "display_name": "Python 3", 250 | "language": "python", 251 | "name": "python3" 252 | }, 253 | "language_info": { 254 | "codemirror_mode": { 255 | "name": "ipython", 256 | "version": 3 257 | }, 258 | "file_extension": ".py", 259 | "mimetype": "text/x-python", 260 | "name": "python", 261 | "nbconvert_exporter": "python", 262 | "pygments_lexer": "ipython3", 263 | "version": "3.7.5" 264 | } 265 | }, 266 | "nbformat": 4, 267 | "nbformat_minor": 2 268 | } 269 | -------------------------------------------------------------------------------- /Data/recommend_2.csv: -------------------------------------------------------------------------------- 1 | customerId,productId 2 | 9543,61 3 | 10280,116 4 | 9120,266 5 | 9533,42 6 | 17907,20 7 | 1032,44 8 | 12493,69 9 | 10326,113 10 | 1403,34 11 | 10544,20 12 | 1524,67 13 | 2877,120 14 | 15476,26 15 | 8251,56 16 | 14472,233 17 | 24220,107 18 | 12122,184 19 | 881,166 20 | 13758,101 21 | 11951,51 22 | 16911,141 23 | 9406,116 24 | 213,257 25 | 32,15 26 | 7741,71 27 | 12416,2 28 | 1183,33 29 | 8406,87 30 | 462,260 31 | 268,70 32 | 11928,4 33 | 27158,49 34 | 28504,36 35 | 18573,67 36 | 1765,240 37 | 12354,282 38 | 5509,47 39 | 11824,131 40 | 15532,279 41 | 13793,15 42 | 7205,137 43 | 13328,64 44 | 25907,198 45 | 13047,176 46 | 6223,41 47 | 27413,89 48 | 21493,5 49 | 6632,127 50 | 3469,225 51 | 23400,70 52 | 27536,1 53 | 4205,97 54 | 457,8 55 | 131,89 56 | 6251,209 57 | 10750,87 58 | 3634,28 59 | 19064,69 60 | 27691,172 61 | 16860,9 62 | 542,209 63 | 13890,138 64 | 11731,42 65 | 213,78 66 | 18823,89 67 | 7236,60 68 | 27691,6 69 | 8346,11 70 | 14334,2 71 | 6517,128 72 | 2800,133 73 | 10846,93 74 | 4996,85 75 | 15019,44 76 | 8005,185 77 | 26147,68 78 | 19016,116 79 | 1534,270 80 | 7191,49 81 | 4300,30 82 | 2149,42 83 | 8184,292 84 | 2643,46 85 | 9618,185 86 | 5877,45 87 | 14647,256 88 | 44,41 89 | 1135,24 90 | 209,51 91 | 13181,67 92 | 10918,42 93 | 7226,60 94 | 7294,39 95 | 64,276 96 | 18116,285 97 | 5934,156 98 | 11167,107 99 | 8629,43 100 | 1178,39 101 | 2245,2 102 | 1214,2 103 | 1059,182 104 | 319,78 105 | 3860,68 106 | 15776,143 107 | 6516,9 108 | 18662,88 109 | 926,269 110 | 17668,52 111 | 16180,21 112 | 1775,70 113 | 27044,219 114 | 23076,38 115 | 1839,119 116 | 11824,64 117 | 4917,152 118 | 2190,192 119 | 7118,210 120 | 18639,2 121 | 810,282 122 | 15326,282 123 | 4786,69 124 | 156,2 125 | 24860,61 126 | 10235,276 127 | 1843,64 128 | 3485,290 129 | 28398,91 130 | 9561,201 131 | 4376,75 132 | 11565,150 133 | 1576,9 134 | 11773,47 135 | 25872,2 136 | 16716,41 137 | 3926,33 138 | 19454,122 139 | 6798,4 140 | 11663,59 141 | 18538,285 142 | 28504,79 143 | 11839,42 144 | 3801,116 145 | 23164,219 146 | 1648,43 147 | 8982,279 148 | 11074,79 149 | 17152,242 150 | 4101,174 151 | 18091,9 152 | 12607,39 153 | 8713,5 154 | 17869,20 155 | 12084,88 156 | 6462,1 157 | 1107,24 158 | 10133,144 159 | 4825,21 160 | 19004,182 161 | 1967,24 162 | 21025,91 163 | 27118,33 164 | 8636,135 165 | 1962,21 166 | 7205,56 167 | 371,62 168 | 5051,84 169 | 555,15 170 | 19473,10 171 | 21457,198 172 | 581,264 173 | 13115,56 174 | 6607,72 175 | 122,30 176 | 7145,60 177 | 3115,278 178 | 17490,2 179 | 8295,110 180 | 2194,270 181 | 13190,219 182 | 13289,260 183 | 20815,208 184 | 24065,138 185 | 26110,26 186 | 14471,95 187 | 27625,42 188 | 416,116 189 | 5920,23 190 | 15188,112 191 | 17547,7 192 | 13628,52 193 | 2499,52 194 | 408,13 195 | 1267,159 196 | 23594,270 197 | 108,133 198 | 8315,13 199 | 107,258 200 | 8334,26 201 | 1774,109 202 | 5874,196 203 | 5901,2 204 | 12909,136 205 | 4818,112 206 | 5462,39 207 | 1289,2 208 | 16735,256 209 | 1433,66 210 | 10791,28 211 | 1208,88 212 | 137,112 213 | 7519,61 214 | 11558,67 215 | 13890,188 216 | 4095,60 217 | 13995,174 218 | 11775,1 219 | 13448,212 220 | 19361,39 221 | 3091,61 222 | 3014,0 223 | 713,11 224 | 9677,52 225 | 16303,246 226 | 2008,12 227 | 2246,42 228 | 12677,60 229 | 17991,35 230 | 10896,47 231 | 21252,183 232 | 10174,93 233 | 22517,131 234 | 7585,26 235 | 747,1 236 | 5492,21 237 | 6290,84 238 | 5580,281 239 | 24300,123 240 | 14026,133 241 | 15495,19 242 | 12013,39 243 | 9949,190 244 | 7078,72 245 | 10971,256 246 | 3892,113 247 | 4162,258 248 | 6136,172 249 | 5922,1 250 | 12079,85 251 | 6592,47 252 | 24361,296 253 | 4851,43 254 | 13840,9 255 | 1199,138 256 | 11296,78 257 | 15574,209 258 | 5789,159 259 | 10614,14 260 | 6941,16 261 | 2935,85 262 | 9807,228 263 | 12683,21 264 | 8649,9 265 | 8971,133 266 | 4970,266 267 | 7519,30 268 | 3903,45 269 | 4851,133 270 | 13758,131 271 | 7188,188 272 | 9763,9 273 | 12435,116 274 | 174,14 275 | 2452,119 276 | 3477,116 277 | 9893,95 278 | 9033,109 279 | 237,285 280 | 3107,133 281 | 15985,2 282 | 5168,205 283 | 3014,272 284 | 2922,21 285 | 8474,40 286 | 27993,41 287 | 4107,60 288 | 12211,65 289 | 34,158 290 | 16612,85 291 | 26705,62 292 | 13536,65 293 | 16911,2 294 | 16136,122 295 | 2080,57 296 | 2325,35 297 | 2176,105 298 | 507,132 299 | 4966,113 300 | 13877,2 301 | 16004,249 302 | 17114,45 303 | 1208,135 304 | 23323,89 305 | 870,206 306 | 3723,49 307 | 7729,214 308 | 9686,94 309 | 10438,149 310 | 27100,45 311 | 6176,5 312 | 2846,2 313 | 3797,2 314 | 4662,30 315 | 1986,2 316 | 18498,2 317 | 163,80 318 | 12227,9 319 | 8603,95 320 | 1534,25 321 | 1135,2 322 | 15658,79 323 | 5776,130 324 | 2022,2 325 | 3731,175 326 | 27753,38 327 | 18430,38 328 | 4376,282 329 | 12616,9 330 | 2118,233 331 | 126,14 332 | 11402,233 333 | 13679,131 334 | 24993,21 335 | 16617,285 336 | 24443,56 337 | 21832,217 338 | 4498,46 339 | 19625,174 340 | 5580,95 341 | 12450,45 342 | 22912,63 343 | 4205,12 344 | 5417,9 345 | 155,106 346 | 1156,21 347 | 18196,1 348 | 11337,233 349 | 10084,38 350 | 6134,158 351 | 6699,42 352 | 18357,180 353 | 7242,188 354 | 14074,15 355 | 3434,205 356 | 16124,294 357 | 13995,167 358 | 13364,8 359 | 10424,268 360 | 6464,67 361 | 9017,15 362 | 163,191 363 | 16023,70 364 | 24093,62 365 | 22618,95 366 | 8389,1 367 | 9243,95 368 | 15495,105 369 | 9942,45 370 | 4365,220 371 | 4794,2 372 | 619,55 373 | 18139,294 374 | 22659,203 375 | 8101,17 376 | 6464,270 377 | 22730,156 378 | 252,16 379 | 6845,137 380 | 1514,89 381 | 5474,42 382 | 23750,161 383 | 13628,60 384 | 9331,123 385 | 4166,195 386 | 10382,2 387 | 5911,91 388 | 24829,214 389 | 4071,85 390 | 126,165 391 | 53,168 392 | 16889,66 393 | 13840,67 394 | 12817,24 395 | 6767,102 396 | 15940,123 397 | 7675,248 398 | 6001,224 399 | 17043,211 400 | 64,1 401 | 3568,188 402 | 12414,188 403 | 8381,33 404 | 5747,18 405 | 7913,70 406 | 48,162 407 | 4388,170 408 | 11184,158 409 | 97,67 410 | 21309,31 411 | 11831,2 412 | 11236,25 413 | 45,5 414 | 13056,13 415 | 10982,52 416 | 18340,105 417 | 16087,50 418 | 2800,101 419 | 5133,116 420 | 139,37 421 | 9271,82 422 | 331,17 423 | 10472,205 424 | 18163,254 425 | 12090,135 426 | 13629,20 427 | 11070,67 428 | 16683,97 429 | 10185,50 430 | 16352,229 431 | 23824,82 432 | 457,113 433 | 3591,45 434 | 5037,30 435 | 14197,29 436 | 2070,84 437 | 119,94 438 | 2617,185 439 | 197,288 440 | 3171,40 441 | 12532,196 442 | 10668,61 443 | 1101,4 444 | 5348,198 445 | 1783,209 446 | 25814,4 447 | 6306,46 448 | 19170,87 449 | 2627,190 450 | 12446,131 451 | 17351,195 452 | 9374,67 453 | 23526,285 454 | 1083,28 455 | 2070,20 456 | 6862,181 457 | 2999,172 458 | 5185,135 459 | 13355,21 460 | 26334,284 461 | 3559,43 462 | 352,150 463 | 8927,25 464 | 24172,62 465 | 474,67 466 | 9867,47 467 | 12916,164 468 | 11275,158 469 | 509,48 470 | 1169,285 471 | 10301,61 472 | 9893,69 473 | 23630,123 474 | 9405,42 475 | 7259,36 476 | 4787,90 477 | 14498,5 478 | 504,277 479 | 28522,65 480 | 21077,287 481 | 19298,80 482 | 787,1 483 | 5219,3 484 | 13095,235 485 | 22130,285 486 | 14816,182 487 | 14199,21 488 | 558,192 489 | 15647,62 490 | 6072,33 491 | 5225,237 492 | 5390,135 493 | 8513,67 494 | 26545,48 495 | 4827,106 496 | 85,295 497 | 13575,1 498 | 3697,14 499 | 10116,128 500 | 11005,2 501 | 6601,214 502 | 8968,104 503 | 8681,156 504 | 1784,38 505 | 11632,35 506 | 11738,65 507 | 15630,187 508 | 14596,156 509 | 623,136 510 | 23484,8 511 | 1182,285 512 | 3193,17 513 | 1468,66 514 | 8889,95 515 | 18981,52 516 | 4787,6 517 | 22726,285 518 | 7899,128 519 | 703,111 520 | 17454,78 521 | 26524,255 522 | 3288,215 523 | 8808,211 524 | 1841,187 525 | 8336,275 526 | 2003,15 527 | 153,209 528 | 21252,257 529 | 19203,1 530 | 1935,285 531 | 4010,291 532 | 15289,91 533 | 22295,71 534 | 3281,95 535 | 3890,188 536 | 21401,3 537 | 13819,2 538 | 4095,64 539 | 14458,69 540 | 760,2 541 | 5704,2 542 | 13029,7 543 | 11930,116 544 | 139,15 545 | 21362,70 546 | 11141,287 547 | 861,50 548 | 691,66 549 | 21728,97 550 | 9251,76 551 | 22517,162 552 | 9619,75 553 | 15315,85 554 | 4899,67 555 | 22492,192 556 | 548,1 557 | 24093,82 558 | 14741,138 559 | 7725,2 560 | 8713,282 561 | 9741,86 562 | 2774,56 563 | 10488,33 564 | 17504,60 565 | 14646,210 566 | 14026,45 567 | 7033,2 568 | 9388,266 569 | 2020,9 570 | 28311,228 571 | 14900,65 572 | 21401,282 573 | 8397,37 574 | 26550,1 575 | 2197,206 576 | 431,67 577 | 19415,21 578 | 9218,9 579 | 21416,80 580 | 8722,214 581 | 6790,20 582 | 4307,63 583 | 1221,23 584 | 8653,69 585 | 26616,259 586 | 15808,131 587 | 14095,4 588 | 5716,15 589 | 21186,43 590 | 12976,90 591 | 3261,25 592 | 1135,127 593 | 6509,68 594 | 11870,137 595 | 4300,52 596 | 18680,182 597 | 13007,174 598 | 21789,1 599 | 25956,20 600 | 9404,183 601 | 10829,65 602 | 20020,69 603 | 4580,2 604 | 20262,54 605 | 10583,30 606 | 11057,2 607 | 19621,137 608 | 32,70 609 | 6775,244 610 | 4334,33 611 | 13760,1 612 | 2427,147 613 | 1514,46 614 | 14502,137 615 | 22839,65 616 | 9612,166 617 | 3201,209 618 | 5383,74 619 | 16291,87 620 | 27300,299 621 | 1247,267 622 | 24891,72 623 | 16707,267 624 | 3424,51 625 | 3627,42 626 | 16031,180 627 | 1240,41 628 | 1094,30 629 | 2085,133 630 | 25426,94 631 | 4116,138 632 | 19717,84 633 | 1614,65 634 | 13572,279 635 | 13377,21 636 | 5437,293 637 | 309,130 638 | 28086,68 639 | 19536,214 640 | 26885,156 641 | 3715,78 642 | 1620,66 643 | 17043,2 644 | 14960,15 645 | 19621,184 646 | 2340,86 647 | 16532,208 648 | 21370,215 649 | 24605,49 650 | 5956,205 651 | 17799,214 652 | 9949,33 653 | 14217,146 654 | 16840,44 655 | 14755,4 656 | 6223,285 657 | 22033,144 658 | 17157,110 659 | 4041,174 660 | 9251,136 661 | 10460,285 662 | 26592,48 663 | 96,279 664 | 3856,20 665 | 10811,199 666 | 14576,78 667 | 27117,64 668 | 4896,128 669 | 19012,127 670 | 14405,70 671 | 11633,60 672 | 3918,47 673 | 12083,38 674 | 6528,161 675 | 13936,105 676 | 1005,52 677 | 5795,116 678 | 13192,64 679 | 1841,160 680 | 5398,245 681 | 24184,78 682 | 504,165 683 | 9033,145 684 | 7569,8 685 | 714,2 686 | 350,133 687 | 2428,64 688 | 101,279 689 | 23252,133 690 | 26494,156 691 | 4534,215 692 | 1569,172 693 | 750,2 694 | 12251,203 695 | 4957,33 696 | 1815,14 697 | 3054,15 698 | 3629,205 699 | 44,38 700 | 168,282 701 | 1225,10 702 | 3296,59 703 | 15774,145 704 | 2562,55 705 | 1784,152 706 | 4316,20 707 | 4846,2 708 | 12146,42 709 | 25101,50 710 | 12116,105 711 | 153,5 712 | 25797,22 713 | 2198,2 714 | 10866,145 715 | 21202,55 716 | 1699,45 717 | 141,50 718 | 12637,188 719 | 9999,258 720 | 3131,48 721 | 15071,49 722 | 20032,100 723 | 16279,173 724 | 3983,15 725 | 690,203 726 | 25710,33 727 | 22389,206 728 | 1935,73 729 | 4899,225 730 | 5625,88 731 | 6448,40 732 | 3116,285 733 | 23123,166 734 | 6424,38 735 | 1996,68 736 | 5522,111 737 | 21956,31 738 | 14638,33 739 | 19291,42 740 | 26060,28 741 | 21991,298 742 | 5185,206 743 | 17546,67 744 | 9261,285 745 | 6791,30 746 | 550,132 747 | 10568,80 748 | 11437,86 749 | 8289,20 750 | 24660,69 751 | 18384,42 752 | 5003,6 753 | 10015,42 754 | 22104,131 755 | 26228,40 756 | 201,20 757 | 9214,19 758 | 23567,26 759 | 3988,149 760 | 15660,36 761 | 1635,2 762 | 7792,283 763 | 717,50 764 | 4844,68 765 | 11689,25 766 | 24407,5 767 | 5684,227 768 | 2820,190 769 | 18628,202 770 | 3482,170 771 | 3915,137 772 | 16983,117 773 | 2964,33 774 | 27390,102 775 | 73,268 776 | 3300,182 777 | 9033,164 778 | 10744,266 779 | 23035,84 780 | 8991,35 781 | 21598,109 782 | 11683,70 783 | 26187,30 784 | 7323,35 785 | 14673,1 786 | 3567,119 787 | 2830,257 788 | 13378,50 789 | 6244,80 790 | 26616,66 791 | 76,183 792 | 10663,26 793 | 4288,110 794 | 1143,195 795 | 6657,133 796 | 12117,149 797 | 12607,78 798 | 8889,252 799 | 1974,183 800 | 4261,87 801 | 19320,167 802 | 8649,63 803 | 4343,26 804 | 21000,15 805 | 12432,188 806 | 12563,65 807 | 10779,43 808 | 21342,43 809 | 5339,241 810 | 10277,85 811 | 1391,60 812 | 10597,30 813 | 9809,293 814 | 20022,2 815 | 9934,78 816 | 5996,30 817 | 22126,1 818 | 12729,164 819 | 5823,15 820 | 7619,48 821 | 15650,263 822 | 6543,21 823 | 5225,206 824 | 2801,40 825 | 3830,35 826 | 9908,2 827 | 7514,116 828 | 13367,21 829 | 9663,2 830 | 9301,65 831 | 2280,251 832 | 7912,84 833 | 6078,9 834 | 16553,25 835 | 4704,2 836 | 1042,1 837 | 6248,157 838 | 12590,114 839 | 23058,87 840 | 3952,40 841 | 3546,62 842 | 18430,14 843 | 15223,0 844 | 3059,215 845 | 5522,164 846 | 25260,67 847 | 288,48 848 | 3220,136 849 | 10324,38 850 | 9275,208 851 | 1779,205 852 | 4116,26 853 | 6757,33 854 | 7128,5 855 | 7058,228 856 | 1785,42 857 | 941,190 858 | 6719,116 859 | 951,106 860 | 4215,84 861 | 6941,168 862 | 12976,15 863 | 5342,176 864 | 3126,285 865 | 5134,76 866 | 2595,13 867 | 2502,33 868 | 14302,6 869 | 9733,282 870 | 5299,2 871 | 58,2 872 | 110,57 873 | 4434,116 874 | 7624,127 875 | 8457,9 876 | 881,237 877 | 15958,131 878 | 10664,232 879 | 21601,95 880 | 19203,38 881 | 13823,138 882 | 5782,134 883 | 3715,36 884 | 677,45 885 | 1534,47 886 | 3724,137 887 | 2200,82 888 | 732,2 889 | 18113,16 890 | 5247,45 891 | 10890,188 892 | 5178,198 893 | 10078,187 894 | 110,257 895 | 4138,35 896 | 19194,60 897 | 9402,33 898 | 6646,9 899 | 1135,131 900 | 11076,181 901 | 10102,2 902 | 5774,62 903 | 9263,57 904 | 7971,110 905 | 4187,187 906 | 266,65 907 | 3543,147 908 | 20351,22 909 | 6631,229 910 | 1923,237 911 | 919,48 912 | 9175,154 913 | 8741,9 914 | 13256,164 915 | 26513,15 916 | 8698,63 917 | 7819,17 918 | 7176,259 919 | 7095,82 920 | 18823,111 921 | 19047,214 922 | 26255,44 923 | 19546,65 924 | 184,271 925 | 23066,216 926 | 5030,279 927 | 7942,72 928 | 12817,11 929 | 19093,164 930 | 13766,0 931 | 2783,285 932 | 4631,256 933 | 7667,145 934 | 5722,112 935 | 1576,206 936 | 8474,134 937 | 8725,293 938 | 20162,45 939 | 20125,20 940 | 16055,42 941 | 13595,14 942 | 15535,182 943 | 3546,270 944 | 14823,292 945 | 4426,67 946 | 13620,2 947 | 1666,15 948 | 6135,15 949 | 6779,87 950 | 8553,6 951 | 3708,47 952 | 3518,228 953 | 2078,149 954 | 14696,85 955 | 11321,227 956 | 11858,4 957 | 1226,61 958 | 109,183 959 | 19004,65 960 | 5402,285 961 | 4322,95 962 | 16333,123 963 | 8422,38 964 | 978,109 965 | 2654,37 966 | 13739,2 967 | 431,30 968 | 5481,2 969 | 4412,9 970 | 17759,21 971 | 155,133 972 | 5823,70 973 | 17460,215 974 | 10782,59 975 | 1919,37 976 | 14314,45 977 | 3712,43 978 | 16375,150 979 | 12211,159 980 | 7859,1 981 | 9402,22 982 | 4395,292 983 | 24445,119 984 | 21416,123 985 | 26607,271 986 | 6781,55 987 | 22675,293 988 | 15770,215 989 | 6765,42 990 | 19857,2 991 | 610,211 992 | 4964,272 993 | 1294,215 994 | 1357,68 995 | 16838,2 996 | 8968,11 997 | 5199,216 998 | 5944,80 999 | 6644,2 1000 | 15636,208 1001 | 3083,182 1002 | --------------------------------------------------------------------------------