Skip to content
This repository has been archived by the owner on Oct 6, 2024. It is now read-only.

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
jiedxu committed May 22, 2019
1 parent a157045 commit c197101
Show file tree
Hide file tree
Showing 7 changed files with 1,160 additions and 5 deletions.
6 changes: 3 additions & 3 deletions FuncCrossVali.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ calPredictionRMSE <- function(vecPred, vecValid){
crossValid <- function(vecKernal, listVecKernalValue, datf = datfTrain, numFold = 10){
vecRootMeanSquaredError <- rep(NA, numFold)
for (i in 1:numFold) {
datForTest <- datf[(datf$index == i),]
vecPowerPred <- predLocalReg(datForTest$speed.center, vecKernal, listVecKernalValue[[i]])
vecRootMeanSquaredError[i] <- calPredictionRMSE(vecPowerPred, datForTest$power)
datForVali <- datf[(datf$index == i),]
vecPowerPred <- predLocalReg(datForVali$speed.center, vecKernal, listVecKernalValue[[i]])
vecRootMeanSquaredError[i] <- calPredictionRMSE(vecPowerPred, datForVali$power)
}
aveRootMeanSquaredError <- sum(vecRootMeanSquaredError) / numFold # [mean of mse]
return(aveRootMeanSquaredError)
Expand Down
25 changes: 25 additions & 0 deletions Output/7/listVecKernalValue_7.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
0.0204960556709308,0.0393978441851328,0.0272624117213049,0.0167277666169511,0.0396942264719224,0.00873874574319529,0.0115791052808685,0.0309098671172761,0.034064557123678,0.0107608029285483
0.0351728620568402,0.0492689906985225,0.0409962255663283,0.0315726197184728,0.0502489004674925,0.0307019109364501,0.0295067394542302,0.0471528569279114,0.0441070972224936,0.0268325963910789
0.0557328863784507,0.0700586871245921,0.0646704933861698,0.054154111106151,0.0713426111540413,0.0617515388640733,0.0522271903560328,0.0708919807571937,0.0691097309804173,0.0498835380181403
0.0878809991808328,0.10662082273769,0.102170461597848,0.0883620588096222,0.108665042328584,0.104923880959641,0.0853203091075327,0.110225554521077,0.110381286852566,0.0844884531959509
0.136417234090864,0.16336762398154,0.156357001495927,0.138002534861568,0.167156509254414,0.163186360556467,0.134240113899803,0.171234980616569,0.169345571657346,0.134427566023081
0.202520458705866,0.239249079102234,0.226279526695955,0.204725114022938,0.245627827341881,0.23647657281735,0.201174550496959,0.252345892168713,0.243841843206958,0.200583480776036
0.282502190986702,0.327029237748041,0.307426732130342,0.286037376773502,0.336501409290593,0.320852831879327,0.283480687013051,0.344941188473044,0.327267322507448,0.280188489619937
0.3703121877814,0.418588160047336,0.394198079033301,0.376079684009246,0.430857805531425,0.411632280499383,0.374686331094901,0.438872430771439,0.413647724811687,0.368292730777412
0.460655323180403,0.510079362079225,0.483593679270329,0.469413101783594,0.52342819479758,0.506499146458983,0.468529764847116,0.528573109203819,0.502922261156605,0.461153033158537
0.551229597636005,0.601430148960093,0.574907521486438,0.563213909183716,0.613090937296126,0.602653666012907,0.562433678567438,0.614350644466919,0.596530803747403,0.556692355548073
0.640327921084251,0.689475640344517,0.664050267648875,0.653874883700424,0.698333866839259,0.692382051452399,0.6536422808415,0.696533248548057,0.688309873808416,0.650138997776779
0.721911144421428,0.76671689231694,0.742722878486686,0.734474404329965,0.77383787833315,0.766972751031431,0.734853934747184,0.770176481405139,0.767526610299301,0.732949140781374
0.789740889710135,0.828319761379781,0.805589958289032,0.800039780338374,0.833770555915122,0.824045262936215,0.800891617631381,0.829172344455822,0.828182928760503,0.799633242300424
0.843236256290305,0.874856332320913,0.854485502025232,0.851270428594192,0.877215021460177,0.868197069282317,0.85301455615598,0.872789485841681,0.872076889932713,0.851620219133093
0.884671877587372,0.909130604589876,0.893294509575305,0.890510796782672,0.908104885538326,0.903494742727762,0.893739506785698,0.904514136639329,0.905035053081751,0.89193262981719
0.915499147809487,0.933416426477413,0.922799583024587,0.919195667298709,0.93067018826022,0.930000731445457,0.923813292240599,0.927697000275902,0.93025788053847,0.921654070441816
0.937157391048422,0.94978363735352,0.943050003703563,0.939255673203336,0.947733803034688,0.947946758425151,0.945004922608708,0.944756907835657,0.948679510672822,0.942053491348489
0.952159880866383,0.961801583778761,0.956681292348558,0.953650771077914,0.961437366160238,0.960265066008988,0.96059836110452,0.957985070115797,0.961975211142412,0.956313404833104
0.963295744160172,0.971690020398191,0.966468822339244,0.964947920363479,0.971870444783954,0.969708508705068,0.972308548423465,0.968265420485313,0.971647825080703,0.967348749508908
0.9725186695291,0.979013079707841,0.973889754384583,0.97413445801027,0.978519986562751,0.977583211816528,0.980897628785749,0.975842867024822,0.97879961299115,0.976281825801103
0.980432977967491,0.983999777460194,0.980023907497592,0.98140124911974,0.983047313045164,0.984162643526418,0.987121596893127,0.981935723844497,0.984284350556679,0.98316734742384
0.995983488223683,0.997098380293638,0.996401683288563,0.996711218208091,0.997919271794742,0.996273540857554,0.997458324621629,0.997862923849406,0.995858379769059,0.996553050143012
0.998300131887182,0.999092438615399,0.998425876045594,0.998337269147045,0.998552627613676,0.998638466117353,0.999165579003615,0.998070789036858,0.998398338244729,0.99842405145782
0.999548168523373,0.999319425670022,1.00119004766442,0.999533888656594,1.00066080026858,0.999422931143666,0.999193840272104,0.999800754100288,0.999502122673853,0.999505107196752
0.999248652239489,0.998540300823869,1.00340154494256,0.999104925567493,0.998976181415056,0.998708113988132,0.998528242085116,0.99973203267875,1.00092310750068,0.998937428497571
360 changes: 360 additions & 0 deletions Output/7/vecCoef_7.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,360 @@
1.04301896575105
1.0879415597467
1.09281279057044
1.09994386761086
1.09994940856489
1.09992205223092
1.09992156030557
1.0999212339616
1.07142666268334
1.0999541713583
1.0999435172089
1.09993193297051
1.06493282465659
1.08665216263262
1.0999541713583
1.09293610896063
1.09995115151611
1.06580699574492
1.0999334725814
1.03798016138577
1.09648201006372
1.08318800521437
1.05529110201605
1.05729711384732
1.0873112329192
1.04919004788208
1.06987959527047
1.03369712959779
1.07851322973156
1.07179762731359
1.06921850312968
1.03236921098487
1.04223180179915
1.06137960276619
1.0180607485521
1.08571097035969
1.08966678582179
1.07578164454035
1.06233835970989
1.06702176966348
1.01454169144759
1.03739554322786
1.03068731657546
1.05472089834292
1.09994885239016
1.05963376084059
1.0509653244947
1.09995373511536
1.06235570408187
1.00927838922336
1.06157512074376
1.06419691971905
1.08149378213471
1.0999421822416
1.09148111195597
1.04430090628993
1.07638308096407
1.06858916075107
1.08780234748705
0.971878812547022
1.0595547008055
1.03250124258865
1.014271819921
1.05382935809397
0.989665584054844
0.971745282191657
0.990113246823311
1.05725368269666
0.956612211366124
0.932785375311334
1.03766458234707
0.968011718753118
0.96571985004106
0.999765722039415
0.99021738179087
0.979331375215912
1.00042599826887
0.980591070164457
0.993904065845931
0.961425191668157
0.956154620039554
0.967774214087077
1.01650272280163
1.03560822908307
0.960965390488267
1.05392968642836
0.993344745235804
1.04071460944568
1.0262078159614
1.00092847519765
1.01947022819613
1.00823885418866
1.02495828912685
1.0859053810344
0.958928403214507
0.961655169750078
1.01698863258434
1.03814364340898
1.03746770223248
1.07439880834733
1.06582727417506
1.06406221750174
1.07381982662316
1.08512341925651
1.04076492765394
1.0634570168048
1.00700013554456
0.984933133261979
1.08313481675808
1.0999541713583
1.03350577853672
1.05079995936773
1.05031890641198
1.05760550431268
1.02568673666536
1.01241961458881
1.05858146718493
1.0999541713583
1.0987686192997
1.09995571220155
1.0999541713583
1.07435212952763
1.0999541713583
1.09223498181305
1.05580758277479
1.0999541713583
1.08893959946202
1.06896481002193
1.03162892302396
1.05127781847719
1.08864346103574
1.02039339917699
1.03858482176431
1.02377064439
1.01761656857551
1.04877033678052
1.00031820615485
0.989714787162404
0.961082402307272
1.01100799924063
0.960500101559509
0.936299703670316
1.00298843548222
0.986413813634792
0.903558591614539
0.971976953746188
0.933396787798856
0.880716359251944
0.95326515148219
0.893689874825689
0.892422132595197
0.89562435730466
0.904219872876235
0.908076087558625
0.93047001429057
0.895240302864408
0.879004411553871
0.878256022092926
0.856386044934135
0.836018611878571
0.847728074305415
0.871038502874408
0.862776053622488
0.894144208404968
0.88664933308298
0.866636859023648
0.905596037894857
0.880970896648178
0.854502363102227
0.854752712645087
0.893399982079648
0.857192230693455
0.868422334142832
0.895574031925888
0.858475090701593
0.849460463060478
0.885616329769906
0.882421015710024
0.855885693075852
0.881102973276846
0.873494129012868
0.902042877051772
0.851568392146955
0.880593985804438
0.848027874757213
0.862111163464861
0.887100309838092
0.888570682770747
0.932052217261379
0.911240343289766
0.858047332500291
0.830860812192765
0.867801061949953
0.895440052080975
0.909160389067077
0.876348390457669
0.812189693584066
0.83287539369985
0.827140262901792
0.913353778501453
0.797957358645755
0.835368522893678
0.837994255325605
0.832725102146064
0.795921857605026
0.799610824808739
0.811567104903471
0.7825429450383
0.818817328267146
0.782421250207431
0.773053624058088
0.700158033252039
0.677472017761783
0.735309877230952
0.738794494463135
0.646176556362896
0.622517460612741
0.631028221310279
0.608074153909143
0.688097646339339
0.650814714791616
0.623076763957076
0.655841770441338
0.657952443895984
0.648818861777365
0.600045836089703
0.675396337849969
0.729145353568626
0.686370557456599
0.722391859545229
0.676764839891071
0.679706849805192
0.621522126478064
0.713288287143074
0.737149045033994
0.692514605917059
0.770303414871092
0.819459147709824
0.742769926251256
0.813423066610184
0.717449489830466
0.875472670207365
0.872104515306941
0.873178748358199
0.905569400476899
0.843626708816004
0.936584380172755
0.845170715337638
0.853531613434503
0.877144684525876
0.87891920991771
0.945451208904382
0.835711583151212
0.873754639918845
0.878080166680184
0.930806483931905
0.844841059047623
0.894738018584061
0.923656074193877
1.07849896216899
0.941665919411328
0.965391059729612
1.02678160346768
1.00892396752532
1.09922903772964
1.04445685013066
0.871452093590292
1.06976560399229
1.07851283787754
1.09992927039846
0.876176473342975
0.914902824452286
1.0757369525628
0.987516399514668
0.944159458745337
0.986780362023136
0.96870194988734
0.932287429618068
1.07161338058576
1.0127639774996
1.0381911351849
1.01522381966622
0.972039599571364
1.09430428686811
1.00788688128265
1.0999541713583
1.02911160595824
1.0999541713583
1.0999541713583
1.06619595802813
1.02150236213596
1.06705570312769
1.0999541713583
1.00927408464064
1.0373268243407
1.08035985867348
1.0095305376317
1.00809718327916
1.04949221713432
1.08786957138905
1.07570298491642
1.05963280903566
1.02513882258967
1.01264116966794
1.02254036299031
1.03761011180533
1.03284759299917
1.03943543352139
1.00101768058585
1.00304771336351
1.05968815693316
1.02245756428333
0.992729973472733
1.02770880547738
1.04525468159294
1.08825746757852
1.02845716685994
1.0399000701134
1.05039456356795
1.07526948227127
1.03443230881514
1.09901861602195
1.03695217392555
1.0379945413404
1.08075318137744
1.06404816110054
1.07801328540178
1.08398351189332
1.09756874198229
1.0542140552909
1.04740762997721
1.09994042437527
1.06583847625594
1.0824649256226
1.02473756929723
1.06321500678797
1.03593467183506
1.0221461964952
1.06145060941776
1.07055037646172
1.01572035913163
1.06076463333468
1.03639491140238
1.05693818885198
1.06113960691132
1.05722976260034
1.07833658096856
1.09613418230738
1.06776970407858
1.09281396106165
1.05792274255924
1.08515735760413
1.07344968111249
1.09942510965118
1.07122503532419
1.07862562616892
1.09995249037071
1.06660552868613
1.09995438756413
1.09125998932859
Loading

0 comments on commit c197101

Please sign in to comment.