e1=[0.6286408520623922, 0.6289525825569178, 0.5412940012637213, 0.5399199822334315, 0.49756061144296837, 0.5386496534421491, 0.5110201664171742, 0.4785323556159, 0.4879992233852226, 0.49388898393628267, 0.4227883738901349, 0.47665407322957315, 0.49194537115508497, 0.4784480810071889, 0.5067394759922192, 0.4815508310174932, 0.4480058931682556, 0.5191713001759654, 0.5025600642057176, 0.47646282461622946, 0.4620775882390643, 0.5346632906032827, 0.4886131751452513, 0.5068477238076842, 0.4455982578380637, 0.5182468309511442, 0.5194051409981214, 0.5102047452714895, 0.4224846316777891, 0.4369363754766283, 0.47643414498658937, 0.5205363676955092, 0.5191792358482716, 0.43761845483213274, 0.4410680839960249, 0.5124071742830791, 0.5298468258800075, 0.5061098855038695, 0.48256532980818484, 0.4913228065366606, 0.4972612354925298, 0.4978721811109297, 0.4054224929939014, 0.4689590445321974, 0.47656007392483984, 0.4383041892763407, 0.44729094116756796, 0.4355191217281943, 0.39603253338464445]
e2=[0.6445889256767168, 0.6535514888883678, 0.650516819829064, 0.5756429937727983, 0.6142765741620072, 0.5835705610683382, 0.5912615393329274, 0.6146589955098392, 0.6122305885006271, 0.615096288252815, 0.5755860024839088, 0.544477825409265, 0.5426761288272395, 0.5468697195293689, 0.564680589127484, 0.5771165305986262, 0.5684633735633585, 0.5680884419879598, 0.5612183060968275, 0.559276953305883, 0.43673818405890585, 0.4411540650165362, 0.4598893136551889, 0.43005624189179076, 0.45188026405543275, 0.47144659911395703, 0.5244689044281716, 0.41605587984112, 0.4556096201350907, 0.46408102111806254, 0.4693180656437913, 0.4268421245136888, 0.4412494204726097, 0.39367845982910615]
e3=[0.662780905315912, 0.557526130143123, 0.5584640419156808, 0.5344490232122784, 0.593609022343057, 0.4937605123293818, 0.49679500580245917, 0.6381938409925619, 0.4969497574371143, 0.5490326065330788, 0.6127879707910444, 0.5089002055028583, 0.5504401226212559, 0.6142692709979238, 0.5721990951978606, 0.5018530856716944, 0.48248730823997454, 0.5393567930056656, 0.41791994591838755, 0.5305910774126542, 0.561185300298215, 0.595460105472618, 0.5115104804811111, 0.4495276525911773, 0.43500401066793454, 0.4161182946891324, 0.42475182877301493, 0.5073871378890902, 0.47263913226342963, 0.5149631515053271, 0.598002020559863, 0.41349915170939194, 0.47894825230795474, 0.5622578158963416, 0.5723435539368699, 0.4462502586322237, 0.4093627693814017, 0.5492960278816822, 0.510461265579312, 0.5808173512459651, 0.5597837733339822, 0.5640112157072309, 0.44698468041157, 0.5070970659950728, 0.48072844551751587, 0.5272173485178996, 0.5376622571610833, 0.5735053315795404, 0.4092035721307091, 0.5440903033836487, 0.5011121569382986, 0.5527630387469133, 0.4941897766576979, 0.470192162722345, 0.47418095121567044, 0.48084680432628457, 0.4239088964655666, 0.46940819486126134, 0.4537334210540194, 0.4864943090841813, 0.4687166558652696, 0.49614205816549944, 0.42874339930129546, 0.4479324170994075, 0.40787039901158556, 0.48786153290305956, 0.40963323764273557, 0.4352159063157325, 0.4888689022690961, 0.47162666268555464, 0.44671000444880116, 0.4967216183541344, 0.4012512434083865, 0.46064594635128436, 0.4049871203999046, 0.47170955324407465, 0.48706359188208187, 0.39931433341039707]
e4=[0.631157721764274, 0.626369631668824, 0.6435168046798363, 0.5756890928745755, 0.6805477459512386, 0.5457392115779026, 0.6670013898692743, 0.571441632419972, 0.5711226503295723, 0.5043703755755192, 0.5133700170618634, 0.4890578230830625, 0.48377985095373055, 0.5401161872295855, 0.5231897730483787, 0.5224417136122825, 0.48197008488419696, 0.5430021431008605, 0.48585065976376307, 0.4947049468193294, 0.5128519566834271, 0.5111700349984294, 0.5021240973161041, 0.44473351723091004, 0.5387269935977932, 0.5000663192282513, 0.47768543276690545, 0.4804686186752253, 0.5298907808582913, 0.4752329625280757, 0.44839780034261145, 0.4701039454704951, 0.4918735308810149, 0.4728677770754973, 0.4576550851711339, 0.502450222085708, 0.5163739719069254, 0.5213008138551934, 0.4652131556745651, 0.49846654870033724, 0.5137510967641185, 0.5446460345322064, 0.47656732480459313, 0.4516336465509245, 0.5271248472630446, 0.4559450905739887, 0.49738101909129345, 0.5253791961349298, 0.5135150601261252, 0.44079823430873305, 0.5324834268850102, 0.5035609323350201, 0.5182742329465138, 0.5504791701670207, 0.531284676694358, 0.474503007577341, 0.5366327134778044, 0.5011612366374507, 0.5127348471786759, 0.5019671684236049, 0.44189963776688185, 0.46295316911159845, 0.5348905595183858, 0.5269112370262575, 0.5090272490103386, 0.47609522731817105, 0.491370758355211, 0.4135600347595616, 0.4818512230353636, 0.512062390185624, 0.47933046522657563, 0.4934857435730518, 0.4806171151139013, 0.4608250672563326, 0.41268520144053455, 0.4918494520803791, 0.46745210963432454, 0.48071324978066593, 0.5057204328529747, 0.4996037331029218, 0.5413217090462604, 0.4508761552721001, 0.47468589579687376, 0.5642027975890482, 0.41545508292293726, 0.48314552116470366, 0.3997297679560264]
e5=[0.6682606140119535, 0.5778862814702397, 0.571284816447605, 0.5732217554886555, 0.576681243443929, 0.5696738503322155, 0.561619312862779, 0.5550863827708744, 0.5376039510952384, 0.5209829601641807, 0.5787276254893167, 0.5649896199922552, 0.5685287073392442, 0.4857622856463922, 0.5184760505457569, 0.5477220163966926, 0.5677443951422002, 0.546248508606815, 0.48857192683520445, 0.4844910863766792, 0.4503989103757882, 0.42963829512934754, 0.36462205360641897]
e6=[0.6052190978338532, 0.6168189279264902, 0.5742753886203199, 0.5916751574417829, 0.6499174495644433, 0.5572021688155816, 0.5875677462728359, 0.5882764329669297, 0.42224941745738764, 0.46388965858198655, 0.46894811449133583, 0.5386172982477864, 0.445138792658842, 0.5659195198584153, 0.4280846453576261, 0.5081342706424578, 0.591777700219891, 0.4300014148912618, 0.44029194146143813, 0.4655751631352384, 0.5144871176051569, 0.4302597905571364, 0.47086406673852405, 0.42197278841497904, 0.5666806007720256, 0.4684396130328333, 0.46515501410751087, 0.5854247908909535, 0.46820092150107384, 0.4542753960527196, 0.5136825397873981, 0.42490230795806355, 0.5681653948495334, 0.4982418526291404, 0.5297805255166854, 0.5255641991721257, 0.46604946752584037, 0.42125778606643877, 0.5572774702893012, 0.4857469072821239, 0.46583437875598993, 0.49471480783108884, 0.4960882334145554, 0.464275426856948, 0.4227442887486467, 0.4736773611229292, 0.49004926134414617, 0.49931503682149486, 0.4988062267806028, 0.49268082475005154, 0.4488809454972674, 0.5174211905808321, 0.42898509257033995, 0.41935662991751776, 0.4804755068098414, 0.5517276889852001, 0.6108761441851374, 0.5106562598517737, 0.5707976053860792, 0.5431404102118769, 0.610686118237394, 0.5640443974179815, 0.45304879473737386, 0.5000248112364134, 0.4302734132332332, 0.48721656167805666, 0.5295429629785897, 0.46752394358529753, 0.6145431584915981, 0.50988218844425, 0.49915956989048965, 0.5278205896473646, 0.620852541372503, 0.4237926102741802, 0.42282174131809014, 0.4208938526055965, 0.487461524736154, 0.4753131817344044, 0.4822918616140902, 0.44156923779603763, 0.41871631240516527, 0.46848062331449036, 0.46980532334976366, 0.4709761803139777, 0.3976063267327049]
e7=[0.6343177780040268, 0.619599304033062, 0.6242120198917819, 0.6031668480623487, 0.6402201060305929, 0.6231041583237609, 0.6293624185342378, 0.6458794486207945, 0.6827538772276097, 0.6720506480634977, 0.6899104720222323, 0.669870406811187, 0.6512371597807493, 0.6920056581481943, 0.5914131484170293, 0.6232179447484109, 0.5801354474941912, 0.6763159966305158, 0.56685784250218, 0.6637311529482484, 0.5847709695092046, 0.5633961429876598, 0.560108233954407, 0.52832327254978, 0.5283157800182223, 0.49202826266850064, 0.46519065544218025, 0.458531046376133, 0.48787502470038335, 0.4633186448926279, 0.5231878042415427, 0.5232549990667295, 0.45401437184614385, 0.4628743973973229, 0.46133926646432816, 0.4803737244518355, 0.4908663462940766, 0.47381789765142834, 0.46783045177687643, 0.46850374045145793, 0.4681717836248394, 0.4664232598009578, 0.475161204989716, 0.4698246364777594, 0.46279370428901806, 0.47086318835181673, 0.47130924184490053, 0.48004062896072147, 0.5380318909358003, 0.522459093653992, 0.5086512464786042, 0.4940124113230001, 0.5084629644805148, 0.49907221807047564, 0.5060149840853123, 0.5399783523243797, 0.5411928928687932, 0.5080996494638225, 0.49238446160879457, 0.5090379936341687, 0.4514971394109261, 0.5069246117398007, 0.5122056635240435, 0.5183315031961354, 0.5247657452974124, 0.5358356076290758, 0.5328220546034671, 0.5280624432744783, 0.5274743097746725, 0.4975618714767399, 0.49785887670110296, 0.5172247834730592, 0.5139599573220014, 0.5470670151810273, 0.5289727214355933, 0.5291905638247228, 0.4802756837124825, 0.5105438294031261, 0.4966151637696548, 0.4622230385770683, 0.5028894815058449, 0.5204636049862856, 0.46890755144793184, 0.536715875218253, 0.5287019172764743, 0.49212818638466355, 0.4978716350387547, 0.47170291861259944, 0.537535312754868, 0.5285083683899722, 0.5435672463104038, 0.5362293614488318, 0.48409470635156077, 0.45942009997388766, 0.5383618196483511, 0.5066198888774862, 0.5322328585016302, 0.5380757401024095, 0.5307318705952703, 0.49557513053245256, 0.540221765590457, 0.5319199897476646, 0.4425432496155992, 0.5424946438115121, 0.4967073166823288, 0.522464533354847, 0.48612498629064954, 0.5236114041318946, 0.5270520927976627, 0.5375392206453816, 0.49356780560525965, 0.5055856811585618, 0.5432119154861312, 0.5048427773577933, 0.45663313202496075, 0.45486778712936404, 0.44971790073868045, 0.5149780350294215, 0.5083240728859777, 0.44894944420421445, 0.5042145757006968, 0.48460426559739705, 0.4967351042896734, 0.5044661611141689, 0.43596825173934706, 0.5746881408014808, 0.5560117818174737, 0.48581143997140513, 0.4178848063830119, 0.4124531613792558, 0.41128625935257995, 0.5130877411153815, 0.5702506434152459, 0.5191608795298068, 0.40421862548733356, 0.49370921494417785, 0.47747102686452786, 0.4501159143626001, 0.42434966281242287, 0.5694928908915956, 0.4707648838018859, 0.46308786979076044, 0.5674826460753027, 0.41319744667993896, 0.43378581408673195, 0.5479508775304427, 0.42830800640058475, 0.5040567675034388, 0.5102932814824029, 0.5352098084517855, 0.4711907835610163, 0.4135569939522152, 0.5645434706974641, 0.39392153030740434]
e8=[0.5913407969216123, 0.5968027045561548, 0.5807132242546393, 0.6045555424432444, 0.5790465745724817, 0.5146519574308367, 0.5386476154031689, 0.5457725039582826, 0.5544308346069118, 0.5435916500554991, 0.5640535382781875, 0.5419371097075426, 0.5441329113708785, 0.5580210026385325, 0.539490557893939, 0.5427861674156166, 0.5546224894721118, 0.5497072631021152, 0.5562272792102939, 0.5191799008595017, 0.5651000039656113, 0.5648645310545621, 0.5442534059819037, 0.5442239567027761, 0.5569325490735977, 0.5570671528470494, 0.5707478917193466, 0.5520669114088126, 0.5560904525558917, 0.536186225898877, 0.567669985618328, 0.5404920496327675, 0.551565557944254, 0.5425809403646311, 0.5557752017202766, 0.5535524873136072, 0.54511963019625, 0.5578999806184163, 0.5430200803197988, 0.5600545158472466, 0.5495828613081718, 0.554367532743426, 0.5492933831513049, 0.5571854750471325, 0.542362247911772, 0.5480834794851243, 0.5262099870228901, 0.48032788936449317, 0.4782151124259759, 0.49380543526049225, 0.5064807825285621, 0.4947974190672037, 0.4937050456318475, 0.49423348593034644, 0.4934758389741058, 0.5088370646749851, 0.4945296999162127, 0.4980231753465324, 0.4966765276873942, 0.4921028081643773, 0.515243532046272, 0.505921332289337, 0.5040872928584723, 0.4934447759396242, 0.5075192382266717, 0.5097597347103172, 0.4742844879083192, 0.5442708524819456, 0.4999348179754739, 0.461829856728611, 0.4705040366840693, 0.4903857708284842, 0.4924730661893619, 0.5134988021147889, 0.4923443029208326, 0.4727467433790539, 0.5225885499341563, 0.47025597023306087, 0.49101448323887475, 0.5430488000164548, 0.46579466193938523, 0.5151981816002086, 0.5429112242988399, 0.5038012282289347, 0.524662590969537, 0.4958443962133329, 0.4577390007625348, 0.5445978798228361, 0.502963558160195, 0.4894387668322627, 0.5440032976839626, 0.4819860916037589, 0.4654945753767531, 0.5152589293772628, 0.49937169712317414, 0.4864882370386736, 0.4507856824420945, 0.46654016177363283, 0.5097213545853928, 0.5404550468061052, 0.5419278186965883, 0.4495814173506067, 0.5153273272247367, 0.45098667264602854, 0.46487961539249983, 0.5234411744015217, 0.5336811462704812, 0.4455712071824399, 0.5365523056268828, 0.5121995525704492, 0.4736035794709903, 0.4473335804233988, 0.4906554048692217, 0.43056341428429684, 0.48750676622735406, 0.46975202791639503, 0.41985163165128453, 0.42365061155579714, 0.46134934441088365, 0.46918184061159246, 0.4432015336494499, 0.4720567531651249, 0.4683567090279011, 0.42967603770654866, 0.4236602081687182, 0.4135466892675132, 0.45815086391436777, 0.3967556123885781]
e9=[0.6650768332261353, 0.5839188975158505, 0.5465120888927283, 0.5550907987683472, 0.567639764704636, 0.5085926678869052, 0.5275917470790742, 0.541221468537061, 0.5704477431835283, 0.5448885505140948, 0.5132874077181068, 0.5101701010115886, 0.5310406275923955, 0.5454947990050796, 0.5625857434190685, 0.5159442036807962, 0.5988034093157687, 0.5943047004640979, 0.551393955716915, 0.5233365342078535, 0.4752450983304961, 0.5050691325599479, 0.5235954093501491, 0.4552512305179317, 0.5831833398610338, 0.4731778439749536, 0.5687028273171127, 0.5889767650973098, 0.6064331743720209, 0.440816151178571, 0.448903119770252, 0.44343653750230294, 0.5001408741585447, 0.49118657617553213, 0.467956850971661, 0.4825464062978623, 0.5399849464121956, 0.47311507777648387, 0.4968562934355171, 0.46528754202033956, 0.5009424715411169, 0.4498238228474625, 0.5111711895467378, 0.46172956095965534, 0.48795037350222076, 0.49779900451624604, 0.41431572809038547, 0.5548793389362827, 0.5592370825347295, 0.47399601371736727, 0.5362121023064179, 0.5389262776700031, 0.48785242517507516, 0.48497470394201003, 0.48853758754813664, 0.452062814504457, 0.48515275520764484, 0.5178452313538177, 0.4370453782697105, 0.5143343530357027, 0.4733976407685126, 0.4377874336752083, 0.4225158612975633, 0.4079474669212051, 0.5525408255038543, 0.5199513551123233, 0.4448075381183994, 0.4889228086780745, 0.5444860707172519, 0.5482472432312546, 0.4715690031152096, 0.5860841514937343, 0.48233223561238736, 0.5260061348833885, 0.5273267432013465, 0.5210076022602085, 0.5551322110634548, 0.43377446518549584, 0.5930831673002215, 0.47734011874861937, 0.5223724082746285, 0.46364564600104363, 0.49103227014858114, 0.5078208924726832, 0.5142013832446156, 0.42539199248715004, 0.573131639889572, 0.4196562315745191, 0.5830005193887268, 0.5093072734962075, 0.5148966644389248, 0.4243085194017081, 0.6687310583399344, 0.46364319971652684, 0.49546870554391054, 0.5366528704484373, 0.5198103049962106, 0.5387543007216663, 0.582636034027522, 0.5363235009290618, 0.48327522215619056, 0.541926394132778, 0.5559785869462495, 0.6016761352697166, 0.5371624283020867, 0.5674319149578625, 0.5300704977548727, 0.5547608427601932, 0.4798895004992304, 0.4660034751436862, 0.524066221672807, 0.48431688551826535, 0.4902196506170733, 0.540522649117206, 0.4411247935696716, 0.5057168246330429, 0.6111460839056243, 0.5640026472940163, 0.5352351126005239, 0.43094285001997823, 0.5156524893462651, 0.43502378139170633, 0.4967973382630091, 0.49812092740202074, 0.5167071715045539, 0.5532030008701334, 0.5617041929433927, 0.5188911940730441, 0.5743757589835153, 0.5189928236553618, 0.4380557607907093, 0.5418787229350316, 0.44821135345496893, 0.5310716701733434, 0.5461678917843644, 0.519134739798097, 0.5511987988747173, 0.5773381630359999, 0.5233184425743422, 0.49873902095696, 0.5038420863478974, 0.5758701606630139, 0.5551576247842767, 0.5159133205832385, 0.5433872211476676, 0.5233134104986293, 0.5134074229814606, 0.49244212787856195, 0.5004507865528482, 0.5177767871179224, 0.5125121555910681, 0.5202937524719504, 0.5158894931633854, 0.518259284945597, 0.49879019957162246, 0.5138751753512852, 0.5193327327927922, 0.520053378362557, 0.4996759240244054, 0.5307492186079692, 0.5321791654099939, 0.512370357644313, 0.5051488492226954, 0.5155795339277843, 0.5850895438525353, 0.49333688234630446, 0.5146387574915534, 0.5152962059410358, 0.4916785527685588, 0.5220270697847215, 0.5108044898684504, 0.5225887670058841, 0.5054755192744912, 0.5200111921446353, 0.6186353617217828, 0.5162420347066328, 0.48991362080819656, 0.49458247546427553, 0.5310543800879368, 0.49156501831817023, 0.5209129827957445, 0.5071274285234982, 0.514889685151172, 0.4876652826616725, 0.5176711547960228, 0.501579488061985, 0.5219832016573605, 0.5211421406724956, 0.6102793042683985, 0.5092234796765647, 0.505841113259587, 0.5191361626567386, 0.509224562794439, 0.5095766326615782, 0.502079751965955, 0.5127003003234921, 0.5099580442929842, 0.5107503813960915, 0.5886776852182013, 0.5220688084678431, 0.5280708084273058, 0.5097898025489782, 0.5047902080968601, 0.5005626889772651, 0.596540291245381, 0.4996027048629127, 0.4934349312367303, 0.5409843332211969, 0.5017001340834972, 0.5094353513995228, 0.5170367406199069, 0.530769105638814, 0.5176185091437396, 0.5094759296400767, 0.5193568466416617, 0.4989014112392066, 0.5279480159795279, 0.5029211093859308, 0.5002122616570341, 0.5009459192487525, 0.5161268696467814, 0.5122714761320836, 0.4996834477594777, 0.5003828952897394, 0.5152310440552359, 0.5268164219017487, 0.4977712336603499, 0.5046063697037492, 0.5049611779603863, 0.471537858447829, 0.426280740636709, 0.4063048376824669, 0.4556689882653091, 0.429043458117716, 0.46098399335733065, 0.4783089903682395, 0.4548024144447215, 0.46235139284638144, 0.4855141050547884, 0.4525664843675803, 0.4752750869575304, 0.39445032834640115]
e10=[0.6443296151657899, 0.5846714977547917, 0.5672715023778702, 0.5730989175581916, 0.5384647413211849, 0.645025012113611, 0.5818761835357733, 0.5485799801801237, 0.5470440562426591, 0.6848038874433044, 0.5762873974699276, 0.5210875247502859, 0.5840268965938661, 0.5996170002320559, 0.5675317667073588, 0.530705152494162, 0.43856855545184587, 0.5336486205176295, 0.5041957778265646, 0.5331599343293132, 0.4638759111952121, 0.5702342410880747, 0.4641523004965677, 0.49632076472769915, 0.4134526096867966, 0.6395538621427509, 0.5807024881555874, 0.54209316417008, 0.4917106519049478, 0.5746860150482541, 0.4903252002874721, 0.407509811691121, 0.41193636837385816, 0.5197750790448739, 0.5015629445346276, 0.5122720293420352, 0.5089435162867448, 0.479120258101935, 0.9612299362567398, 0.5322306367524896, 0.5408316328291428, 0.5005022853080526, 0.40517976682543727, 0.4738710242232649, 0.5853321607871663, 0.6350323074683683, 0.6220323108115962, 0.5756956691561051, 0.5785318277560356, 0.5495550621945828, 0.6706174816054492, 0.6379782769471595, 0.7984002265429345, 0.5819019958048154, 0.565515984004764, 0.585069528132984, 0.7163610180148806, 0.5907315843404257, 0.5649416080557663, 0.5797493081636891, 0.5929644452090546, 0.7590981885358427, 0.6029722793981109, 0.753962026409037, 0.6612429927176287, 0.5633060981382474, 0.6934616792472114, 0.599324234927781, 0.6621616927728853, 0.5921192185054662, 0.43641299280375273, 0.5122249502827196, 0.409546418406672, 0.42286517450873307, 0.6224070628071293, 0.5023519159195332, 0.5663255019772804, 0.5678506389375136, 0.464807663895237, 0.4602657015700848, 0.41183164602462163, 0.4275251302283884, 0.5801912671155873, 0.5318028256314792, 0.5397358271202957, 0.4531821739411755, 0.44849727924771193, 0.46869408154450576, 0.4549633610858585, 0.4462452859369011, 0.524381047614326, 0.379113122281514]
# errors = [e1, e2, e3, e4, e5, e6, e7, e8, e9]
errors = [e1, e4, e2]

import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns

fig = plt.figure(figsize=(20, 10))
sns.set()
plt.xlabel("The number of iterations", fontsize=30)
plt.ylabel("Error", fontsize=30)
plt.xticks(fontsize=20)
plt.yticks(fontsize=20)
for ier, er in enumerate(errors):
    lens = len(er)
    plt.plot(range(lens), er, label="Error rate in the training process.")
# plt.legend(fontsize=20)
plt.title("Error tranisition during the training process.", fontsize=30)
plt.show()

figure = plt.figure(figsize=(10, 10))
plt.boxplot([0.9473684210526315, 0.7894736842105263, 0.8947368421052632, 0.8947368421052632, 0.7894736842105263, 0.8947368421052632, 0.6842105263157895, 0.7368421052631579, 0.8888888888888888, 0.7777777777777778])
plt.title("Result of 10 cross validation", fontsize=20)
plt.xlabel("MUTAG experiment", fontsize=20)
plt.tick_params(labelsize=14)
plt.ylabel("Accuracy", fontsize=20)

e3s=[0.6114993145170406, 0.5580492397062562, 0.551723552407508, 0.5484116800260197, 0.5143462721841497, 0.628101523805724, 0.5356993571948219, 0.5266942280148578, 0.5141310873542365, 0.5638829554297106, 0.5496228055765812, 0.6360133689458043, 0.5201943196959011, 0.5481851459170456, 0.5055907141722972, 0.4941810064365272, 0.49340466605586575, 0.4634544459337397, 0.4611237576608274, 0.45213919591606666, 0.4534383746210488, 0.5054618981122072, 0.5165870609303926, 0.45209150635940387, 0.46805949776885464, 0.46960440853671903, 0.467819372880231, 0.4741484070294051, 0.4820804390230995, 0.4717719920228282, 0.5693892077112471, 0.5511274894354884, 0.5033156791541581, 0.5225321272437906, 0.5036599855410948, 0.51329297604302, 0.46424100042295025, 0.48893838154754043, 0.491828375814068, 0.5032194807511081, 0.4509417716028073, 0.4795241201436505, 0.5327343558753157, 0.4878793485411833, 0.4968022638355129, 0.47016307388363854, 0.5139168596002424, 0.44169284992918284, 0.4970774248606773, 0.5008123176407452, 0.5167832520763408, 0.5080038420660207, 0.48930759606351343, 0.513371961439122, 0.43260350311028717, 0.4378572126596461, 0.44645119576095627, 0.43974257495457336, 0.44501068910222275, 0.5046275199007141, 0.5248927422341266, 0.5057426950560957, 0.44435592756939385, 0.5028020254976295, 0.43205956750536756, 0.5095266443472911, 0.43189189288242835, 0.48790827272910336, 0.4615726181458669, 0.4708616965051463, 0.44032234603084713, 0.5179107099016528, 0.447553212974451, 0.4866584089091045, 0.5095162013165208, 0.5159928986646231, 0.5044830183103161, 0.4292861696424971, 0.5314628116720455, 0.43598839835680664, 0.4577829631040909, 0.4873913033076141, 0.4503809344508515, 0.484440023394841, 0.48888482964533436, 0.4920285335157382, 0.5073922782465428, 0.44670952906510897, 0.49607219758491355, 0.4308090376369893, 0.5268897603175041, 0.503559006011311, 0.5325591799558704, 0.5112110616324055, 0.4217329296463216, 0.4287457162429004, 0.5387852988261452, 0.5221160368806622, 0.509923902633072, 0.4411366299303317, 0.43803455040269307, 0.5335288104235335, 0.5272146852894581, 0.4602714866419109, 0.4465667728038471, 0.49895069098977923, 0.44450285295324765, 0.5251224372640607, 0.5278343169334901, 0.4596689338797286, 0.5217282828884132, 0.42935151668392935, 0.46706278369369864, 0.511648879842166, 0.49038583458744545, 0.4240684556714285, 0.5085615349599282, 0.4667558025833304, 0.5225293906551759, 0.4791700925332441, 0.42187666877056285, 0.4444577598049048, 0.43180975598120047, 0.47279635019359195, 0.40434165271953953, 0.4567439578687747, 0.4047810725738134, 0.45285436709795845, 0.5106699339221253, 0.41760528844233397, 0.463230639757571, 0.4583953066465225, 0.47033013236271226, 0.46012210399176057, 0.48140415708781703, 0.4471153121689473, 0.485398357745934, 0.4602156421568477, 0.48008157966420123, 0.4202314394133098, 0.504311984447005, 0.4655888166277228, 0.43114982313289985, 0.46496997393407696, 0.46041725990525456, 0.4662905080385762, 0.43186752985533855, 0.5113262759807295, 0.4719745720033306, 0.47791479563461675, 0.46799098060250977, 0.40620578584396677, 0.42314041607019615, 0.4162314065076259, 0.41579571768218204, 0.43814693535584737, 0.47413006835703997, 0.4974571568255316, 0.4935654224734384, 0.48136060672275627, 0.4550978367425495, 0.49706958170713433, 0.44513768595224995, 0.4253361121582329, 0.44381941515869333, 0.4761198169714065, 0.47667447892671105, 0.48046363042033574, 0.5199316709111657, 0.48927857372412814, 0.4808599995841265, 0.49799963296315697, 0.4492087033317719, 0.46986478238223167, 0.506700053418057, 0.4987938011003559, 0.4544414206143903, 0.5377744716063275, 0.5140073014745788, 0.42192876338556845, 0.4486045885520557, 0.42644917513144487, 0.4116325393736495, 0.4322134994562949, 0.476302541798784, 0.48675134068911835, 0.41824997807779385, 0.426746519901415, 0.46480259963728177, 0.5214455692010816, 0.41548303889992255, 0.42933136120094717, 0.4838030541852354, 0.494936691128753, 0.49186212498168014, 0.4217631685828114,
0.45602912462583534, 0.5125161938121239, 0.4457479372848052, 0.46618893650081916, 0.48881100807439615, 0.43768350802896466, 0.4739599720363637, 0.4955716129352989, 0.4804280162630706, 0.48163906724030736, 0.4143071427832678, 0.48475848400436833, 0.44899270858594775, 0.4838938111763643, 0.4848282167826762, 0.4838980545767503, 0.4866190119509327, 0.4717631934896995, 0.5165489359356199, 0.48360361419074716, 0.4804091649028527, 0.5097297759525212, 0.4571519002443824, 0.4452585896454598, 0.4414109845063244, 0.4235666003629125, 0.5153951286649423, 0.4883078008311837, 0.4346874565124854, 0.5005732966822127, 0.417852787993552, 0.4145857127347467, 0.48591110524336795, 0.4345903953415311, 0.41977222100784434, 0.5371283981310165, 0.47305277802964524, 0.44317952697867435, 0.4036964309526516, 0.4581214250541329, 0.5463341411652219, 0.46045127199889063, 0.4501169516101683, 0.4179825918218954, 0.49900783694877715, 0.4892906123586632, 0.42840660739898967, 0.47162708436149237, 0.4345798849491902, 0.47562520954776094, 0.4340927110566402, 0.4313336037367724, 0.4129143693247415, 0.5135537564781154, 0.47204003930970917, 0.4210640712529034, 0.4245605754426493, 0.4743745984824515, 0.48794937883439804, 0.4180700741879826, 0.4912515867736354, 0.4903159358869692, 0.49091273489139003, 0.4327263671175196, 0.5112962766853835, 0.418128526296058, 0.4832865396091334, 0.48082133074596606, 0.4832623410972604, 0.41270459153098055, 0.42109973525643424, 0.4998801209675613, 0.46762469008572893, 0.4799947903769364, 0.4736394640658181, 0.47211493605277344, 0.5287411401320841, 0.5200724040148723, 0.5066205296433474, 0.5127730183590961, 0.44369916589791547, 0.48456698587240804, 0.5051576392479146, 0.5081283632369991, 0.4193870952105006, 0.43548458423797165, 0.5146117075667941, 0.6496553944513833, 0.4143930795231045, 0.4289819520927289, 0.5080801555292406, 0.5131411994688787, 0.43696130146368667, 0.5427646826654766, 0.45345802627109194, 0.5433482910534887, 0.5143319170186181, 0.5097298427495505, 0.5136637813655547, 0.5106507420608952, 0.5548887569702587, 0.7065321055530301, 0.5168715814597589, 0.41794267534812685, 0.43090336510087845, 0.7212155749399769, 0.6165544559697002, 0.46033737106777256, 0.5089387495523169, 0.5253975539361965, 0.5115566116956278, 0.42320202401689294, 0.5246174570570632, 0.6281310330202612, 0.4751536510310882, 0.5950102991564058, 0.4978649425068354, 0.46610446928565485, 0.544534190394418, 0.6016255287956038, 0.5631491919128527, 0.6833236214330077, 0.4110880226407702, 0.4722339929634415, 0.5323749024552461, 0.4891842913332914, 0.6762690545068252, 0.41950833442907715, 0.4876659176727193, 0.6046630614307239, 0.4928000945510993, 0.553452844399436, 0.4511162775004234, 0.47151456349690807, 0.4909478739757076, 0.4918155366451409, 0.4431381515130087, 0.48011543632848297, 0.6012506969150045, 0.4602080508155012, 0.4857964362690456, 0.554271610426304, 0.41699549081779524, 0.4613389595659844, 0.413520621478622, 0.5796217614630786, 0.4849478885457273, 0.405352719966207, 0.4885767886098703, 0.5219683081108104, 0.4626909895475748, 0.5026622317544714, 0.5683235089403735, 0.40180703773062326, 0.41191760583198633, 0.39797130773487593]

plt.plot(range(len(e3s)), e3s)

import numpy as np
from sklearn.decomposition import PCA

predata = []
with open('../result.txt') as f:
    lines = f.readlines()
    for l in lines:
        temp = []
        for lsa in l[1:-2].split(","):
            temp.append(complex(lsa))
        predata.append(temp)
print(predata)

X = np.array(predata, dtype=complex)
reals = []
imags = []
for x in X:
    temp_re = []
    temp_im = []
    for ele in x:
        print(ele.real)
        temp_re.append(ele.real)
        temp_im.append(ele.imag)
    reals.append(temp_re)
    imags.append(temp_im)

labels = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1]

import matplotlib.pyplot as plt
import seaborn as sns
pca = PCA(n_components=2)
reals = pca.fit_transform(reals)
# class 1
group1 = [i for i, j in zip(reals, labels) if j==1]
g1_x, g1_y = [i[0] for i in group1], [i[1] for i in group1]
# class -1
group2 = [i for i, j in zip(reals, labels) if j==-1]
g2_x, g2_y = [i[0] for i in group2], [i[1] for i in group2]
sns.set()
fig = plt.figure(figsize=(15, 10))
plt.scatter(g1_x, g1_y, c="red")
plt.scatter(g2_x, g2_y, c="blue")

pca = PCA(n_components=2)
imags = pca.fit_transform(imags)
# class 1
group1 = [i for i, j in zip(imags, labels) if j==1]
g1_x, g1_y = [i[0] for i in group1], [i[1] for i in group1]
# class -1
group2 = [i for i, j in zip(imags, labels) if j==-1]
g2_x, g2_y = [i[0] for i in group2], [i[1] for i in group2]
sns.set()
fig = plt.figure(figsize=(15, 10))
plt.title("Feature Space before learning")
plt.scatter(g1_x, g1_y, c="red")
plt.scatter(g2_x, g2_y, c="blue")

import numpy as np
from sklearn.decomposition import PCA

predata = []
with open('../result2.txt') as f:
    lines = f.readlines()
    for l in lines:
        temp = []
        for lsa in l[1:-2].split(","):
            temp.append(complex(lsa))
        predata.append(temp)
print(predata)
X = np.array(predata, dtype=complex)
reals = []
imags = []
for x in X:
    temp_re = []
    temp_im = []
    for ele in x:
        print(ele.real)
        temp_re.append(ele.real)
        temp_im.append(ele.imag)
    reals.append(temp_re)
    imags.append(temp_im)

pca = PCA(n_components=2)
reals = pca.fit_transform(reals)
# class 1
group1 = [i for i, j in zip(reals, labels) if j==1]
g1_x, g1_y = [i[0] for i in group1], [i[1] for i in group1]
# class -1
group2 = [i for i, j in zip(reals, labels) if j==-1]
g2_x, g2_y = [i[0] for i in group2], [i[1] for i in group2]
sns.set()
fig = plt.figure(figsize=(15, 10))
plt.scatter(g1_x, g1_y, c="red")
plt.scatter(g2_x, g2_y, c="blue")

pca = PCA(n_components=2)
imags = pca.fit_transform(imags)
# class 1
group1 = [i for i, j in zip(imags, labels) if j==1]
g1_x, g1_y = [i[0] for i in group1], [i[1] for i in group1]
# class -1
group2 = [i for i, j in zip(imags, labels) if j==-1]
g2_x, g2_y = [i[0] for i in group2], [i[1] for i in group2]
sns.set()
fig = plt.figure(figsize=(15, 10))
plt.title("Feature Space before learning")
plt.scatter(g1_x, g1_y, c="red")
plt.scatter(g2_x, g2_y, c="blue")