|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051 |
- {
- "cells": [
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- " --- This is a regression problem ---\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 0.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 0 of size 185 built in 0.09047365188598633 seconds ---\n",
- "[[ 1. 1. 0.33333333 ..., 0.33333333 0.33333333\n",
- " 0.33333333]\n",
- " [ 1. 1. 0.33333333 ..., 0.33333333 0.33333333\n",
- " 0.33333333]\n",
- " [ 0.33333333 0.33333333 1. ..., 1. 1. 1. ]\n",
- " ..., \n",
- " [ 0.33333333 0.33333333 1. ..., 1. 1. 1. ]\n",
- " [ 0.33333333 0.33333333 1. ..., 1. 1. 1. ]\n",
- " [ 0.33333333 0.33333333 1. ..., 1. 1. 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 43.616902\n",
- "With standard deviation: 2.132120\n",
- "\n",
- " Mean performance on test set: 41.620214\n",
- "With standard deviation: 6.453003\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 1.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 1 of size 185 built in 0.1754138469696045 seconds ---\n",
- "[[ 1. 0.8 0.14285714 ..., 0.125 0.125 0.125 ]\n",
- " [ 0.8 1. 0.125 ..., 0.11111111 0.11111111\n",
- " 0.11111111]\n",
- " [ 0.14285714 0.125 1. ..., 0.8 0.8 0.8 ]\n",
- " ..., \n",
- " [ 0.125 0.11111111 0.8 ..., 1. 1. 1. ]\n",
- " [ 0.125 0.11111111 0.8 ..., 1. 1. 1. ]\n",
- " [ 0.125 0.11111111 0.8 ..., 1. 1. 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 40.832861\n",
- "With standard deviation: 3.441465\n",
- "\n",
- " Mean performance on test set: 38.844613\n",
- "With standard deviation: 6.446482\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 2.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 2 of size 185 built in 0.3448960781097412 seconds ---\n",
- "[[ 1. 0.5 0.11111111 ..., 0.07692308 0.07692308\n",
- " 0.07692308]\n",
- " [ 0.5 1. 0.09090909 ..., 0.06666667 0.06666667\n",
- " 0.06666667]\n",
- " [ 0.11111111 0.09090909 1. ..., 0.55555556 0.55555556\n",
- " 0.55555556]\n",
- " ..., \n",
- " [ 0.07692308 0.06666667 0.55555556 ..., 1. 1. 1. ]\n",
- " [ 0.07692308 0.06666667 0.55555556 ..., 1. 1. 1. ]\n",
- " [ 0.07692308 0.06666667 0.55555556 ..., 1. 1. 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 35.746142\n",
- "With standard deviation: 1.611340\n",
- "\n",
- " Mean performance on test set: 35.291451\n",
- "With standard deviation: 4.781298\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 3.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 3 of size 185 built in 0.5539388656616211 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.05555556 0.05555556\n",
- " 0.05555556]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.04761905 0.04761905\n",
- " 0.04761905]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.35714286 0.35714286\n",
- " 0.35714286]\n",
- " ..., \n",
- " [ 0.05555556 0.04761905 0.35714286 ..., 1. 1. 1. ]\n",
- " [ 0.05555556 0.04761905 0.35714286 ..., 1. 1. 1. ]\n",
- " [ 0.05555556 0.04761905 0.35714286 ..., 1. 1. 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 28.464581\n",
- "With standard deviation: 3.001371\n",
- "\n",
- " Mean performance on test set: 29.484499\n",
- "With standard deviation: 3.903507\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 4.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 4 of size 185 built in 0.7706489562988281 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.04347826 0.04166667\n",
- " 0.04347826]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.03846154 0.03703704\n",
- " 0.03846154]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.26315789 0.25 0.26315789]\n",
- " ..., \n",
- " [ 0.04347826 0.03846154 0.26315789 ..., 1. 0.95 0.9 ]\n",
- " [ 0.04166667 0.03703704 0.25 ..., 0.95 1. 0.95 ]\n",
- " [ 0.04347826 0.03846154 0.26315789 ..., 0.9 0.95 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 19.251747\n",
- "With standard deviation: 3.428930\n",
- "\n",
- " Mean performance on test set: 22.669312\n",
- "With standard deviation: 6.280526\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 5.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 5 of size 185 built in 1.015580415725708 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03703704 0.03333333\n",
- " 0.03571429]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.03333333 0.03030303\n",
- " 0.03225806]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.2173913 0.19230769\n",
- " 0.20833333]\n",
- " ..., \n",
- " [ 0.03703704 0.03333333 0.2173913 ..., 1. 0.88461538\n",
- " 0.74074074]\n",
- " [ 0.03333333 0.03030303 0.19230769 ..., 0.88461538 1. 0.85185185]\n",
- " [ 0.03571429 0.03225806 0.20833333 ..., 0.74074074 0.85185185 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 16.886016\n",
- "With standard deviation: 2.605194\n",
- "\n",
- " Mean performance on test set: 21.795626\n",
- "With standard deviation: 5.522502\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 6.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 6 of size 185 built in 1.3330223560333252 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03333333 0.02857143\n",
- " 0.03030303]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.03030303 0.02631579\n",
- " 0.02777778]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.19230769 0.16129032\n",
- " 0.17241379]\n",
- " ..., \n",
- " [ 0.03333333 0.03030303 0.19230769 ..., 1. 0.83870968\n",
- " 0.57142857]\n",
- " [ 0.02857143 0.02631579 0.16129032 ..., 0.83870968 1. 0.71428571]\n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 0.57142857 0.71428571 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 13.109746\n",
- "With standard deviation: 2.584308\n",
- "\n",
- " Mean performance on test set: 20.604920\n",
- "With standard deviation: 5.499831\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 7.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 7 of size 185 built in 1.602663278579712 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03125 0.02564103\n",
- " 0.02631579]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02857143 0.02380952\n",
- " 0.02439024]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17857143 0.14285714\n",
- " 0.14705882]\n",
- " ..., \n",
- " [ 0.03125 0.02857143 0.17857143 ..., 1. 0.8 0.47619048]\n",
- " [ 0.02564103 0.02380952 0.14285714 ..., 0.8 1. 0.56818182]\n",
- " [ 0.02631579 0.02439024 0.14705882 ..., 0.47619048 0.56818182 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 12.015210\n",
- "With standard deviation: 2.592798\n",
- "\n",
- " Mean performance on test set: 20.347932\n",
- "With standard deviation: 5.176314\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 8.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 8 of size 185 built in 1.8121819496154785 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.02325581]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727\n",
- " 0.02173913]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.12820513]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.41666667]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.49019608]\n",
- " [ 0.02325581 0.02173913 0.12820513 ..., 0.41666667 0.49019608 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.798096\n",
- "With standard deviation: 2.130816\n",
- "\n",
- " Mean performance on test set: 19.822797\n",
- "With standard deviation: 5.137687\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 9.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- " --- kernel matrix of path kernel up to 9 of size 185 built in 2.2172586917877197 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.0212766 ]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727 0.02 ]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.11627907]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.38461538]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.45454545]\n",
- " [ 0.0212766 0.02 0.11627907 ..., 0.38461538 0.45454545 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.799656\n",
- "With standard deviation: 2.095494\n",
- "\n",
- " Mean performance on test set: 19.873364\n",
- "With standard deviation: 5.103689\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 10.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 10 of size 185 built in 2.4100613594055176 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.02040816]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727\n",
- " 0.01923077]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.11111111]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.37037037]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.43859649]\n",
- " [ 0.02040816 0.01923077 0.11111111 ..., 0.37037037 0.43859649 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.778685\n",
- "With standard deviation: 2.100015\n",
- "\n",
- " Mean performance on test set: 19.870809\n",
- "With standard deviation: 5.092173\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 11.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 11 of size 185 built in 2.7440149784088135 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.02040816]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727\n",
- " 0.01923077]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.11111111]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.37037037]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.43859649]\n",
- " [ 0.02040816 0.01923077 0.11111111 ..., 0.37037037 0.43859649 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.778685\n",
- "With standard deviation: 2.100015\n",
- "\n",
- " Mean performance on test set: 19.870809\n",
- "With standard deviation: 5.092173\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 12.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 12 of size 185 built in 2.723442316055298 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.02040816]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727\n",
- " 0.01923077]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.11111111]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.37037037]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.43859649]\n",
- " [ 0.02040816 0.01923077 0.11111111 ..., 0.37037037 0.43859649 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.778685\n",
- "With standard deviation: 2.100015\n",
- "\n",
- " Mean performance on test set: 19.870809\n",
- "With standard deviation: 5.092173\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 13.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 13 of size 185 built in 2.6163382530212402 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.02040816]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727\n",
- " 0.01923077]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.11111111]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.37037037]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.43859649]\n",
- " [ 0.02040816 0.01923077 0.11111111 ..., 0.37037037 0.43859649 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.778685\n",
- "With standard deviation: 2.100015\n",
- "\n",
- " Mean performance on test set: 19.870809\n",
- "With standard deviation: 5.092173\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 14.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 14 of size 185 built in 2.629500389099121 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.02040816]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727\n",
- " 0.01923077]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.11111111]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.37037037]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.43859649]\n",
- " [ 0.02040816 0.01923077 0.11111111 ..., 0.37037037 0.43859649 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.778685\n",
- "With standard deviation: 2.100015\n",
- "\n",
- " Mean performance on test set: 19.870809\n",
- "With standard deviation: 5.092173\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 15.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 15 of size 185 built in 2.664158821105957 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.02040816]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727\n",
- " 0.01923077]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.11111111]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.37037037]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.43859649]\n",
- " [ 0.02040816 0.01923077 0.11111111 ..., 0.37037037 0.43859649 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.778685\n",
- "With standard deviation: 2.100015\n",
- "\n",
- " Mean performance on test set: 19.870809\n",
- "With standard deviation: 5.092173\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 16.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 16 of size 185 built in 2.7301340103149414 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.02040816]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727\n",
- " 0.01923077]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.11111111]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.37037037]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.43859649]\n",
- " [ 0.02040816 0.01923077 0.11111111 ..., 0.37037037 0.43859649 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.778685\n",
- "With standard deviation: 2.100015\n",
- "\n",
- " Mean performance on test set: 19.870809\n",
- "With standard deviation: 5.092173\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 17.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 17 of size 185 built in 2.6328580379486084 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.02040816]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727\n",
- " 0.01923077]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.11111111]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.37037037]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.43859649]\n",
- " [ 0.02040816 0.01923077 0.11111111 ..., 0.37037037 0.43859649 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.778685\n",
- "With standard deviation: 2.100015\n",
- "\n",
- " Mean performance on test set: 19.870809\n",
- "With standard deviation: 5.092173\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 18.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- " --- kernel matrix of path kernel up to 18 of size 185 built in 2.592944383621216 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.02040816]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727\n",
- " 0.01923077]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.11111111]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.37037037]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.43859649]\n",
- " [ 0.02040816 0.01923077 0.11111111 ..., 0.37037037 0.43859649 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.778685\n",
- "With standard deviation: 2.100015\n",
- "\n",
- " Mean performance on test set: 19.870809\n",
- "With standard deviation: 5.092173\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 19.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 19 of size 185 built in 2.6368520259857178 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.02040816]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727\n",
- " 0.01923077]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.11111111]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.37037037]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.43859649]\n",
- " [ 0.02040816 0.01923077 0.11111111 ..., 0.37037037 0.43859649 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.778685\n",
- "With standard deviation: 2.100015\n",
- "\n",
- " Mean performance on test set: 19.870809\n",
- "With standard deviation: 5.092173\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 20.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 20 of size 185 built in 2.52734375 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.02040816]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727\n",
- " 0.01923077]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.11111111]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.37037037]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.43859649]\n",
- " [ 0.02040816 0.01923077 0.11111111 ..., 0.37037037 0.43859649 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.778685\n",
- "With standard deviation: 2.100015\n",
- "\n",
- " Mean performance on test set: 19.870809\n",
- "With standard deviation: 5.092173\n",
- "\n",
- "\n",
- " depth rmse_test std_test rmse_train std_train k_time\n",
- "------- ----------- ---------- ------------ ----------- ---------\n",
- " 0 41.6202 6.453 43.6169 2.13212 0.0904737\n",
- " 1 38.8446 6.44648 40.8329 3.44147 0.175414\n",
- " 2 35.2915 4.7813 35.7461 1.61134 0.344896\n",
- " 3 29.4845 3.90351 28.4646 3.00137 0.553939\n",
- " 4 22.6693 6.28053 19.2517 3.42893 0.770649\n",
- " 5 21.7956 5.5225 16.886 2.60519 1.01558\n",
- " 6 20.6049 5.49983 13.1097 2.58431 1.33302\n",
- " 7 20.3479 5.17631 12.0152 2.5928 1.60266\n",
- " 8 19.8228 5.13769 10.7981 2.13082 1.81218\n",
- " 9 19.8734 5.10369 10.7997 2.09549 2.21726\n",
- " 10 19.8708 5.09217 10.7787 2.10002 2.41006\n",
- " 11 19.8708 5.09217 10.7787 2.10002 2.74401\n",
- " 12 19.8708 5.09217 10.7787 2.10002 2.72344\n",
- " 13 19.8708 5.09217 10.7787 2.10002 2.61634\n",
- " 14 19.8708 5.09217 10.7787 2.10002 2.6295\n",
- " 15 19.8708 5.09217 10.7787 2.10002 2.66416\n",
- " 16 19.8708 5.09217 10.7787 2.10002 2.73013\n",
- " 17 19.8708 5.09217 10.7787 2.10002 2.63286\n",
- " 18 19.8708 5.09217 10.7787 2.10002 2.59294\n",
- " 19 19.8708 5.09217 10.7787 2.10002 2.63685\n",
- " 20 19.8708 5.09217 10.7787 2.10002 2.52734\n",
- "\n",
- " --- This is a regression problem ---\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 0.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 0 of size 185 built in 0.1027534008026123 seconds ---\n",
- "[[ 1. 1. 0.33333333 ..., 0.33333333 0.33333333\n",
- " 0.33333333]\n",
- " [ 1. 1. 0.33333333 ..., 0.33333333 0.33333333\n",
- " 0.33333333]\n",
- " [ 0.33333333 0.33333333 1. ..., 1. 1. 1. ]\n",
- " ..., \n",
- " [ 0.33333333 0.33333333 1. ..., 1. 1. 1. ]\n",
- " [ 0.33333333 0.33333333 1. ..., 1. 1. 1. ]\n",
- " [ 0.33333333 0.33333333 1. ..., 1. 1. 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 42.787136\n",
- "With standard deviation: 0.675806\n",
- "\n",
- " Mean performance on test set: 42.645892\n",
- "With standard deviation: 6.560629\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 1.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 1 of size 185 built in 0.18301701545715332 seconds ---\n",
- "[[ 1. 0.8 0.14285714 ..., 0.125 0.125 0.125 ]\n",
- " [ 0.8 1. 0.125 ..., 0.11111111 0.11111111\n",
- " 0.11111111]\n",
- " [ 0.14285714 0.125 1. ..., 0.8 0.8 0.8 ]\n",
- " ..., \n",
- " [ 0.125 0.11111111 0.8 ..., 1. 1. 1. ]\n",
- " [ 0.125 0.11111111 0.8 ..., 1. 1. 1. ]\n",
- " [ 0.125 0.11111111 0.8 ..., 1. 1. 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 38.880117\n",
- "With standard deviation: 0.623999\n",
- "\n",
- " Mean performance on test set: 39.174317\n",
- "With standard deviation: 6.195371\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 2.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 2 of size 185 built in 0.33235955238342285 seconds ---\n",
- "[[ 1. 0.5 0.11111111 ..., 0.07692308 0.07692308\n",
- " 0.07692308]\n",
- " [ 0.5 1. 0.09090909 ..., 0.06666667 0.06666667\n",
- " 0.06666667]\n",
- " [ 0.11111111 0.09090909 1. ..., 0.55555556 0.55555556\n",
- " 0.55555556]\n",
- " ..., \n",
- " [ 0.07692308 0.06666667 0.55555556 ..., 1. 1. 1. ]\n",
- " [ 0.07692308 0.06666667 0.55555556 ..., 1. 1. 1. ]\n",
- " [ 0.07692308 0.06666667 0.55555556 ..., 1. 1. 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 35.348332\n",
- "With standard deviation: 0.727833\n",
- "\n",
- " Mean performance on test set: 35.604226\n",
- "With standard deviation: 4.539211\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 3.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 3 of size 185 built in 0.5400393009185791 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.05555556 0.05555556\n",
- " 0.05555556]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.04761905 0.04761905\n",
- " 0.04761905]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.35714286 0.35714286\n",
- " 0.35714286]\n",
- " ..., \n",
- " [ 0.05555556 0.04761905 0.35714286 ..., 1. 1. 1. ]\n",
- " [ 0.05555556 0.04761905 0.35714286 ..., 1. 1. 1. ]\n",
- " [ 0.05555556 0.04761905 0.35714286 ..., 1. 1. 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 28.047646\n",
- "With standard deviation: 1.077805\n",
- "\n",
- " Mean performance on test set: 30.192177\n",
- "With standard deviation: 5.110324\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 4.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 4 of size 185 built in 0.8054666519165039 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.04347826 0.04166667\n",
- " 0.04347826]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.03846154 0.03703704\n",
- " 0.03846154]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.26315789 0.25 0.26315789]\n",
- " ..., \n",
- " [ 0.04347826 0.03846154 0.26315789 ..., 1. 0.95 0.9 ]\n",
- " [ 0.04166667 0.03703704 0.25 ..., 0.95 1. 0.95 ]\n",
- " [ 0.04347826 0.03846154 0.26315789 ..., 0.9 0.95 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- " Mean performance on train set: 18.878595\n",
- "With standard deviation: 1.711897\n",
- "\n",
- " Mean performance on test set: 23.751530\n",
- "With standard deviation: 7.808559\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 5.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 5 of size 185 built in 1.0195980072021484 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03703704 0.03333333\n",
- " 0.03571429]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.03333333 0.03030303\n",
- " 0.03225806]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.2173913 0.19230769\n",
- " 0.20833333]\n",
- " ..., \n",
- " [ 0.03703704 0.03333333 0.2173913 ..., 1. 0.88461538\n",
- " 0.74074074]\n",
- " [ 0.03333333 0.03030303 0.19230769 ..., 0.88461538 1. 0.85185185]\n",
- " [ 0.03571429 0.03225806 0.20833333 ..., 0.74074074 0.85185185 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 16.339135\n",
- "With standard deviation: 1.397693\n",
- "\n",
- " Mean performance on test set: 23.482309\n",
- "With standard deviation: 7.727117\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 6.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 6 of size 185 built in 1.2962956428527832 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03333333 0.02857143\n",
- " 0.03030303]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.03030303 0.02631579\n",
- " 0.02777778]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.19230769 0.16129032\n",
- " 0.17241379]\n",
- " ..., \n",
- " [ 0.03333333 0.03030303 0.19230769 ..., 1. 0.83870968\n",
- " 0.57142857]\n",
- " [ 0.02857143 0.02631579 0.16129032 ..., 0.83870968 1. 0.71428571]\n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 0.57142857 0.71428571 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 12.523830\n",
- "With standard deviation: 1.040404\n",
- "\n",
- " Mean performance on test set: 22.745367\n",
- "With standard deviation: 8.028051\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 7.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 7 of size 185 built in 1.5462064743041992 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03125 0.02564103\n",
- " 0.02631579]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02857143 0.02380952\n",
- " 0.02439024]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17857143 0.14285714\n",
- " 0.14705882]\n",
- " ..., \n",
- " [ 0.03125 0.02857143 0.17857143 ..., 1. 0.8 0.47619048]\n",
- " [ 0.02564103 0.02380952 0.14285714 ..., 0.8 1. 0.56818182]\n",
- " [ 0.02631579 0.02439024 0.14705882 ..., 0.47619048 0.56818182 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 11.371668\n",
- "With standard deviation: 0.925446\n",
- "\n",
- " Mean performance on test set: 22.831602\n",
- "With standard deviation: 7.978369\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 8.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 8 of size 185 built in 1.8658208847045898 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.02325581]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727\n",
- " 0.02173913]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.12820513]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.41666667]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.49019608]\n",
- " [ 0.02325581 0.02173913 0.12820513 ..., 0.41666667 0.49019608 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.132106\n",
- "With standard deviation: 0.525580\n",
- "\n",
- " Mean performance on test set: 22.586071\n",
- "With standard deviation: 8.067887\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 9.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 9 of size 185 built in 2.185042381286621 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.0212766 ]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727 0.02 ]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.11627907]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.38461538]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.45454545]\n",
- " [ 0.0212766 0.02 0.11627907 ..., 0.38461538 0.45454545 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.078464\n",
- "With standard deviation: 0.518149\n",
- "\n",
- " Mean performance on test set: 22.766801\n",
- "With standard deviation: 8.005709\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 10.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 10 of size 185 built in 2.35276198387146 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.02040816]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727\n",
- " 0.01923077]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.11111111]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.37037037]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.43859649]\n",
- " [ 0.02040816 0.01923077 0.11111111 ..., 0.37037037 0.43859649 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.075607\n",
- "With standard deviation: 0.672820\n",
- "\n",
- " Mean performance on test set: 22.869720\n",
- "With standard deviation: 7.944560\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 11.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 11 of size 185 built in 2.6274359226226807 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.02040816]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727\n",
- " 0.01923077]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.11111111]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.37037037]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.43859649]\n",
- " [ 0.02040816 0.01923077 0.11111111 ..., 0.37037037 0.43859649 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.075607\n",
- "With standard deviation: 0.672820\n",
- "\n",
- " Mean performance on test set: 22.869720\n",
- "With standard deviation: 7.944560\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 12.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 12 of size 185 built in 2.7209105491638184 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.02040816]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727\n",
- " 0.01923077]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.11111111]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.37037037]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.43859649]\n",
- " [ 0.02040816 0.01923077 0.11111111 ..., 0.37037037 0.43859649 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.075607\n",
- "With standard deviation: 0.672820\n",
- "\n",
- " Mean performance on test set: 22.869720\n",
- "With standard deviation: 7.944560\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 13.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 13 of size 185 built in 2.699059247970581 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.02040816]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727\n",
- " 0.01923077]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.11111111]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.37037037]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.43859649]\n",
- " [ 0.02040816 0.01923077 0.11111111 ..., 0.37037037 0.43859649 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- " Mean performance on train set: 10.075607\n",
- "With standard deviation: 0.672820\n",
- "\n",
- " Mean performance on test set: 22.869720\n",
- "With standard deviation: 7.944560\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 14.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 14 of size 185 built in 2.6328344345092773 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.02040816]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727\n",
- " 0.01923077]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.11111111]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.37037037]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.43859649]\n",
- " [ 0.02040816 0.01923077 0.11111111 ..., 0.37037037 0.43859649 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.075607\n",
- "With standard deviation: 0.672820\n",
- "\n",
- " Mean performance on test set: 22.869720\n",
- "With standard deviation: 7.944560\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 15.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 15 of size 185 built in 2.6556999683380127 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.02040816]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727\n",
- " 0.01923077]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.11111111]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.37037037]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.43859649]\n",
- " [ 0.02040816 0.01923077 0.11111111 ..., 0.37037037 0.43859649 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.075607\n",
- "With standard deviation: 0.672820\n",
- "\n",
- " Mean performance on test set: 22.869720\n",
- "With standard deviation: 7.944560\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 16.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 16 of size 185 built in 2.621814012527466 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.02040816]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727\n",
- " 0.01923077]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.11111111]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.37037037]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.43859649]\n",
- " [ 0.02040816 0.01923077 0.11111111 ..., 0.37037037 0.43859649 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.075607\n",
- "With standard deviation: 0.672820\n",
- "\n",
- " Mean performance on test set: 22.869720\n",
- "With standard deviation: 7.944560\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 17.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 17 of size 185 built in 2.5938243865966797 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.02040816]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727\n",
- " 0.01923077]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.11111111]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.37037037]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.43859649]\n",
- " [ 0.02040816 0.01923077 0.11111111 ..., 0.37037037 0.43859649 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.075607\n",
- "With standard deviation: 0.672820\n",
- "\n",
- " Mean performance on test set: 22.869720\n",
- "With standard deviation: 7.944560\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 18.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 18 of size 185 built in 2.65336275100708 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.02040816]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727\n",
- " 0.01923077]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.11111111]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.37037037]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.43859649]\n",
- " [ 0.02040816 0.01923077 0.11111111 ..., 0.37037037 0.43859649 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.075607\n",
- "With standard deviation: 0.672820\n",
- "\n",
- " Mean performance on test set: 22.869720\n",
- "With standard deviation: 7.944560\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 19.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 19 of size 185 built in 2.628486156463623 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.02040816]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727\n",
- " 0.01923077]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.11111111]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.37037037]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.43859649]\n",
- " [ 0.02040816 0.01923077 0.11111111 ..., 0.37037037 0.43859649 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.075607\n",
- "With standard deviation: 0.672820\n",
- "\n",
- " Mean performance on test set: 22.869720\n",
- "With standard deviation: 7.944560\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 20.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 20 of size 185 built in 2.682689666748047 seconds ---\n",
- "[[ 1. 0.44444444 0.11111111 ..., 0.03030303 0.02439024\n",
- " 0.02040816]\n",
- " [ 0.44444444 1. 0.08333333 ..., 0.02777778 0.02272727\n",
- " 0.01923077]\n",
- " [ 0.11111111 0.08333333 1. ..., 0.17241379 0.13513514\n",
- " 0.11111111]\n",
- " ..., \n",
- " [ 0.03030303 0.02777778 0.17241379 ..., 1. 0.73684211\n",
- " 0.37037037]\n",
- " [ 0.02439024 0.02272727 0.13513514 ..., 0.73684211 1. 0.43859649]\n",
- " [ 0.02040816 0.01923077 0.11111111 ..., 0.37037037 0.43859649 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.075607\n",
- "With standard deviation: 0.672820\n",
- "\n",
- " Mean performance on test set: 22.869720\n",
- "With standard deviation: 7.944560\n",
- "\n",
- "\n",
- " depth rmse_test std_test rmse_train std_train k_time\n",
- "------- ----------- ---------- ------------ ----------- --------\n",
- " 0 42.6459 6.56063 42.7871 0.675806 0.102753\n",
- " 1 39.1743 6.19537 38.8801 0.623999 0.183017\n",
- " 2 35.6042 4.53921 35.3483 0.727833 0.33236\n",
- " 3 30.1922 5.11032 28.0476 1.0778 0.540039\n",
- " 4 23.7515 7.80856 18.8786 1.7119 0.805467\n",
- " 5 23.4823 7.72712 16.3391 1.39769 1.0196\n",
- " 6 22.7454 8.02805 12.5238 1.0404 1.2963\n",
- " 7 22.8316 7.97837 11.3717 0.925446 1.54621\n",
- " 8 22.5861 8.06789 10.1321 0.52558 1.86582\n",
- " 9 22.7668 8.00571 10.0785 0.518149 2.18504\n",
- " 10 22.8697 7.94456 10.0756 0.67282 2.35276\n",
- " 11 22.8697 7.94456 10.0756 0.67282 2.62744\n",
- " 12 22.8697 7.94456 10.0756 0.67282 2.72091\n",
- " 13 22.8697 7.94456 10.0756 0.67282 2.69906\n",
- " 14 22.8697 7.94456 10.0756 0.67282 2.63283\n",
- " 15 22.8697 7.94456 10.0756 0.67282 2.6557\n",
- " 16 22.8697 7.94456 10.0756 0.67282 2.62181\n",
- " 17 22.8697 7.94456 10.0756 0.67282 2.59382\n",
- " 18 22.8697 7.94456 10.0756 0.67282 2.65336\n",
- " 19 22.8697 7.94456 10.0756 0.67282 2.62849\n",
- " 20 22.8697 7.94456 10.0756 0.67282 2.68269\n",
- "\n",
- " --- This is a regression problem ---\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 0.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- " --- kernel matrix of path kernel up to 0 of size 185 built in 0.3893899917602539 seconds ---\n",
- "[[ 1. 0.75 0.5 ..., 0.16666667 0.16666667\n",
- " 0.16666667]\n",
- " [ 0.75 1. 0.4 ..., 0.15384615 0.15384615\n",
- " 0.15384615]\n",
- " [ 0.5 0.4 1. ..., 0.27272727 0.27272727\n",
- " 0.27272727]\n",
- " ..., \n",
- " [ 0.16666667 0.15384615 0.27272727 ..., 1. 1. 1. ]\n",
- " [ 0.16666667 0.15384615 0.27272727 ..., 1. 1. 1. ]\n",
- " [ 0.16666667 0.15384615 0.27272727 ..., 1. 1. 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 12.207923\n",
- "With standard deviation: 0.700182\n",
- "\n",
- " Mean performance on test set: 12.682718\n",
- "With standard deviation: 2.748815\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 1.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 1 of size 185 built in 0.4729621410369873 seconds ---\n",
- "[[ 1. 0.7 0.16666667 ..., 0.05555556 0.05555556\n",
- " 0.05555556]\n",
- " [ 0.7 1. 0.13333333 ..., 0.05128205 0.05128205\n",
- " 0.05128205]\n",
- " [ 0.16666667 0.13333333 1. ..., 0.22580645 0.22580645\n",
- " 0.22580645]\n",
- " ..., \n",
- " [ 0.05555556 0.05128205 0.22580645 ..., 1. 1. 1. ]\n",
- " [ 0.05555556 0.05128205 0.22580645 ..., 1. 1. 1. ]\n",
- " [ 0.05555556 0.05128205 0.22580645 ..., 1. 1. 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.279220\n",
- "With standard deviation: 0.914688\n",
- "\n",
- " Mean performance on test set: 12.609828\n",
- "With standard deviation: 2.372778\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 2.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 2 of size 185 built in 0.576836109161377 seconds ---\n",
- "[[ 1. 0.4375 0.125 ..., 0.03333333 0.03333333\n",
- " 0.03571429]\n",
- " [ 0.4375 1. 0.0952381 ..., 0.03076923 0.03076923\n",
- " 0.03278689]\n",
- " [ 0.125 0.0952381 1. ..., 0.16981132 0.16981132\n",
- " 0.18367347]\n",
- " ..., \n",
- " [ 0.03333333 0.03076923 0.16981132 ..., 1. 1. 0.9245283 ]\n",
- " [ 0.03333333 0.03076923 0.16981132 ..., 1. 1. 0.9245283 ]\n",
- " [ 0.03571429 0.03278689 0.18367347 ..., 0.9245283 0.9245283 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 2.588811\n",
- "With standard deviation: 0.557162\n",
- "\n",
- " Mean performance on test set: 8.060609\n",
- "With standard deviation: 2.470450\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 3.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 3 of size 185 built in 0.7169125080108643 seconds ---\n",
- "[[ 1. 0.38888889 0.125 ..., 0.02631579 0.02631579\n",
- " 0.02777778]\n",
- " [ 0.38888889 1. 0.08695652 ..., 0.02409639 0.02409639\n",
- " 0.02531646]\n",
- " [ 0.125 0.08695652 1. ..., 0.13043478 0.13043478\n",
- " 0.13846154]\n",
- " ..., \n",
- " [ 0.02631579 0.02409639 0.13043478 ..., 1. 0.94366197\n",
- " 0.83561644]\n",
- " [ 0.02631579 0.02409639 0.13043478 ..., 0.94366197 1. 0.78666667]\n",
- " [ 0.02777778 0.02531646 0.13846154 ..., 0.83561644 0.78666667 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 1.272670\n",
- "With standard deviation: 0.760432\n",
- "\n",
- " Mean performance on test set: 9.755135\n",
- "With standard deviation: 3.049170\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 4.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 4 of size 185 built in 0.8342421054840088 seconds ---\n",
- "[[ 1. 0.38888889 0.125 ..., 0.02222222 0.02222222\n",
- " 0.02325581]\n",
- " [ 0.38888889 1. 0.08695652 ..., 0.02061856 0.02061856\n",
- " 0.02150538]\n",
- " [ 0.125 0.08695652 1. ..., 0.10843373 0.10843373\n",
- " 0.11392405]\n",
- " ..., \n",
- " [ 0.02222222 0.02061856 0.10843373 ..., 1. 0.82417582\n",
- " 0.67010309]\n",
- " [ 0.02222222 0.02061856 0.10843373 ..., 0.82417582 1. 0.70526316]\n",
- " [ 0.02325581 0.02150538 0.11392405 ..., 0.67010309 0.70526316 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 1.032293\n",
- "With standard deviation: 0.728380\n",
- "\n",
- " Mean performance on test set: 10.319167\n",
- "With standard deviation: 3.616673\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 5.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 5 of size 185 built in 0.9938209056854248 seconds ---\n",
- "[[ 1. 0.38888889 0.125 ..., 0.01960784 0.01960784\n",
- " 0.02040816]\n",
- " [ 0.38888889 1. 0.08695652 ..., 0.01834862 0.01834862\n",
- " 0.01904762]\n",
- " [ 0.125 0.08695652 1. ..., 0.09473684 0.09473684\n",
- " 0.0989011 ]\n",
- " ..., \n",
- " [ 0.01960784 0.01834862 0.09473684 ..., 1. 0.74311927\n",
- " 0.56302521]\n",
- " [ 0.01960784 0.01834862 0.09473684 ..., 0.74311927 1. 0.6173913 ]\n",
- " [ 0.02040816 0.01904762 0.0989011 ..., 0.56302521 0.6173913 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 0.923543\n",
- "With standard deviation: 0.660532\n",
- "\n",
- " Mean performance on test set: 10.659250\n",
- "With standard deviation: 4.120523\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 6.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 6 of size 185 built in 1.1753439903259277 seconds ---\n",
- "[[ 1. 0.38888889 0.125 ..., 0.01785714 0.01785714\n",
- " 0.01851852]\n",
- " [ 0.38888889 1. 0.08695652 ..., 0.01680672 0.01680672\n",
- " 0.0173913 ]\n",
- " [ 0.125 0.08695652 1. ..., 0.08571429 0.08571429\n",
- " 0.08910891]\n",
- " ..., \n",
- " [ 0.01785714 0.01680672 0.08571429 ..., 1. 0.68 0.48201439]\n",
- " [ 0.01785714 0.01680672 0.08571429 ..., 0.68 1. 0.54887218]\n",
- " [ 0.01851852 0.0173913 0.08910891 ..., 0.48201439 0.54887218 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 0.878589\n",
- "With standard deviation: 0.603598\n",
- "\n",
- " Mean performance on test set: 11.102521\n",
- "With standard deviation: 4.330554\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 7.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 7 of size 185 built in 1.4358420372009277 seconds ---\n",
- "[[ 1. 0.38888889 0.125 ..., 0.01666667 0.01666667\n",
- " 0.01724138]\n",
- " [ 0.38888889 1. 0.08695652 ..., 0.01574803 0.01574803\n",
- " 0.01626016]\n",
- " [ 0.125 0.08695652 1. ..., 0.07964602 0.07964602\n",
- " 0.08256881]\n",
- " ..., \n",
- " [ 0.01666667 0.01574803 0.07964602 ..., 1. 0.64963504\n",
- " 0.43225806]\n",
- " [ 0.01666667 0.01574803 0.07964602 ..., 0.64963504 1. 0.48993289]\n",
- " [ 0.01724138 0.01626016 0.08256881 ..., 0.43225806 0.48993289 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 0.944049\n",
- "With standard deviation: 0.694844\n",
- "\n",
- " Mean performance on test set: 11.352962\n",
- "With standard deviation: 4.305459\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 8.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 8 of size 185 built in 1.7005987167358398 seconds ---\n",
- "[[ 1. 0.38888889 0.125 ..., 0.015625 0.015625\n",
- " 0.01639344]\n",
- " [ 0.38888889 1. 0.08695652 ..., 0.01481481 0.01481481\n",
- " 0.01550388]\n",
- " [ 0.125 0.08695652 1. ..., 0.07438017 0.07438017\n",
- " 0.07826087]\n",
- " ..., \n",
- " [ 0.015625 0.01481481 0.07438017 ..., 1. 0.58169935\n",
- " 0.3964497 ]\n",
- " [ 0.015625 0.01481481 0.07438017 ..., 0.58169935 1. 0.44785276]\n",
- " [ 0.01639344 0.01550388 0.07826087 ..., 0.3964497 0.44785276 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 1.033979\n",
- "With standard deviation: 0.775622\n",
- "\n",
- " Mean performance on test set: 11.298981\n",
- "With standard deviation: 4.349648\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 9.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- " --- kernel matrix of path kernel up to 9 of size 185 built in 2.0194287300109863 seconds ---\n",
- "[[ 1. 0.38888889 0.125 ..., 0.015625 0.015625\n",
- " 0.01587302]\n",
- " [ 0.38888889 1. 0.08695652 ..., 0.01481481 0.01481481\n",
- " 0.01503759]\n",
- " [ 0.125 0.08695652 1. ..., 0.07438017 0.07438017\n",
- " 0.07563025]\n",
- " ..., \n",
- " [ 0.015625 0.01481481 0.07438017 ..., 1. 0.58169935\n",
- " 0.38728324]\n",
- " [ 0.015625 0.01481481 0.07438017 ..., 0.58169935 1. 0.43712575]\n",
- " [ 0.01587302 0.01503759 0.07563025 ..., 0.38728324 0.43712575 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 1.003187\n",
- "With standard deviation: 0.572070\n",
- "\n",
- " Mean performance on test set: 11.332669\n",
- "With standard deviation: 4.324120\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 10.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 10 of size 185 built in 2.243326187133789 seconds ---\n",
- "[[ 1. 0.38888889 0.125 ..., 0.015625 0.015625 0.015625 ]\n",
- " [ 0.38888889 1. 0.08695652 ..., 0.01481481 0.01481481\n",
- " 0.01481481]\n",
- " [ 0.125 0.08695652 1. ..., 0.07438017 0.07438017\n",
- " 0.07438017]\n",
- " ..., \n",
- " [ 0.015625 0.01481481 0.07438017 ..., 1. 0.58169935\n",
- " 0.38285714]\n",
- " [ 0.015625 0.01481481 0.07438017 ..., 0.58169935 1. 0.43195266]\n",
- " [ 0.015625 0.01481481 0.07438017 ..., 0.38285714 0.43195266 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 1.002272\n",
- "With standard deviation: 0.570937\n",
- "\n",
- " Mean performance on test set: 11.343515\n",
- "With standard deviation: 4.327265\n",
- "\n",
- "\n",
- " depth rmse_test std_test rmse_train std_train k_time\n",
- "------- ----------- ---------- ------------ ----------- --------\n",
- " 0 12.6827 2.74882 12.2079 0.700182 0.38939\n",
- " 1 12.6098 2.37278 10.2792 0.914688 0.472962\n",
- " 2 8.06061 2.47045 2.58881 0.557162 0.576836\n",
- " 3 9.75514 3.04917 1.27267 0.760432 0.716913\n",
- " 4 10.3192 3.61667 1.03229 0.72838 0.834242\n",
- " 5 10.6593 4.12052 0.923543 0.660532 0.993821\n",
- " 6 11.1025 4.33055 0.878589 0.603598 1.17534\n",
- " 7 11.353 4.30546 0.944049 0.694844 1.43584\n",
- " 8 11.299 4.34965 1.03398 0.775622 1.7006\n",
- " 9 11.3327 4.32412 1.00319 0.57207 2.01943\n",
- " 10 11.3435 4.32726 1.00227 0.570937 2.24333\n",
- "\n",
- " --- This is a regression problem ---\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 0.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 0 of size 185 built in 0.3775763511657715 seconds ---\n",
- "[[ 1. 0.75 0.5 ..., 0.16666667 0.16666667\n",
- " 0.16666667]\n",
- " [ 0.75 1. 0.4 ..., 0.15384615 0.15384615\n",
- " 0.15384615]\n",
- " [ 0.5 0.4 1. ..., 0.27272727 0.27272727\n",
- " 0.27272727]\n",
- " ..., \n",
- " [ 0.16666667 0.15384615 0.27272727 ..., 1. 1. 1. ]\n",
- " [ 0.16666667 0.15384615 0.27272727 ..., 1. 1. 1. ]\n",
- " [ 0.16666667 0.15384615 0.27272727 ..., 1. 1. 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 12.120872\n",
- "With standard deviation: 0.500467\n",
- "\n",
- " Mean performance on test set: 12.579966\n",
- "With standard deviation: 2.732346\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 1.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 1 of size 185 built in 0.4563324451446533 seconds ---\n",
- "[[ 1. 0.7 0.16666667 ..., 0.05555556 0.05555556\n",
- " 0.05555556]\n",
- " [ 0.7 1. 0.13333333 ..., 0.05128205 0.05128205\n",
- " 0.05128205]\n",
- " [ 0.16666667 0.13333333 1. ..., 0.22580645 0.22580645\n",
- " 0.22580645]\n",
- " ..., \n",
- " [ 0.05555556 0.05128205 0.22580645 ..., 1. 1. 1. ]\n",
- " [ 0.05555556 0.05128205 0.22580645 ..., 1. 1. 1. ]\n",
- " [ 0.05555556 0.05128205 0.22580645 ..., 1. 1. 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 10.224322\n",
- "With standard deviation: 0.734261\n",
- "\n",
- " Mean performance on test set: 12.621509\n",
- "With standard deviation: 2.188664\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 2.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 2 of size 185 built in 0.5852782726287842 seconds ---\n",
- "[[ 1. 0.4375 0.125 ..., 0.03333333 0.03333333\n",
- " 0.03571429]\n",
- " [ 0.4375 1. 0.0952381 ..., 0.03076923 0.03076923\n",
- " 0.03278689]\n",
- " [ 0.125 0.0952381 1. ..., 0.16981132 0.16981132\n",
- " 0.18367347]\n",
- " ..., \n",
- " [ 0.03333333 0.03076923 0.16981132 ..., 1. 1. 0.9245283 ]\n",
- " [ 0.03333333 0.03076923 0.16981132 ..., 1. 1. 0.9245283 ]\n",
- " [ 0.03571429 0.03278689 0.18367347 ..., 0.9245283 0.9245283 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 2.718851\n",
- "With standard deviation: 0.732922\n",
- "\n",
- " Mean performance on test set: 7.429032\n",
- "With standard deviation: 2.693953\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 3.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 3 of size 185 built in 0.7065560817718506 seconds ---\n",
- "[[ 1. 0.38888889 0.125 ..., 0.02631579 0.02631579\n",
- " 0.02777778]\n",
- " [ 0.38888889 1. 0.08695652 ..., 0.02409639 0.02409639\n",
- " 0.02531646]\n",
- " [ 0.125 0.08695652 1. ..., 0.13043478 0.13043478\n",
- " 0.13846154]\n",
- " ..., \n",
- " [ 0.02631579 0.02409639 0.13043478 ..., 1. 0.94366197\n",
- " 0.83561644]\n",
- " [ 0.02631579 0.02409639 0.13043478 ..., 0.94366197 1. 0.78666667]\n",
- " [ 0.02777778 0.02531646 0.13846154 ..., 0.83561644 0.78666667 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 1.540000\n",
- "With standard deviation: 1.138134\n",
- "\n",
- " Mean performance on test set: 9.024680\n",
- "With standard deviation: 2.508084\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 4.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 4 of size 185 built in 0.8479568958282471 seconds ---\n",
- "[[ 1. 0.38888889 0.125 ..., 0.02222222 0.02222222\n",
- " 0.02325581]\n",
- " [ 0.38888889 1. 0.08695652 ..., 0.02061856 0.02061856\n",
- " 0.02150538]\n",
- " [ 0.125 0.08695652 1. ..., 0.10843373 0.10843373\n",
- " 0.11392405]\n",
- " ..., \n",
- " [ 0.02222222 0.02061856 0.10843373 ..., 1. 0.82417582\n",
- " 0.67010309]\n",
- " [ 0.02222222 0.02061856 0.10843373 ..., 0.82417582 1. 0.70526316]\n",
- " [ 0.02325581 0.02150538 0.11392405 ..., 0.67010309 0.70526316 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 1.360291\n",
- "With standard deviation: 1.423990\n",
- "\n",
- " Mean performance on test set: 10.081112\n",
- "With standard deviation: 3.647700\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 5.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 5 of size 185 built in 1.0008597373962402 seconds ---\n",
- "[[ 1. 0.38888889 0.125 ..., 0.01960784 0.01960784\n",
- " 0.02040816]\n",
- " [ 0.38888889 1. 0.08695652 ..., 0.01834862 0.01834862\n",
- " 0.01904762]\n",
- " [ 0.125 0.08695652 1. ..., 0.09473684 0.09473684\n",
- " 0.0989011 ]\n",
- " ..., \n",
- " [ 0.01960784 0.01834862 0.09473684 ..., 1. 0.74311927\n",
- " 0.56302521]\n",
- " [ 0.01960784 0.01834862 0.09473684 ..., 0.74311927 1. 0.6173913 ]\n",
- " [ 0.02040816 0.01904762 0.0989011 ..., 0.56302521 0.6173913 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 1.085175\n",
- "With standard deviation: 1.062063\n",
- "\n",
- " Mean performance on test set: 11.300476\n",
- "With standard deviation: 4.441634\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 6.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- " --- kernel matrix of path kernel up to 6 of size 185 built in 1.1979196071624756 seconds ---\n",
- "[[ 1. 0.38888889 0.125 ..., 0.01785714 0.01785714\n",
- " 0.01851852]\n",
- " [ 0.38888889 1. 0.08695652 ..., 0.01680672 0.01680672\n",
- " 0.0173913 ]\n",
- " [ 0.125 0.08695652 1. ..., 0.08571429 0.08571429\n",
- " 0.08910891]\n",
- " ..., \n",
- " [ 0.01785714 0.01680672 0.08571429 ..., 1. 0.68 0.48201439]\n",
- " [ 0.01785714 0.01680672 0.08571429 ..., 0.68 1. 0.54887218]\n",
- " [ 0.01851852 0.0173913 0.08910891 ..., 0.48201439 0.54887218 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 1.064431\n",
- "With standard deviation: 1.001911\n",
- "\n",
- " Mean performance on test set: 12.186014\n",
- "With standard deviation: 4.888158\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 7.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 7 of size 185 built in 1.4372029304504395 seconds ---\n",
- "[[ 1. 0.38888889 0.125 ..., 0.01666667 0.01666667\n",
- " 0.01724138]\n",
- " [ 0.38888889 1. 0.08695652 ..., 0.01574803 0.01574803\n",
- " 0.01626016]\n",
- " [ 0.125 0.08695652 1. ..., 0.07964602 0.07964602\n",
- " 0.08256881]\n",
- " ..., \n",
- " [ 0.01666667 0.01574803 0.07964602 ..., 1. 0.64963504\n",
- " 0.43225806]\n",
- " [ 0.01666667 0.01574803 0.07964602 ..., 0.64963504 1. 0.48993289]\n",
- " [ 0.01724138 0.01626016 0.08256881 ..., 0.43225806 0.48993289 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 1.199119\n",
- "With standard deviation: 1.340313\n",
- "\n",
- " Mean performance on test set: 12.753387\n",
- "With standard deviation: 5.145288\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 8.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 8 of size 185 built in 1.68448805809021 seconds ---\n",
- "[[ 1. 0.38888889 0.125 ..., 0.015625 0.015625\n",
- " 0.01639344]\n",
- " [ 0.38888889 1. 0.08695652 ..., 0.01481481 0.01481481\n",
- " 0.01550388]\n",
- " [ 0.125 0.08695652 1. ..., 0.07438017 0.07438017\n",
- " 0.07826087]\n",
- " ..., \n",
- " [ 0.015625 0.01481481 0.07438017 ..., 1. 0.58169935\n",
- " 0.3964497 ]\n",
- " [ 0.015625 0.01481481 0.07438017 ..., 0.58169935 1. 0.44785276]\n",
- " [ 0.01639344 0.01550388 0.07826087 ..., 0.3964497 0.44785276 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 1.358221\n",
- "With standard deviation: 1.843147\n",
- "\n",
- " Mean performance on test set: 13.047098\n",
- "With standard deviation: 5.271835\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 9.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 9 of size 185 built in 1.9654510021209717 seconds ---\n",
- "[[ 1. 0.38888889 0.125 ..., 0.015625 0.015625\n",
- " 0.01587302]\n",
- " [ 0.38888889 1. 0.08695652 ..., 0.01481481 0.01481481\n",
- " 0.01503759]\n",
- " [ 0.125 0.08695652 1. ..., 0.07438017 0.07438017\n",
- " 0.07563025]\n",
- " ..., \n",
- " [ 0.015625 0.01481481 0.07438017 ..., 1. 0.58169935\n",
- " 0.38728324]\n",
- " [ 0.015625 0.01481481 0.07438017 ..., 0.58169935 1. 0.43712575]\n",
- " [ 0.01587302 0.01503759 0.07563025 ..., 0.38728324 0.43712575 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 1.360024\n",
- "With standard deviation: 1.848342\n",
- "\n",
- " Mean performance on test set: 13.178933\n",
- "With standard deviation: 5.277067\n",
- "\n",
- "\n",
- " #--- calculating kernel matrix when depth = 10.0 ---#\n",
- "\n",
- " Loading dataset from file...\n",
- "\n",
- " Calculating kernel matrix, this could take a while...\n",
- "\n",
- " --- kernel matrix of path kernel up to 10 of size 185 built in 2.2494258880615234 seconds ---\n",
- "[[ 1. 0.38888889 0.125 ..., 0.015625 0.015625 0.015625 ]\n",
- " [ 0.38888889 1. 0.08695652 ..., 0.01481481 0.01481481\n",
- " 0.01481481]\n",
- " [ 0.125 0.08695652 1. ..., 0.07438017 0.07438017\n",
- " 0.07438017]\n",
- " ..., \n",
- " [ 0.015625 0.01481481 0.07438017 ..., 1. 0.58169935\n",
- " 0.38285714]\n",
- " [ 0.015625 0.01481481 0.07438017 ..., 0.58169935 1. 0.43195266]\n",
- " [ 0.015625 0.01481481 0.07438017 ..., 0.38285714 0.43195266 1. ]]\n",
- "\n",
- " Saving kernel matrix to file...\n",
- "\n",
- " Mean performance on train set: 1.362078\n",
- "With standard deviation: 1.854262\n",
- "\n",
- " Mean performance on test set: 13.253773\n",
- "With standard deviation: 5.264247\n",
- "\n",
- "\n",
- " depth rmse_test std_test rmse_train std_train k_time\n",
- "------- ----------- ---------- ------------ ----------- --------\n",
- " 0 12.58 2.73235 12.1209 0.500467 0.377576\n",
- " 1 12.6215 2.18866 10.2243 0.734261 0.456332\n",
- " 2 7.42903 2.69395 2.71885 0.732922 0.585278\n",
- " 3 9.02468 2.50808 1.54 1.13813 0.706556\n",
- " 4 10.0811 3.6477 1.36029 1.42399 0.847957\n",
- " 5 11.3005 4.44163 1.08518 1.06206 1.00086\n",
- " 6 12.186 4.88816 1.06443 1.00191 1.19792\n",
- " 7 12.7534 5.14529 1.19912 1.34031 1.4372\n",
- " 8 13.0471 5.27184 1.35822 1.84315 1.68449\n",
- " 9 13.1789 5.27707 1.36002 1.84834 1.96545\n",
- " 10 13.2538 5.26425 1.36208 1.85426 2.24943\n"
- ]
- }
- ],
- "source": [
- "%load_ext line_profiler\n",
- "\n",
- "import sys\n",
- "sys.path.insert(0, \"../\")\n",
- "from pygraph.utils.utils import kernel_train_test\n",
- "from pygraph.kernels.untildPathKernel import untildpathkernel\n",
- "\n",
- "import numpy as np\n",
- "\n",
- "datafile = '../../../../datasets/acyclic/Acyclic/dataset_bps.ds'\n",
- "kernel_file_path = 'kernelmatrices_path_acyclic/'\n",
- "\n",
- "kernel_para = dict(node_label = 'atom', edge_label = 'bond_type', labeled = True, k_func = 'tanimoto')\n",
- "\n",
- "# kernel_train_test(datafile, kernel_file_path, treeletkernel, kernel_para, normalize = False)\n",
- "\n",
- "kernel_train_test(datafile, kernel_file_path, untildpathkernel, kernel_para, \\\n",
- " hyper_name = 'depth', hyper_range = np.linspace(0, 20, 21), normalize = True)\n",
- "kernel_train_test(datafile, kernel_file_path, untildpathkernel, kernel_para, \\\n",
- " hyper_name = 'depth', hyper_range = np.linspace(0, 20, 21), normalize = False)\n",
- "\n",
- "kernel_para['k_func'] = 'minmax'\n",
- "kernel_train_test(datafile, kernel_file_path, untildpathkernel, kernel_para, \\\n",
- " hyper_name = 'depth', hyper_range = np.linspace(0, 10, 11), normalize = True)\n",
- "kernel_train_test(datafile, kernel_file_path, untildpathkernel, kernel_para, \\\n",
- " hyper_name = 'depth', hyper_range = np.linspace(0, 10, 11), normalize = False)\n",
- "\n",
- "# # kernel_train_test(datafile, kernel_file_path, untildpathkernel, kernel_para, normalize = False)\n",
- "\n",
- "# kernel_para['depth'] = 10\n",
- "# %lprun -f untildpathkernel \\\n",
- "# kernel_train_test(datafile, kernel_file_path, untildpathkernel, kernel_para, normalize = False)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": [
- "# results\n",
- "\n",
- "# kernel Tanimoto with y normalization\n",
- " depth rmse_test std_test rmse_train std_train k_time\n",
- "------- ----------- ---------- ------------ ----------- ---------\n",
- " 0 41.6202 6.453 43.6169 2.13212 0.0904737\n",
- " 1 38.8446 6.44648 40.8329 3.44147 0.175414\n",
- " 2 35.2915 4.7813 35.7461 1.61134 0.344896\n",
- " 3 29.4845 3.90351 28.4646 3.00137 0.553939\n",
- " 4 22.6693 6.28053 19.2517 3.42893 0.770649\n",
- " 5 21.7956 5.5225 16.886 2.60519 1.01558\n",
- " 6 20.6049 5.49983 13.1097 2.58431 1.33302\n",
- " 7 20.3479 5.17631 12.0152 2.5928 1.60266\n",
- " 8 19.8228 5.13769 10.7981 2.13082 1.81218\n",
- " 9 19.8734 5.10369 10.7997 2.09549 2.21726\n",
- " 10 19.8708 5.09217 10.7787 2.10002 2.41006\n",
- " 11 19.8708 5.09217 10.7787 2.10002 2.74401\n",
- " 12 19.8708 5.09217 10.7787 2.10002 2.72344\n",
- " 13 19.8708 5.09217 10.7787 2.10002 2.61634\n",
- " 14 19.8708 5.09217 10.7787 2.10002 2.6295\n",
- " 15 19.8708 5.09217 10.7787 2.10002 2.66416\n",
- " 16 19.8708 5.09217 10.7787 2.10002 2.73013\n",
- " 17 19.8708 5.09217 10.7787 2.10002 2.63286\n",
- " 18 19.8708 5.09217 10.7787 2.10002 2.59294\n",
- " 19 19.8708 5.09217 10.7787 2.10002 2.63685\n",
- " 20 19.8708 5.09217 10.7787 2.10002 2.52734\n",
- "\n",
- "# kernel Tanimoto without y normalization\n",
- " depth rmse_test std_test rmse_train std_train k_time\n",
- "------- ----------- ---------- ------------ ----------- --------\n",
- " 0 42.6459 6.56063 42.7871 0.675806 0.102753\n",
- " 1 39.1743 6.19537 38.8801 0.623999 0.183017\n",
- " 2 35.6042 4.53921 35.3483 0.727833 0.33236\n",
- " 3 30.1922 5.11032 28.0476 1.0778 0.540039\n",
- " 4 23.7515 7.80856 18.8786 1.7119 0.805467\n",
- " 5 23.4823 7.72712 16.3391 1.39769 1.0196\n",
- " 6 22.7454 8.02805 12.5238 1.0404 1.2963\n",
- " 7 22.8316 7.97837 11.3717 0.925446 1.54621\n",
- " 8 22.5861 8.06789 10.1321 0.52558 1.86582\n",
- " 9 22.7668 8.00571 10.0785 0.518149 2.18504\n",
- " 10 22.8697 7.94456 10.0756 0.67282 2.35276\n",
- " 11 22.8697 7.94456 10.0756 0.67282 2.62744\n",
- " 12 22.8697 7.94456 10.0756 0.67282 2.72091\n",
- " 13 22.8697 7.94456 10.0756 0.67282 2.69906\n",
- " 14 22.8697 7.94456 10.0756 0.67282 2.63283\n",
- " 15 22.8697 7.94456 10.0756 0.67282 2.6557\n",
- " 16 22.8697 7.94456 10.0756 0.67282 2.62181\n",
- " 17 22.8697 7.94456 10.0756 0.67282 2.59382\n",
- " 18 22.8697 7.94456 10.0756 0.67282 2.65336\n",
- " 19 22.8697 7.94456 10.0756 0.67282 2.62849\n",
- " 20 22.8697 7.94456 10.0756 0.67282 2.68269\n",
- " \n",
- "# kernel MinMax with y normalization \n",
- " depth rmse_test std_test rmse_train std_train k_time\n",
- "------- ----------- ---------- ------------ ----------- --------\n",
- " 0 12.6827 2.74882 12.2079 0.700182 0.38939\n",
- " 1 12.6098 2.37278 10.2792 0.914688 0.472962\n",
- " 2 8.06061 2.47045 2.58881 0.557162 0.576836\n",
- " 3 9.75514 3.04917 1.27267 0.760432 0.716913\n",
- " 4 10.3192 3.61667 1.03229 0.72838 0.834242\n",
- " 5 10.6593 4.12052 0.923543 0.660532 0.993821\n",
- " 6 11.1025 4.33055 0.878589 0.603598 1.17534\n",
- " 7 11.353 4.30546 0.944049 0.694844 1.43584\n",
- " 8 11.299 4.34965 1.03398 0.775622 1.7006\n",
- " 9 11.3327 4.32412 1.00319 0.57207 2.01943\n",
- " 10 11.3435 4.32726 1.00227 0.570937 2.24333\n",
- "\n",
- "# kernel MinMax without y normalization\n",
- " depth rmse_test std_test rmse_train std_train k_time\n",
- "------- ----------- ---------- ------------ ----------- --------\n",
- " 0 12.58 2.73235 12.1209 0.500467 0.377576\n",
- " 1 12.6215 2.18866 10.2243 0.734261 0.456332\n",
- " 2 7.42903 2.69395 2.71885 0.732922 0.585278\n",
- " 3 9.02468 2.50808 1.54 1.13813 0.706556\n",
- " 4 10.0811 3.6477 1.36029 1.42399 0.847957\n",
- " 5 11.3005 4.44163 1.08518 1.06206 1.00086\n",
- " 6 12.186 4.88816 1.06443 1.00191 1.19792\n",
- " 7 12.7534 5.14529 1.19912 1.34031 1.4372\n",
- " 8 13.0471 5.27184 1.35822 1.84315 1.68449\n",
- " 9 13.1789 5.27707 1.36002 1.84834 1.96545\n",
- " 10 13.2538 5.26425 1.36208 1.85426 2.24943"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.5.2"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 2
- }
|