diff --git a/_lezioni/10.md b/_lezioni/10.md new file mode 100644 index 0000000..b3cff81 --- /dev/null +++ b/_lezioni/10.md @@ -0,0 +1,12 @@ +--- +title: Segmentazione clienti +number: 10 +week: 5 +date: 2024-10-25 +slides_pdf: materiale_lezioni/10/decima_lezione.pdf +--- + +- Segmentazione clienti + + +[Link File csv segmentazione]({{ site.baseurl }}/materiale_lezioni/10/data_segmentazione.csv) \ No newline at end of file diff --git a/materiale_lezioni/10/dati_segmentazione.csv b/materiale_lezioni/10/dati_segmentazione.csv new file mode 100644 index 0000000..aaa3aeb --- /dev/null +++ b/materiale_lezioni/10/dati_segmentazione.csv @@ -0,0 +1,1001 @@ +CustomerID,SpesaOnline,SpesaOffline,SpesaTotale +1,102,176,278 +2,435,266,701 +3,348,340,688 +4,270,281,551 +5,106,62,168 +6,71,216,287 +7,188,341,529 +8,20,314,334 +9,102,282,384 +10,121,176,297 +11,466,460,926 +12,214,416,630 +13,330,97,427 +14,458,104,562 +15,87,98,185 +16,372,384,756 +17,99,404,503 +18,359,495,854 +19,151,310,461 +20,130,5,135 +21,149,475,624 +22,308,464,772 +23,257,196,453 +24,343,350,693 +25,491,132,623 +26,413,357,770 +27,293,258,551 +28,385,436,821 +29,191,22,213 +30,443,484,927 +31,276,52,328 +32,160,164,324 +33,459,201,660 +34,313,457,770 +35,21,82,103 +36,252,144,396 +37,235,84,319 +38,344,77,421 +39,48,456,504 +40,474,365,839 +41,58,0,58 +42,169,50,219 +43,475,172,647 +44,187,204,391 +45,463,259,722 +46,270,445,715 +47,189,448,637 +48,445,368,813 +49,174,487,661 +50,445,287,732 +51,50,33,83 +52,363,347,710 +53,54,94,148 +54,243,71,314 +55,319,38,357 +56,130,153,283 +57,484,249,733 +58,306,161,467 +59,134,437,571 +60,20,117,137 +61,328,258,586 +62,166,378,544 +63,273,305,578 +64,387,267,654 +65,88,448,536 +66,315,53,368 +67,13,235,248 +68,241,388,629 +69,264,477,741 +70,345,221,566 +71,52,250,302 +72,385,312,697 +73,339,400,739 +74,91,111,202 +75,366,254,620 +76,443,302,745 +77,454,406,860 +78,427,206,633 +79,263,228,491 +80,430,340,770 +81,34,397,431 +82,205,65,270 +83,80,74,154 +84,419,434,853 +85,49,102,151 +86,359,421,780 +87,387,191,578 +88,1,251,252 +89,389,225,614 +90,53,293,346 +91,105,305,410 +92,259,97,356 +93,309,337,646 +94,476,285,761 +95,190,334,524 +96,401,346,747 +97,217,434,651 +98,43,446,489 +99,161,481,642 +100,201,307,508 +101,445,248,693 +102,483,165,648 +103,269,480,749 +104,350,471,821 +105,303,334,637 +106,270,29,299 +107,455,246,701 +108,461,105,566 +109,214,50,264 +110,251,80,331 +111,189,132,321 +112,295,284,579 +113,212,387,599 +114,207,137,344 +115,236,183,419 +116,337,400,737 +117,366,329,695 +118,52,272,324 +119,279,339,618 +120,409,471,880 +121,216,68,284 +122,251,33,284 +123,187,261,448 +124,379,52,431 +125,492,449,941 +126,40,204,244 +127,156,125,281 +128,14,234,248 +129,300,42,342 +130,64,239,303 +131,344,458,802 +132,326,370,696 +133,8,110,118 +134,343,248,591 +135,128,150,278 +136,491,182,673 +137,135,335,470 +138,471,94,565 +139,62,458,520 +140,138,373,511 +141,498,399,897 +142,80,7,87 +143,391,387,778 +144,162,359,521 +145,418,387,805 +146,288,183,471 +147,378,280,658 +148,260,194,454 +149,489,351,840 +150,230,194,424 +151,40,154,194 +152,27,92,119 +153,134,159,293 +154,200,433,633 +155,327,60,387 +156,267,121,388 +157,417,50,467 +158,32,402,434 +159,47,276,323 +160,406,4,410 +161,61,465,526 +162,215,91,306 +163,292,169,461 +164,98,316,414 +165,171,21,192 +166,359,404,763 +167,213,325,538 +168,474,0,474 +169,34,132,166 +170,448,232,680 +171,226,11,237 +172,100,345,445 +173,430,45,475 +174,461,33,494 +175,130,432,562 +176,256,77,333 +177,4,217,221 +178,217,300,517 +179,254,410,664 +180,397,72,469 +181,358,281,639 +182,282,248,530 +183,392,46,438 +184,206,120,326 +185,14,213,227 +186,345,238,583 +187,41,55,96 +188,379,349,728 +189,460,106,566 +190,178,318,496 +191,62,47,109 +192,351,60,411 +193,230,336,566 +194,240,25,265 +195,51,291,342 +196,95,256,351 +197,387,7,394 +198,221,112,333 +199,484,354,838 +200,406,252,658 +201,230,179,409 +202,236,206,442 +203,142,302,444 +204,170,126,296 +205,28,55,83 +206,35,213,248 +207,12,13,25 +208,159,473,632 +209,326,27,353 +210,186,470,656 +211,242,77,319 +212,85,215,300 +213,283,385,668 +214,65,364,429 +215,169,153,322 +216,44,13,57 +217,61,186,247 +218,440,311,751 +219,133,370,503 +220,283,6,289 +221,27,2,29 +222,107,110,217 +223,43,406,449 +224,339,237,576 +225,285,362,647 +226,445,238,683 +227,330,492,822 +228,127,273,400 +229,347,293,640 +230,472,226,698 +231,230,370,600 +232,189,14,203 +233,224,191,415 +234,384,472,856 +235,376,118,494 +236,282,484,766 +237,445,27,472 +238,120,201,321 +239,115,38,153 +240,460,440,900 +241,232,272,504 +242,258,230,488 +243,358,85,443 +244,197,473,670 +245,455,125,580 +246,410,299,709 +247,136,24,160 +248,317,144,461 +249,164,12,176 +250,224,211,435 +251,306,24,330 +252,233,67,300 +253,171,393,564 +254,151,66,217 +255,462,232,694 +256,314,108,422 +257,373,145,518 +258,159,110,269 +259,95,227,322 +260,471,110,581 +261,232,469,701 +262,179,33,212 +263,112,110,222 +264,317,263,580 +265,496,423,919 +266,441,368,809 +267,51,235,286 +268,267,82,349 +269,294,41,335 +270,385,424,809 +271,386,100,486 +272,112,5,117 +273,100,179,279 +274,112,281,393 +275,439,319,758 +276,80,225,305 +277,186,442,628 +278,112,439,551 +279,1,314,315 +280,129,364,493 +281,219,453,672 +282,53,228,281 +283,342,376,718 +284,484,288,772 +285,223,436,659 +286,224,149,373 +287,384,276,660 +288,402,197,599 +289,125,69,194 +290,129,111,240 +291,52,3,55 +292,171,349,520 +293,217,330,547 +294,159,445,604 +295,197,317,514 +296,415,349,764 +297,246,94,340 +298,323,151,474 +299,438,310,748 +300,202,136,338 +301,183,246,429 +302,122,386,508 +303,400,242,642 +304,254,30,284 +305,293,39,332 +306,279,228,507 +307,324,35,359 +308,371,407,778 +309,97,222,319 +310,197,5,202 +311,469,321,790 +312,394,467,861 +313,239,219,458 +314,143,74,217 +315,96,3,99 +316,200,334,534 +317,123,133,256 +318,186,117,303 +319,325,368,693 +320,463,93,556 +321,348,485,833 +322,258,434,692 +323,147,61,208 +324,251,440,691 +325,442,193,635 +326,419,334,753 +327,402,202,604 +328,345,391,736 +329,450,25,475 +330,146,434,580 +331,147,172,319 +332,351,299,650 +333,198,132,330 +334,307,325,632 +335,488,409,897 +336,416,117,533 +337,423,323,746 +338,127,274,401 +339,38,211,249 +340,337,224,561 +341,359,19,378 +342,128,112,240 +343,266,139,405 +344,475,46,521 +345,440,0,440 +346,472,89,561 +347,433,141,574 +348,150,319,469 +349,414,37,451 +350,477,292,769 +351,297,381,678 +352,98,138,236 +353,262,355,617 +354,251,332,583 +355,143,490,633 +356,345,258,603 +357,111,160,271 +358,499,389,888 +359,59,177,236 +360,368,9,377 +361,1,260,261 +362,384,406,790 +363,303,137,440 +364,253,171,424 +365,139,385,524 +366,452,12,464 +367,36,167,203 +368,159,129,288 +369,8,83,91 +370,232,320,552 +371,98,318,416 +372,146,100,246 +373,303,328,631 +374,207,272,479 +375,130,264,394 +376,403,458,861 +377,151,398,549 +378,53,407,460 +379,119,37,156 +380,160,418,578 +381,407,93,500 +382,115,94,209 +383,74,304,378 +384,112,68,180 +385,455,317,772 +386,419,443,862 +387,421,235,656 +388,103,433,536 +389,339,333,672 +390,253,372,625 +391,226,375,601 +392,111,458,569 +393,472,136,608 +394,98,417,515 +395,152,75,227 +396,348,482,830 +397,401,34,435 +398,383,0,383 +399,365,295,660 +400,337,319,656 +401,193,405,598 +402,309,59,368 +403,162,319,481 +404,207,348,555 +405,444,327,771 +406,168,266,434 +407,483,360,843 +408,160,228,388 +409,67,269,336 +410,288,315,603 +411,397,285,682 +412,276,290,566 +413,303,212,515 +414,403,164,567 +415,383,4,387 +416,391,338,729 +417,134,378,512 +418,194,77,271 +419,400,409,809 +420,127,61,188 +421,32,131,163 +422,175,88,263 +423,459,236,695 +424,442,41,483 +425,370,88,458 +426,469,401,870 +427,374,295,669 +428,21,327,348 +429,237,294,531 +430,157,103,260 +431,37,13,50 +432,229,287,516 +433,364,178,542 +434,50,124,174 +435,437,421,858 +436,263,352,615 +437,282,22,304 +438,26,62,88 +439,225,142,367 +440,276,480,756 +441,285,152,437 +442,96,144,240 +443,283,224,507 +444,366,494,860 +445,447,449,896 +446,480,461,941 +447,452,308,760 +448,316,103,419 +449,303,103,406 +450,146,434,580 +451,3,38,41 +452,34,434,468 +453,191,197,388 +454,48,133,181 +455,16,66,82 +456,171,390,561 +457,219,178,397 +458,157,455,612 +459,476,41,517 +460,45,447,492 +461,372,499,871 +462,5,14,19 +463,98,110,208 +464,379,156,535 +465,232,288,520 +466,36,499,535 +467,279,477,756 +468,348,230,578 +469,496,410,906 +470,301,419,720 +471,180,156,336 +472,94,37,131 +473,98,440,538 +474,187,96,283 +475,480,484,964 +476,115,410,525 +477,190,438,628 +478,252,288,540 +479,468,253,721 +480,415,195,610 +481,470,85,555 +482,160,321,481 +483,255,9,264 +484,322,4,326 +485,127,122,249 +486,17,329,346 +487,280,352,632 +488,489,117,606 +489,222,293,515 +490,53,396,449 +491,57,158,215 +492,322,302,624 +493,359,227,586 +494,173,364,537 +495,279,215,494 +496,113,435,548 +497,287,183,470 +498,430,14,444 +499,341,156,497 +500,150,135,285 +501,449,260,709 +502,126,156,282 +503,154,46,200 +504,489,323,812 +505,385,331,716 +506,473,172,645 +507,272,129,401 +508,103,410,513 +509,416,94,510 +510,392,114,506 +511,298,242,540 +512,245,419,664 +513,175,291,466 +514,38,281,319 +515,476,298,774 +516,169,282,451 +517,246,68,314 +518,25,147,172 +519,354,10,364 +520,305,253,558 +521,408,329,737 +522,407,359,766 +523,12,37,49 +524,315,133,448 +525,390,199,589 +526,312,22,334 +527,35,302,337 +528,172,345,517 +529,19,301,320 +530,320,362,682 +531,263,395,658 +532,493,217,710 +533,399,140,539 +534,141,103,244 +535,459,445,904 +536,370,209,579 +537,470,472,942 +538,142,480,622 +539,91,110,201 +540,353,103,456 +541,321,315,636 +542,287,170,457 +543,214,459,673 +544,446,491,937 +545,341,355,696 +546,50,495,545 +547,152,323,475 +548,185,132,317 +549,62,375,437 +550,189,292,481 +551,124,327,451 +552,149,126,275 +553,313,105,418 +554,57,496,553 +555,341,91,432 +556,304,286,590 +557,179,377,556 +558,169,392,561 +559,325,50,375 +560,270,28,298 +561,53,461,514 +562,490,295,785 +563,443,296,739 +564,100,213,313 +565,480,266,746 +566,263,406,669 +567,52,256,308 +568,59,301,360 +569,491,100,591 +570,107,404,511 +571,4,345,349 +572,102,109,211 +573,195,419,614 +574,261,181,442 +575,364,470,834 +576,479,312,791 +577,371,0,371 +578,349,318,667 +579,46,437,483 +580,354,54,408 +581,310,370,680 +582,423,423,846 +583,307,398,705 +584,143,148,291 +585,268,430,698 +586,369,456,825 +587,123,308,431 +588,105,136,241 +589,157,201,358 +590,146,435,581 +591,144,312,456 +592,119,116,235 +593,318,153,471 +594,274,424,698 +595,91,290,381 +596,57,62,119 +597,438,243,681 +598,345,24,369 +599,228,89,317 +600,473,74,547 +601,116,293,409 +602,317,385,702 +603,278,390,668 +604,126,209,335 +605,392,474,866 +606,395,417,812 +607,128,346,474 +608,57,16,73 +609,121,127,248 +610,0,426,426 +611,238,442,680 +612,289,363,652 +613,95,250,345 +614,125,178,303 +615,117,181,298 +616,47,151,198 +617,88,24,112 +618,487,454,941 +619,236,179,415 +620,372,197,569 +621,384,343,727 +622,271,160,431 +623,188,176,364 +624,486,284,770 +625,191,62,253 +626,446,490,936 +627,68,149,217 +628,277,153,430 +629,348,155,503 +630,246,369,615 +631,450,468,918 +632,75,48,123 +633,153,454,607 +634,143,336,479 +635,434,83,517 +636,484,360,844 +637,85,176,261 +638,184,147,331 +639,284,117,401 +640,461,341,802 +641,219,475,694 +642,68,62,130 +643,46,188,234 +644,496,359,855 +645,93,48,141 +646,237,326,563 +647,445,256,701 +648,499,223,722 +649,452,140,592 +650,203,477,680 +651,399,214,613 +652,217,434,651 +653,473,378,851 +654,431,439,870 +655,340,210,550 +656,38,317,355 +657,99,31,130 +658,288,157,445 +659,253,284,537 +660,221,304,525 +661,356,428,784 +662,22,476,498 +663,249,285,534 +664,9,143,152 +665,245,423,668 +666,324,18,342 +667,99,17,116 +668,289,256,545 +669,179,77,256 +670,222,370,592 +671,393,174,567 +672,249,497,746 +673,146,193,339 +674,441,475,916 +675,95,112,207 +676,256,113,369 +677,324,221,545 +678,492,165,657 +679,3,434,437 +680,15,318,333 +681,279,131,410 +682,335,384,719 +683,246,263,509 +684,257,412,669 +685,496,54,550 +686,475,358,833 +687,383,130,513 +688,159,287,446 +689,474,265,739 +690,339,457,796 +691,151,466,617 +692,395,365,760 +693,177,161,338 +694,162,379,541 +695,379,480,859 +696,32,86,118 +697,416,54,470 +698,444,475,919 +699,178,287,465 +700,426,177,603 +701,100,390,490 +702,267,348,615 +703,322,7,329 +704,64,320,384 +705,416,312,728 +706,167,246,413 +707,329,322,651 +708,42,471,513 +709,43,470,513 +710,284,442,726 +711,396,254,650 +712,11,327,338 +713,94,53,147 +714,301,248,549 +715,385,238,623 +716,252,228,480 +717,498,66,564 +718,241,50,291 +719,34,96,130 +720,214,91,305 +721,336,494,830 +722,89,263,352 +723,263,417,680 +724,92,290,382 +725,409,95,504 +726,457,87,544 +727,89,77,166 +728,417,287,704 +729,114,119,233 +730,104,301,405 +731,390,490,880 +732,195,399,594 +733,313,451,764 +734,113,499,612 +735,492,164,656 +736,74,181,255 +737,412,468,880 +738,375,397,772 +739,419,222,641 +740,216,310,526 +741,276,431,707 +742,248,465,713 +743,163,6,169 +744,393,329,722 +745,356,262,618 +746,456,160,616 +747,407,150,557 +748,191,84,275 +749,226,146,372 +750,176,111,287 +751,98,380,478 +752,495,402,897 +753,35,35,70 +754,465,284,749 +755,496,187,683 +756,486,81,567 +757,95,1,96 +758,151,384,535 +759,150,302,452 +760,189,196,385 +761,223,403,626 +762,36,10,46 +763,267,233,500 +764,368,385,753 +765,182,194,376 +766,12,470,482 +767,278,118,396 +768,216,395,611 +769,354,19,373 +770,360,260,620 +771,285,292,577 +772,272,421,693 +773,368,255,623 +774,61,221,282 +775,83,392,475 +776,367,225,592 +777,216,52,268 +778,341,427,768 +779,396,354,750 +780,186,499,685 +781,18,341,359 +782,176,363,539 +783,99,279,378 +784,395,80,475 +785,444,201,645 +786,232,157,389 +787,402,119,521 +788,75,58,133 +789,264,493,757 +790,454,214,668 +791,283,127,410 +792,205,223,428 +793,222,208,430 +794,383,369,752 +795,51,114,165 +796,338,208,546 +797,366,13,379 +798,143,8,151 +799,372,39,411 +800,68,449,517 +801,98,236,334 +802,395,280,675 +803,24,358,382 +804,435,200,635 +805,378,245,623 +806,468,277,745 +807,483,234,717 +808,52,493,545 +809,150,3,153 +810,143,153,296 +811,56,441,497 +812,38,28,66 +813,108,108,216 +814,180,97,277 +815,41,214,255 +816,185,292,477 +817,422,74,496 +818,397,325,722 +819,222,145,367 +820,121,127,248 +821,132,340,472 +822,162,41,203 +823,214,355,569 +824,220,40,260 +825,234,421,655 +826,330,33,363 +827,145,16,161 +828,238,164,402 +829,75,152,227 +830,8,485,493 +831,73,377,450 +832,441,75,516 +833,491,86,577 +834,400,116,516 +835,252,361,613 +836,229,341,570 +837,6,468,474 +838,173,26,199 +839,140,312,452 +840,167,286,453 +841,169,133,302 +842,392,218,610 +843,433,167,600 +844,282,97,379 +845,121,267,388 +846,193,236,429 +847,4,308,312 +848,28,454,482 +849,164,393,557 +850,421,172,593 +851,338,400,738 +852,135,409,544 +853,495,468,963 +854,364,475,839 +855,320,189,509 +856,341,121,462 +857,499,45,544 +858,144,63,207 +859,326,129,455 +860,216,309,525 +861,300,362,662 +862,131,192,323 +863,291,306,597 +864,69,180,249 +865,251,291,542 +866,414,370,784 +867,274,281,555 +868,444,28,472 +869,363,148,511 +870,181,266,447 +871,166,295,461 +872,90,10,100 +873,201,163,364 +874,345,112,457 +875,18,186,204 +876,38,294,332 +877,125,231,356 +878,450,226,676 +879,172,309,481 +880,140,97,237 +881,241,54,295 +882,219,110,329 +883,125,151,276 +884,57,245,302 +885,147,405,552 +886,475,68,543 +887,455,311,766 +888,316,288,604 +889,382,249,631 +890,360,35,395 +891,422,238,660 +892,0,147,147 +893,386,466,852 +894,460,226,686 +895,347,243,590 +896,189,490,679 +897,190,336,526 +898,368,445,813 +899,408,364,772 +900,311,490,801 +901,416,481,897 +902,421,200,621 +903,116,153,269 +904,133,449,582 +905,57,72,129 +906,43,200,243 +907,172,295,467 +908,159,16,175 +909,172,128,300 +910,316,216,532 +911,302,60,362 +912,148,426,574 +913,79,103,182 +914,373,41,414 +915,212,24,236 +916,202,38,240 +917,251,290,541 +918,228,130,358 +919,163,497,660 +920,226,228,454 +921,146,107,253 +922,19,171,190 +923,440,434,874 +924,401,477,878 +925,46,101,147 +926,232,353,585 +927,304,11,315 +928,13,274,287 +929,142,100,242 +930,414,43,457 +931,0,442,442 +932,372,304,676 +933,53,444,497 +934,373,16,389 +935,258,329,587 +936,143,56,199 +937,470,310,780 +938,440,496,936 +939,458,302,760 +940,11,11,22 +941,329,317,646 +942,223,79,302 +943,271,215,486 +944,455,338,793 +945,357,263,620 +946,459,478,937 +947,407,148,555 +948,155,80,235 +949,372,214,586 +950,7,484,491 +951,121,373,494 +952,347,463,810 +953,163,197,360 +954,89,199,288 +955,135,24,159 +956,185,465,650 +957,315,88,403 +958,177,267,444 +959,27,142,169 +960,219,58,277 +961,356,409,765 +962,40,488,528 +963,227,364,591 +964,191,25,216 +965,410,46,456 +966,446,287,733 +967,144,265,409 +968,200,15,215 +969,416,198,614 +970,211,400,611 +971,460,406,866 +972,219,281,500 +973,239,468,707 +974,412,85,497 +975,396,249,645 +976,45,390,435 +977,34,269,303 +978,252,334,586 +979,389,116,505 +980,81,6,87 +981,370,136,506 +982,255,370,625 +983,196,175,371 +984,302,327,629 +985,408,497,905 +986,449,314,763 +987,9,214,223 +988,311,476,787 +989,285,81,366 +990,241,222,463 +991,250,477,727 +992,364,371,735 +993,4,422,426 +994,118,482,600 +995,288,401,689 +996,373,442,815 +997,64,489,553 +998,145,102,247 +999,223,272,495 +1000,238,13,251 diff --git a/materiale_lezioni/10/decima_lezione.pdf b/materiale_lezioni/10/decima_lezione.pdf new file mode 100644 index 0000000..b5360e3 Binary files /dev/null and b/materiale_lezioni/10/decima_lezione.pdf differ