From fee881b4b42951267c650e3ccc5446022fc72fcd Mon Sep 17 00:00:00 2001 From: Kate Date: Mon, 30 Oct 2023 20:52:01 +0400 Subject: [PATCH] lab3 ready --- belyaeva_ekaterina_lab_3/Current_Pub_Meta.csv | 125 ++++++++++++++++++ belyaeva_ekaterina_lab_3/README.md | 35 +++++ belyaeva_ekaterina_lab_3/main.py | 47 +++++++ 3 files changed, 207 insertions(+) create mode 100644 belyaeva_ekaterina_lab_3/Current_Pub_Meta.csv create mode 100644 belyaeva_ekaterina_lab_3/README.md create mode 100644 belyaeva_ekaterina_lab_3/main.py diff --git a/belyaeva_ekaterina_lab_3/Current_Pub_Meta.csv b/belyaeva_ekaterina_lab_3/Current_Pub_Meta.csv new file mode 100644 index 0000000..9916e00 --- /dev/null +++ b/belyaeva_ekaterina_lab_3/Current_Pub_Meta.csv @@ -0,0 +1,125 @@ +,Name,Primary Attribute,Roles,Herald Picks,Herald Wins,Herald Win Rate,Guardian Picks,Guardian Wins,Guardian Win Rate,Crusader Picks,Crusader Wins,Crusader Win Rate,Archon Picks,Archon Wins,Archon Win Rate,Legend Picks,Legend Wins,Legend Win Rate,Ancient Picks,Ancient Wins,Ancient Win Rate,Divine Picks,Divine Wins,Divine Win Rate,Immortal Picks,Immortal Wins,Immortal Win Rate +0,Abaddon,all,"Support, Carry, Durable",1111,575,51.76,6408,3309,51.64,13811,7050,51.05,16497,8530,51.71,11360,5877,51.73,5571,2893,51.93,2632,1345,51.1,991,497,50.15 +1,Alchemist,str,"Carry, Support, Durable, Disabler, Initiator, Nuker",1119,486,43.43,6370,2883,45.26,12238,5617,45.9,13028,6130,47.05,8455,4055,47.96,4120,1984,48.16,2021,1023,50.62,860,424,49.3 +2,Ancient Apparition,int,"Support, Disabler, Nuker",2146,1073,50.0,13697,7069,51.61,30673,16118,52.55,35145,18219,51.84,23114,12166,52.63,10688,5528,51.72,5035,2573,51.1,2134,1076,50.42 +3,Anti-Mage,agi,"Carry, Escape, Nuker",3765,1818,48.29,22050,10774,48.86,47371,23304,49.19,49115,24074,49.02,28599,13991,48.92,12303,5958,48.43,4866,2349,48.27,1502,751,50.0 +4,Arc Warden,agi,"Carry, Escape, Nuker",1448,704,48.62,8047,4162,51.72,14946,7982,53.41,14711,7875,53.53,9472,5167,54.55,4323,2309,53.41,2104,1148,54.56,789,435,55.13 +5,Axe,str,"Initiator, Durable, Disabler, Carry",5343,2880,53.9,32652,17719,54.27,71010,37736,53.14,77869,40559,52.09,49182,25079,50.99,22637,11353,50.15,10114,5000,49.44,3795,1837,48.41 +6,Bane,all,"Support, Disabler, Nuker, Durable",745,334,44.83,4983,2422,48.61,11332,5504,48.57,13633,6767,49.64,10132,5032,49.66,5596,2861,51.13,3028,1555,51.35,1958,1055,53.88 +7,Batrider,all,"Initiator, Disabler, Escape",349,136,38.97,1983,812,40.95,4053,1595,39.35,4725,1861,39.39,3173,1275,40.18,1678,731,43.56,802,362,45.14,497,227,45.67 +8,Beastmaster,all,"Initiator, Disabler, Durable, Nuker",402,174,43.28,2447,1060,43.32,5787,2569,44.39,6930,3092,44.62,5288,2389,45.18,2816,1274,45.24,1593,752,47.21,1176,539,45.83 +9,Bloodseeker,agi,"Carry, Disabler, Nuker, Initiator",2765,1382,49.98,12589,6270,49.81,21781,10683,49.05,20961,10420,49.71,13035,6430,49.33,6210,3006,48.41,2941,1475,50.15,1465,718,49.01 +10,Bounty Hunter,agi,"Escape, Nuker",3852,1868,48.49,19609,9535,48.63,36362,17600,48.4,37059,18314,49.42,22934,11518,50.22,10584,5276,49.85,5105,2594,50.81,2498,1325,53.04 +11,Brewmaster,all,"Carry, Initiator, Durable, Disabler, Nuker",545,280,51.38,3564,1745,48.96,8941,4388,49.08,12340,6111,49.52,11185,5623,50.27,7645,3906,51.09,4812,2478,51.5,3533,1820,51.51 +12,Bristleback,str,"Carry, Durable, Initiator, Nuker",5884,3262,55.44,27952,14587,52.19,48847,24379,49.91,46702,22927,49.09,27466,13319,48.49,12398,5969,48.14,5865,2915,49.7,2639,1304,49.41 +13,Broodmother,all,"Carry, Pusher, Escape, Nuker",456,173,37.94,2048,842,41.11,3444,1462,42.45,3392,1448,42.69,2193,1048,47.79,1203,602,50.04,795,422,53.08,453,230,50.77 +14,Centaur Warrunner,str,"Durable, Initiator, Disabler, Nuker, Escape",1721,911,52.93,11754,6266,53.31,28691,15201,52.98,35369,18741,52.99,25393,13468,53.04,12653,6607,52.22,6124,3181,51.94,2442,1243,50.9 +15,Chaos Knight,str,"Carry, Disabler, Durable, Pusher, Initiator",3032,1639,54.06,16762,8931,53.28,31892,17139,53.74,30697,16435,53.54,18217,9810,53.85,8572,4620,53.9,4230,2291,54.16,1750,943,53.89 +16,Chen,all,"Support, Pusher",284,125,44.01,1450,678,46.76,2969,1345,45.3,3258,1604,49.23,2641,1331,50.4,1488,767,51.55,970,512,52.78,770,448,58.18 +17,Clinkz,agi,"Carry, Escape, Pusher",3151,1608,51.03,13891,7141,51.41,25465,12938,50.81,27327,14066,51.47,18846,9726,51.61,9452,4890,51.74,4765,2475,51.94,2093,1052,50.26 +18,Clockwerk,all,"Initiator, Disabler, Durable, Nuker",816,397,48.65,5860,2837,48.41,14478,6929,47.86,18466,8843,47.89,13143,6301,47.94,6612,3169,47.93,3286,1581,48.11,1378,658,47.75 +19,Crystal Maiden,int,"Support, Disabler, Nuker",4821,2529,52.46,26584,13626,51.26,52168,26040,49.92,52258,25365,48.54,30690,14848,48.38,13295,6404,48.17,5602,2680,47.84,1638,771,47.07 +20,Dark Seer,all,"Initiator, Escape, Disabler",627,320,51.04,3675,1884,51.27,7881,3803,48.26,9589,4844,50.52,7186,3573,49.72,3902,1983,50.82,2145,1095,51.05,1217,593,48.73 +21,Dark Willow,all,"Support, Nuker, Disabler, Escape",2654,1293,48.72,13829,6657,48.14,28142,13480,47.9,32114,15785,49.15,23100,11331,49.05,12052,5909,49.03,6400,3182,49.72,3708,1915,51.65 +22,Dawnbreaker,str,"Carry, Durable",1746,875,50.11,12297,6105,49.65,32398,15921,49.14,44846,21936,48.91,35474,17441,49.17,19770,9832,49.73,10637,5263,49.48,6339,3173,50.06 +23,Dazzle,all,"Support, Nuker, Disabler",2827,1418,50.16,19852,9758,49.15,48236,23691,49.11,56417,27798,49.27,38159,18642,48.85,18695,9199,49.21,8530,4239,49.7,3382,1654,48.91 +24,Death Prophet,int,"Carry, Pusher, Nuker, Disabler",1372,659,48.03,6643,3145,47.34,11987,5729,47.79,12268,5856,47.73,7455,3606,48.37,3591,1698,47.28,1872,902,48.18,926,459,49.57 +25,Disruptor,int,"Support, Disabler, Nuker, Initiator",1541,757,49.12,11104,5331,48.01,27746,13542,48.81,33742,16310,48.34,23173,11096,47.88,10907,5201,47.68,4859,2255,46.41,1863,861,46.22 +26,Doom,str,"Carry, Disabler, Initiator, Durable, Nuker",1049,474,45.19,6112,2767,45.27,13700,6056,44.2,15454,6925,44.81,10727,4842,45.14,5444,2451,45.02,2979,1348,45.25,1545,731,47.31 +27,Dragon Knight,str,"Carry, Pusher, Durable, Disabler, Initiator, Nuker",1950,942,48.31,10643,5274,49.55,20451,9733,47.59,20326,9671,47.58,11674,5544,47.49,4979,2355,47.3,2024,973,48.07,725,341,47.03 +28,Drow Ranger,agi,"Carry, Disabler, Pusher",5737,2904,50.62,29675,14831,49.98,57655,28573,49.56,56682,27927,49.27,34310,16607,48.4,15050,7171,47.65,5947,2815,47.33,1768,788,44.57 +29,Earth Spirit,str,"Nuker, Escape, Disabler, Initiator, Durable",1038,465,44.8,7420,3276,44.15,20807,9432,45.33,30107,14166,47.05,25314,12148,47.99,14579,7041,48.3,7678,3802,49.52,4379,2169,49.53 +30,Earthshaker,str,"Support, Initiator, Disabler, Nuker",5012,2455,48.98,29784,14662,49.23,67050,33111,49.38,79963,39843,49.83,57108,28961,50.71,28650,14591,50.93,14186,7296,51.43,6151,3165,51.46 +31,Elder Titan,str,"Initiator, Disabler, Nuker, Durable",471,212,45.01,2551,1248,48.92,5213,2570,49.3,5572,2809,50.41,3847,1942,50.48,1964,998,50.81,1124,613,54.54,550,292,53.09 +32,Ember Spirit,agi,"Carry, Escape, Nuker, Disabler, Initiator",1514,635,41.94,9180,3836,41.79,20578,8738,42.46,25152,10844,43.11,17703,7814,44.14,8538,3793,44.42,4265,1892,44.36,2065,928,44.94 +33,Enchantress,int,"Support, Pusher, Durable, Disabler",1794,848,47.27,8050,3622,44.99,12921,5686,44.01,11673,4974,42.61,6863,2840,41.38,2948,1212,41.11,1434,654,45.61,806,318,39.45 +34,Enigma,all,"Disabler, Initiator, Pusher",1317,588,44.65,6937,3171,45.71,12908,5979,46.32,11687,5428,46.44,6194,2839,45.83,2493,1127,45.21,938,437,46.59,338,159,47.04 +35,Faceless Void,agi,"Carry, Initiator, Disabler, Escape, Durable",4323,2043,47.26,25618,11902,46.46,54581,25874,47.4,60671,28993,47.79,40137,19611,48.86,19376,9620,49.65,9579,4828,50.4,4439,2256,50.82 +36,Grimstroke,int,"Support, Nuker, Disabler, Escape",1455,694,47.7,9714,4789,49.3,24688,12430,50.35,32027,16094,50.25,23193,11795,50.86,12102,6100,50.4,6191,3047,49.22,3449,1666,48.3 +37,Gyrocopter,agi,"Carry, Nuker, Disabler",2560,1213,47.38,16589,7882,47.51,42072,20358,48.39,54200,26229,48.39,39414,19053,48.34,20164,9781,48.51,10164,4937,48.57,5241,2507,47.83 +38,Hoodwink,agi,"Support, Nuker, Escape, Disabler",2420,1126,46.53,14034,6800,48.45,31382,14964,47.68,35684,16966,47.55,22626,10651,47.07,9949,4690,47.14,4349,2089,48.03,1533,703,45.86 +39,Huskar,str,"Carry, Durable, Initiator",3501,1603,45.79,14234,6639,46.64,22794,10912,47.87,21801,10763,49.37,13811,6919,50.1,6769,3535,52.22,3556,1822,51.24,1936,993,51.29 +40,Invoker,all,"Carry, Nuker, Disabler, Escape, Pusher",4330,2042,47.16,27625,13176,47.7,69035,33863,49.05,86745,43479,50.12,61821,31510,50.97,31459,16321,51.88,15431,8195,53.11,7852,4148,52.83 +41,Io,all,"Support, Escape, Nuker",1274,615,48.27,6158,2999,48.7,12762,6247,48.95,14216,7024,49.41,9564,4843,50.64,5301,2685,50.65,2789,1463,52.46,1464,773,52.8 +42,Jakiro,int,"Support, Nuker, Pusher, Disabler",3147,1708,54.27,22718,12413,54.64,56736,30984,54.61,70038,37473,53.5,46389,24997,53.89,22084,11639,52.7,9838,5103,51.87,3282,1729,52.68 +43,Juggernaut,agi,"Carry, Pusher, Escape",5585,2711,48.54,30394,14800,48.69,62313,30581,49.08,65590,32344,49.31,39235,19326,49.26,16334,8012,49.05,6419,3066,47.76,1576,731,46.38 +44,Keeper of the Light,int,"Support, Nuker, Disabler",896,353,39.4,5051,2216,43.87,10452,4579,43.81,11614,5322,45.82,7870,3627,46.09,4268,2001,46.88,2147,1043,48.58,1333,588,44.11 +45,Kunkka,str,"Carry, Support, Disabler, Initiator, Durable, Nuker",2251,1124,49.93,13474,6828,50.68,31210,16196,51.89,39691,21293,53.65,30314,16458,54.29,15706,8793,55.98,7884,4339,55.04,3458,1898,54.89 +46,Legion Commander,str,"Carry, Disabler, Initiator, Durable, Nuker",6263,3264,52.12,37100,19157,51.64,81491,41557,51.0,91431,46558,50.92,59383,29917,50.38,27945,13917,49.8,13193,6587,49.93,5601,2745,49.01 +47,Leshrac,int,"Carry, Support, Nuker, Pusher, Disabler",674,316,46.88,3872,1799,46.46,7490,3433,45.83,7903,3604,45.6,5322,2526,47.46,2687,1298,48.31,1325,647,48.83,721,357,49.51 +48,Lich,int,"Support, Nuker",2700,1412,52.3,16646,8820,52.99,37785,19685,52.1,45471,23554,51.8,31203,16108,51.62,15530,7821,50.36,7243,3597,49.66,2520,1258,49.92 +49,Lifestealer,str,"Carry, Durable, Escape, Disabler",2515,1213,48.23,14131,6978,49.38,29724,14627,49.21,31211,15581,49.92,18970,9481,49.98,8689,4400,50.64,3630,1821,50.17,1229,617,50.2 +50,Lina,int,"Support, Carry, Nuker, Disabler",4512,2030,44.99,21927,10156,46.32,45301,21210,46.82,54229,25956,47.86,40016,19138,47.83,21072,10112,47.99,10481,5031,48.0,4369,2138,48.94 +51,Lion,int,"Support, Disabler, Nuker, Initiator",6204,2855,46.02,37869,17465,46.12,80124,36649,45.74,84390,38176,45.24,50720,22914,45.18,21698,9784,45.09,9308,4280,45.98,3220,1496,46.46 +52,Lone Druid,all,"Carry, Pusher, Durable",909,483,53.14,4714,2421,51.36,10987,5858,53.32,14580,7968,54.65,11810,6490,54.95,7241,3971,54.84,4024,2240,55.67,2303,1259,54.67 +53,Luna,agi,"Carry, Nuker, Pusher",1927,904,46.91,9091,4271,46.98,16571,7922,47.81,16035,7615,47.49,9728,4634,47.64,4463,2103,47.12,1912,911,47.65,719,322,44.78 +54,Lycan,all,"Carry, Pusher, Durable, Escape",374,174,46.52,1894,915,48.31,3691,1744,47.25,3824,1905,49.82,2694,1332,49.44,1460,753,51.58,827,411,49.7,532,289,54.32 +55,Magnus,all,"Initiator, Disabler, Nuker, Escape",770,339,44.03,5789,2651,45.79,17837,7954,44.59,26126,12058,46.15,20634,9592,46.49,10574,5056,47.82,4565,2073,45.41,1606,751,46.76 +56,Marci,all,"Support, Carry, Initiator, Disabler, Escape",1370,620,45.26,7092,3252,45.85,15199,7240,47.63,18485,8874,48.01,13308,6305,47.38,7176,3476,48.44,3689,1882,51.02,1746,883,50.57 +57,Mars,str,"Carry, Initiator, Disabler, Durable",862,375,43.5,5719,2529,44.22,15156,6756,44.58,20719,9369,45.22,16419,7387,44.99,9044,4052,44.8,4536,2093,46.14,1926,868,45.07 +58,Medusa,agi,"Carry, Disabler, Durable",1898,902,47.52,9289,4512,48.57,16504,7818,47.37,14796,6886,46.54,7488,3449,46.06,2775,1270,45.77,1073,482,44.92,394,184,46.7 +59,Meepo,agi,"Carry, Escape, Nuker, Disabler, Initiator, Pusher",1004,523,52.09,3970,1990,50.13,6904,3587,51.96,7166,3646,50.88,4906,2563,52.24,2383,1282,53.8,1139,588,51.62,585,300,51.28 +60,Mirana,all,"Carry, Support, Escape, Nuker, Disabler",2499,1193,47.74,16954,8135,47.98,39985,19097,47.76,45169,21554,47.72,28467,13456,47.27,12800,6047,47.24,5272,2500,47.42,1824,874,47.92 +61,Monkey King,agi,"Carry, Escape, Disabler, Initiator",3191,1384,43.37,17306,7544,43.59,35734,16113,45.09,40778,18322,44.93,27558,12630,45.83,14034,6433,45.84,6650,3152,47.4,3040,1440,47.37 +62,Morphling,agi,"Carry, Escape, Durable, Nuker, Disabler",1521,690,45.36,8620,4006,46.47,18075,8161,45.15,20414,9235,45.24,14395,6530,45.36,7697,3551,46.13,4432,2050,46.25,2560,1190,46.48 +63,Muerta,int,"Carry, Nuker, Disabler",2130,1089,51.13,10787,5740,53.21,22602,11898,52.64,27609,14495,52.5,20175,10465,51.87,10662,5518,51.75,5462,2759,50.51,2948,1517,51.46 +64,Naga Siren,agi,"Carry, Support, Pusher, Disabler, Initiator, Escape",1502,804,53.53,6495,3356,51.67,10423,5234,50.22,9830,4929,50.14,6057,2971,49.05,3216,1675,52.08,1855,933,50.3,1242,634,51.05 +65,Nature's Prophet,int,"Carry, Pusher, Escape, Nuker",5991,3029,50.56,36433,18143,49.8,83118,42095,50.64,100341,51268,51.09,69436,35870,51.66,34256,17858,52.13,16585,8745,52.73,7182,3755,52.28 +66,Necrophos,int,"Carry, Nuker, Durable, Disabler",4776,2702,56.57,28535,15771,55.27,62186,34285,55.13,70212,38163,54.35,46539,24708,53.09,21607,11302,52.31,9677,4994,51.61,3418,1733,50.7 +67,Night Stalker,str,"Carry, Initiator, Durable, Disabler, Nuker",1189,594,49.96,7868,3892,49.47,19446,10004,51.45,25524,13506,52.91,20138,10828,53.77,10767,5651,52.48,5499,2889,52.54,2415,1257,52.05 +68,Nyx Assassin,all,"Disabler, Nuker, Initiator, Escape",1718,867,50.47,10925,5525,50.57,27207,14073,51.73,34684,18059,52.07,25736,13572,52.74,13313,7093,53.28,6485,3444,53.11,2852,1468,51.47 +69,Ogre Magi,str,"Support, Nuker, Disabler, Durable, Initiator",5331,2845,53.37,31507,16299,51.73,62954,32248,51.22,61758,31373,50.8,33746,16988,50.34,13262,6654,50.17,4861,2420,49.78,1271,654,51.46 +70,Omniknight,str,"Support, Durable, Nuker",975,479,49.13,6426,3109,48.38,14641,7319,49.99,17258,8731,50.59,11695,5916,50.59,5746,2993,52.09,2870,1469,51.18,1333,656,49.21 +71,Oracle,int,"Support, Nuker, Disabler, Escape",796,384,48.24,4857,2417,49.76,13141,6645,50.57,18944,9853,52.01,15221,7964,52.32,8356,4458,53.35,4475,2380,53.18,1905,1018,53.44 +72,Outworld Destroyer,int,"Carry, Nuker, Disabler",2226,1118,50.22,13388,6864,51.27,33284,17362,52.16,43991,23377,53.14,32021,16994,53.07,16655,8724,52.38,8123,4218,51.93,3176,1649,51.92 +73,Pangolier,all,"Carry, Nuker, Disabler, Durable, Escape, Initiator",1156,534,46.19,7189,3209,44.64,17802,7937,44.58,25785,11677,45.29,21727,10144,46.69,13064,6351,48.61,7567,3737,49.39,5275,2734,51.83 +74,Phantom Assassin,agi,"Carry, Escape",8553,4426,51.75,48549,25553,52.63,104756,54881,52.39,119332,62511,52.38,79140,41143,51.99,37399,19325,51.67,17774,9077,51.07,7819,3856,49.32 +75,Phantom Lancer,agi,"Carry, Escape, Pusher, Nuker",3641,1960,53.83,19550,10374,53.06,38576,20633,53.49,41505,22310,53.75,26401,14268,54.04,12437,6590,52.99,5708,2985,52.3,2383,1243,52.16 +76,Phoenix,all,"Support, Nuker, Initiator, Escape, Disabler",743,315,42.4,5231,2471,47.24,13950,6633,47.55,18350,8864,48.31,13972,6715,48.06,7787,3761,48.3,4322,2132,49.33,2610,1325,50.77 +77,Primal Beast,str,"Initiator, Durable, Disabler",1455,701,48.18,9333,4448,47.66,22800,11058,48.5,30084,14643,48.67,24307,11993,49.34,13970,6991,50.04,7742,3890,50.25,4625,2407,52.04 +78,Puck,int,"Initiator, Disabler, Escape, Nuker",871,399,45.81,5773,2628,45.52,16596,7578,45.66,24480,11315,46.22,20070,9497,47.32,11023,5298,48.06,5656,2714,47.98,2555,1200,46.97 +79,Pudge,str,"Disabler, Initiator, Durable, Nuker",7677,3796,49.45,50891,24776,48.68,114784,56289,49.04,129604,63097,48.68,85800,41542,48.42,41730,20239,48.5,19823,9530,48.08,7112,3431,48.24 +80,Pugna,int,"Nuker, Pusher",2075,944,45.49,9998,4695,46.96,18962,8958,47.24,20240,9965,49.23,12807,6199,48.4,5825,2855,49.01,2758,1387,50.29,1195,592,49.54 +81,Queen of Pain,int,"Carry, Nuker, Escape",2287,1100,48.1,15119,7354,48.64,37137,18118,48.79,47706,23657,49.59,35500,18018,50.75,18405,9289,50.47,9243,4689,50.73,4227,2113,49.99 +82,Razor,agi,"Carry, Durable, Nuker, Pusher",2470,1231,49.84,12000,5964,49.7,24666,12142,49.23,30334,14844,48.94,21832,10558,48.36,11917,5679,47.65,6092,2912,47.8,3144,1551,49.33 +83,Riki,agi,"Carry, Escape, Disabler",3684,1929,52.36,19022,9891,52.0,35638,18582,52.14,33908,17415,51.36,20194,10312,51.06,8726,4377,50.16,3735,1855,49.67,1160,559,48.19 +84,Rubick,int,"Support, Disabler, Nuker",3090,1404,45.44,21639,9303,42.99,57417,24590,42.83,74874,32603,43.54,55186,24219,43.89,28206,12568,44.56,13732,6106,44.47,5764,2642,45.84 +85,Sand King,all,"Initiator, Disabler, Support, Nuker, Escape",2633,1513,57.46,13097,7323,55.91,25271,13807,54.64,26724,14323,53.6,17384,9144,52.6,7907,4104,51.9,3394,1719,50.65,1211,611,50.45 +86,Shadow Demon,int,"Support, Disabler, Initiator, Nuker",547,236,43.14,3252,1426,43.85,7920,3524,44.49,9752,4551,46.67,7404,3467,46.83,3956,1876,47.42,2076,1004,48.36,1054,497,47.15 +87,Shadow Fiend,agi,"Carry, Nuker",5051,2544,50.37,27255,14064,51.6,58589,29830,50.91,65429,33097,50.58,41810,21189,50.68,18766,9401,50.1,8232,4000,48.59,3016,1430,47.41 +88,Shadow Shaman,int,"Support, Pusher, Disabler, Nuker, Initiator",5323,2795,52.51,29733,15606,52.49,58894,31236,53.04,58765,30895,52.57,34475,18242,52.91,15166,7986,52.66,6377,3323,52.11,2413,1253,51.93 +89,Silencer,int,"Carry, Support, Disabler, Initiator, Nuker",4229,2324,54.95,27878,14960,53.66,61698,33081,53.62,65256,34458,52.8,38589,19853,51.45,16889,8653,51.23,6836,3416,49.97,2236,1105,49.42 +90,Skywrath Mage,int,"Support, Nuker, Disabler",4000,2030,50.75,22783,11675,51.24,46512,23624,50.79,51329,25706,50.08,34167,17364,50.82,16693,8415,50.41,8496,4208,49.53,4389,2069,47.14 +91,Slardar,str,"Carry, Durable, Initiator, Disabler, Escape",3935,2129,54.1,21523,11602,53.91,43947,23701,53.93,47721,25633,53.71,29887,16132,53.98,14233,7722,54.25,6530,3467,53.09,2322,1205,51.89 +92,Slark,agi,"Carry, Escape, Disabler, Nuker",4815,2521,52.36,29413,14762,50.19,64004,31771,49.64,70173,34411,49.04,44780,21926,48.96,20864,10270,49.22,9969,4962,49.77,4565,2394,52.44 +93,Snapfire,all,"Support, Nuker, Disabler, Escape",1524,682,44.75,10646,4576,42.98,27103,12120,44.72,34711,15412,44.4,24351,10786,44.29,11723,5131,43.77,5227,2294,43.89,1987,868,43.68 +94,Sniper,agi,"Carry, Nuker",8022,4079,50.85,44508,22727,51.06,88690,45223,50.99,87190,44086,50.56,47411,23648,49.88,18092,8924,49.33,6130,3040,49.59,1370,662,48.32 +95,Spectre,agi,"Carry, Durable, Escape",3454,2008,58.14,22097,12356,55.92,49157,26961,54.85,55914,30100,53.83,36321,19338,53.24,16946,8960,52.87,7921,4163,52.56,2568,1370,53.35 +96,Spirit Breaker,str,"Carry, Initiator, Disabler, Durable, Escape",4788,2423,50.61,26662,13530,50.75,56535,28908,51.13,63991,32249,50.4,42512,21357,50.24,20119,9926,49.34,9499,4814,50.68,3761,1884,50.09 +97,Storm Spirit,int,"Carry, Escape, Nuker, Initiator, Disabler",2202,1001,45.46,11656,5197,44.59,25644,11806,46.04,30968,14210,45.89,21680,10197,47.03,10810,5025,46.48,5278,2382,45.13,2363,1122,47.48 +98,Sven,str,"Carry, Disabler, Initiator, Durable, Nuker",3552,1761,49.58,19792,9744,49.23,41296,20478,49.59,48709,24228,49.74,35460,17828,50.28,19795,10065,50.85,11014,5655,51.34,6701,3387,50.54 +99,Techies,all,"Nuker, Disabler",2356,1131,48.01,13105,6245,47.65,27293,12893,47.24,29180,13507,46.29,18216,8407,46.15,8266,3771,45.62,3459,1644,47.53,1319,591,44.81 +100,Templar Assassin,agi,"Carry, Escape",2142,955,44.58,10932,4758,43.52,21211,9445,44.53,23928,10909,45.59,17399,8242,47.37,9567,4656,48.67,5525,2708,49.01,3524,1775,50.37 +101,Terrorblade,agi,"Carry, Pusher, Nuker",1115,484,43.41,5686,2430,42.74,10856,4638,42.72,11518,5041,43.77,8059,3540,43.93,4192,1827,43.58,2419,1082,44.73,1621,700,43.18 +102,Tidehunter,str,"Initiator, Durable, Disabler, Nuker, Carry",1835,855,46.59,11159,5369,48.11,26222,12699,48.43,30735,14879,48.41,20523,9727,47.4,9731,4740,48.71,4426,2079,46.97,1998,936,46.85 +103,Timbersaw,all,"Nuker, Durable, Escape",1050,448,42.67,5854,2584,44.14,12301,5391,43.83,14295,6097,42.65,9697,4217,43.49,4992,2163,43.33,2419,1021,42.21,1139,471,41.35 +104,Tinker,int,"Carry, Nuker, Pusher",2106,944,44.82,11058,5200,47.02,24263,11826,48.74,27531,13614,49.45,19017,9732,51.18,9416,4875,51.77,4700,2466,52.47,1951,1036,53.1 +105,Tiny,str,"Carry, Nuker, Pusher, Initiator, Durable, Disabler",1434,654,45.61,7742,3452,44.59,15936,6950,43.61,17139,7468,43.57,11269,4991,44.29,5485,2491,45.41,2599,1216,46.79,1058,519,49.05 +106,Treant Protector,str,"Support, Initiator, Durable, Disabler, Escape",1646,899,54.62,11430,5881,51.45,28752,15124,52.6,36093,19344,53.59,28762,15532,54.0,16751,9227,55.08,9870,5468,55.4,6801,3855,56.68 +107,Troll Warlord,agi,"Carry, Pusher, Disabler, Durable",3176,1720,54.16,14007,7445,53.15,24729,13022,52.66,25424,13228,52.03,17362,9030,52.01,9427,4913,52.12,4767,2499,52.42,2341,1242,53.05 +108,Tusk,str,"Initiator, Disabler, Nuker",1263,565,44.73,8338,3777,45.3,19642,8869,45.15,25308,11520,45.52,18927,8853,46.77,10100,4820,47.72,5220,2502,47.93,2350,1157,49.23 +109,Underlord,str,"Support, Nuker, Disabler, Durable, Escape",797,405,50.82,4583,2341,51.08,10067,5057,50.23,11650,5786,49.67,7224,3561,49.29,3310,1591,48.07,1368,673,49.2,395,190,48.1 +110,Undying,str,"Support, Durable, Disabler, Nuker",3170,1620,51.1,19403,10116,52.14,40582,21110,52.02,40850,21182,51.85,23985,12454,51.92,10395,5389,51.84,4541,2336,51.44,2064,1012,49.03 +111,Ursa,agi,"Carry, Durable, Disabler",2801,1273,45.45,15132,7038,46.51,33269,15478,46.52,40822,19264,47.19,29348,14011,47.74,15262,7375,48.32,7507,3622,48.25,3004,1473,49.03 +112,Vengeful Spirit,all,"Support, Initiator, Disabler, Nuker, Escape",2186,1108,50.69,15817,8285,52.38,41843,21809,52.12,57524,30476,52.98,45512,24120,53.0,25581,13382,52.31,13758,7121,51.76,8276,4303,51.99 +113,Venomancer,all,"Support, Nuker, Initiator, Pusher, Disabler",2309,1187,51.41,14669,7463,50.88,34787,18020,51.8,41797,21690,51.89,28706,15085,52.55,13974,7338,52.51,6538,3495,53.46,2794,1459,52.22 +114,Viper,agi,"Carry, Durable, Initiator, Disabler",4100,2057,50.17,18991,9510,50.08,33517,16923,50.49,32728,16677,50.96,18537,9427,50.86,7851,3928,50.03,3260,1652,50.67,1176,610,51.87 +115,Visage,all,"Support, Nuker, Durable, Disabler, Pusher",331,171,51.66,1638,813,49.63,3240,1577,48.67,3840,1986,51.72,3108,1609,51.77,1995,1055,52.88,1309,702,53.63,858,457,53.26 +116,Void Spirit,all,"Carry, Escape, Nuker, Disabler",1565,727,46.45,8672,4096,47.23,20010,9694,48.45,25213,12376,49.09,18817,9231,49.06,10026,4920,49.07,4788,2319,48.43,2006,964,48.06 +117,Warlock,int,"Support, Initiator, Disabler",2547,1369,53.75,18931,10331,54.57,49795,26999,54.22,66697,36220,54.31,48401,25668,53.03,24999,12942,51.77,12575,6356,50.54,6183,2934,47.45 +118,Weaver,agi,"Carry, Escape",2818,1389,49.29,13873,6770,48.8,23493,11571,49.25,21545,10694,49.64,12911,6427,49.78,5809,2928,50.4,2960,1455,49.16,1303,719,55.18 +119,Windranger,all,"Carry, Support, Disabler, Escape, Nuker",3861,1814,46.98,19934,9223,46.27,40644,18807,46.27,44476,20652,46.43,28952,13508,46.66,13418,6297,46.93,5898,2782,47.17,2374,1142,48.1 +120,Winter Wyvern,all,"Support, Disabler, Nuker",821,371,45.19,5168,2424,46.9,10544,5014,47.55,11184,5308,47.46,7426,3512,47.29,3730,1854,49.71,1862,934,50.16,944,464,49.15 +121,Witch Doctor,int,"Support, Nuker, Disabler",7504,4173,55.61,45501,25616,56.3,99664,54963,55.15,111382,60421,54.25,71830,37860,52.71,33164,17334,52.27,14610,7442,50.94,4196,2076,49.48 +122,Wraith King,str,"Carry, Support, Durable, Disabler, Initiator",4175,2266,54.28,26362,14516,55.06,58733,32403,55.17,66283,36503,55.07,42360,23083,54.49,19084,10251,53.72,8334,4315,51.78,2707,1376,50.83 +123,Zeus,int,"Nuker, Carry",4132,2106,50.97,23721,12487,52.64,51568,27475,53.28,58333,31078,53.28,37821,20047,53.0,17901,9504,53.09,8539,4459,52.22,3400,1791,52.68 diff --git a/belyaeva_ekaterina_lab_3/README.md b/belyaeva_ekaterina_lab_3/README.md new file mode 100644 index 0000000..9ccb8b0 --- /dev/null +++ b/belyaeva_ekaterina_lab_3/README.md @@ -0,0 +1,35 @@ +## Задание + +Решите с помощью библиотечной реализации дерева решений задачу из лабораторной работы «Веб-сервис «Дерево решений» по предмету «Методы искусственного интеллекта»на 99% ваших данных. Проверьте работу модели на оставшемся проценте, сделайте вывод + + +## Как запустить лабораторную +Запустить файл main.py +## Используемые технологии +Библиотеки pandas, scikit-learn, их компоненты +## Описание лабораторной (программы) +Данный код берет данные из датасета о персонажах Dota 2, где описаны атрибуты персонажей, их роли, название, и как часто их пикают и какой у них винрейт на каждом звании в Доте, от реркута до титана. + +В моем случае была поставлена задача определить винрейт персонажа на ранге рекрут в зависимости от его атрибута, роли (я взяла 2 - саппорт или керри), и того, как часто его берут на рекрутах. + +Программа берет столбцы Herald Win Rate, Primary Attribute, Herald Picks и Roles, далее проводит фильтрацию столбца Roles и выбирает тех персонажей, у которых есть роль support или carry. Затем создает +два новых столбца - isCarry и isSupport, так как в столбце Roles несколько значений и его нужно удалить. + +Затем данные делятся на обучающую и тестовую выборки и выясняется зависимость винрейта от остальных признаков. + +В конце программа выводит, насколько важны были выбранные признаки при определении винрейта и точность модели. + + +## Результат + +В результате получаем следующее: + +Feature Importances: [0.08035262 0.82893841 0.00453277 0.08617619] +Score: 0.23055568233652535 + +Вывод: самым значимым признаком при определении винрейта стал признак Primary Attribute. На фоне других признаков его значимость сильно выделяется, все остальные признаки уже играют очень маленькую роль. + +Точность модели вышла относительно низкой, но это легко объясняется тем, что в Доте невозможно точно предсказать винрейт персонажа, основываясь на подобных признаках. Винрейт предсказывается только лишь тем, какие персонажи сильны в данной мете, что зависит от их скиллов и изменений патча, не описанных в датасете (но и нет такого датасета, где они могли бы быть описаны). + +Тем не менее, данная программа дала понять, что на рекрутах на винрейт персонажа сильно влияет его главный атрибут. + diff --git a/belyaeva_ekaterina_lab_3/main.py b/belyaeva_ekaterina_lab_3/main.py new file mode 100644 index 0000000..8a98121 --- /dev/null +++ b/belyaeva_ekaterina_lab_3/main.py @@ -0,0 +1,47 @@ +import pandas as pd +from sklearn.tree import DecisionTreeRegressor +from sklearn.model_selection import train_test_split + +# Загрузка данных +data = pd.read_csv("Current_Pub_Meta.csv") + +# Отбор нужных столбцов +selected_columns = ['Herald Win Rate', 'Primary Attribute', 'Herald Picks', 'Roles'] +data = data[selected_columns] + +# Фильтрация по ролям Carry и Support +data = data[data['Roles'].apply(lambda x: 'Carry' in x or 'Support' in x)] + +# Создание столбцов для каждой роли и заполнение их значениями 1 или 0 +data['IsCarry'] = data['Roles'].apply(lambda x: 1 if 'Carry' in x else 0) +data['IsSupport'] = data['Roles'].apply(lambda x: 1 if 'Support' in x else 0) + +# Удаление столбца Roles +data.drop('Roles', axis=1, inplace=True) + +# Замена категориальных переменных на числовые +data['Primary Attribute'] = data['Primary Attribute'].map({'str': 0, 'all': 1, 'int': 2, 'agi': 3}) + +# Разделение данных на обучающую и тестовую выборки +X = data.drop('Herald Win Rate', axis=1) +y = data['Herald Win Rate'] +X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42) + +# Обучение модели +model = DecisionTreeRegressor() +model.fit(X_train, y_train) + +# Прогноз на тестовой выборке +y_pred = model.predict(X_test) + +# Вывод обработанных данных +print("Обработанные данные:") +print(data) + +# Оценка значимости признаков +feature_importances = model.feature_importances_ +print("Feature Importances:", feature_importances) + +# Оценка score модели +score = model.score(X_test, y_test) +print("Score:", score) \ No newline at end of file -- 2.25.1