我正在进行动态时间扭曲,我有两个大数据集:“AIB_nf1”有128960个观测值,“AIB_nf3”有67956个观测值,我有“内存分配不够”的问题,所以我说“内存。限制(大小= 200000)“增加我的内存限制,我也使用”bigmemory“包来存储”大矢量“。这是我的数据:
> dput(AIB_nf1[1:90,])
structure(list(V1 = 7:96, V2 = c(0.238, 0.271, 0.305, 0.339,
0.372, 0.406, 0.44, 0.474, 0.508, 0.542, 0.576, 0.609, 0.643,
0.677, 0.711, 0.745, 0.779, 0.812, 0.846, 0.88, 0.914, 0.948,
0.982, 1.016, 1.05, 1.083, 1.118, 1.151, 1.185, 1.219, 1.253,
1.286, 1.32, 1.354, 1.388, 1.422, 1.456, 1.49, 1.523, 1.557,
1.591, 1.626, 1.659, 1.693, 1.726, 1.761, 1.794, 1.828, 1.862,
1.896, 1.929, 1.963, 1.998, 2.031, 2.065, 2.099, 2.134, 2.166,
2.2, 2.234, 2.269, 2.302, 2.336, 2.369, 2.403, 2.437, 2.472,
2.506, 2.539, 2.573, 2.606, 2.64, 2.674, 2.709, 2.742, 2.777,
2.81, 2.844, 2.878, 2.911, 2.946, 2.98, 3.014, 3.047, 3.081,
3.115, 3.149, 3.183, 3.216, 3.25), V3 = c(0.035, 0.033, 0.034,
0.034, 0.033, 0.034, 0.034, 0.034, 0.034, 0.034, 0.034, 0.033,
0.034, 0.034, 0.034, 0.034, 0.034, 0.033, 0.034, 0.034, 0.034,
0.034, 0.034, 0.034, 0.034, 0.033, 0.035, 0.033, 0.034, 0.034,
0.034, 0.033, 0.034, 0.034, 0.034, 0.034, 0.034, 0.034, 0.033,
0.034, 0.034, 0.035, 0.033, 0.034, 0.033, 0.035, 0.033, 0.034,
0.034, 0.034, 0.033, 0.034, 0.035, 0.033, 0.034, 0.034, 0.035,
0.032, 0.034, 0.034, 0.035, 0.033, 0.034, 0.033, 0.034, 0.034,
0.035, 0.034, 0.033, 0.034, 0.033, 0.034, 0.034, 0.035, 0.033,
0.035, 0.033, 0.034, 0.034, 0.033, 0.035, 0.034, 0.034, 0.033,
0.034, 0.034, 0.034, 0.034, 0.033, 0.034), V4 = c(441.100031482115,
441.669796396059, 441.38457234409, 441.09267697965, 440.803668983209,
440.529231728857, 440.278958201691, 440.052100582152, 439.844882580225,
439.647597662433, 439.451667982318, 439.246376810531, 439.031294273645,
438.809393089071, 438.578439895116, 438.336878706118, 438.079094738171,
437.801138836314, 437.501648899307, 437.191385319573, 436.884993592609,
436.598187216878, 436.33876025592, 436.109775709052, 435.909677911583,
435.736569723929, 435.592108168405, 435.476955248205, 435.395588126862,
435.361455383054, 435.384658645204, 435.481047521428, 435.657553442936,
435.924235449177, 436.276622652934, 436.704563920842, 437.201390282161,
437.748420682289, 438.330760278104, 438.934488636071, 439.545855569278,
440.152710252807, 440.732387132145, 441.276668730836, 441.793958476923,
442.321449526307, 442.885082175977, 443.500326940982, 444.163784042471,
444.876747755494, 445.629101153019, 446.413006556444, 447.219702893944,
448.04320465062, 448.878239986395, 449.696324096127, 450.47071643864,
451.192192559764, 451.884392158869, 452.567345063059, 453.255173693378,
453.950945621684, 454.660220896133, 455.383641735162, 456.128123482219,
456.907670434515, 457.71936637997, 458.561564110987, 459.417574075509,
460.277883392994, 461.121178625562, 461.938395364597, 462.720841927243,
463.46713160929, 464.182555341931, 464.861361795048, 465.501874214837,
466.111915734947, 466.705850179264, 467.293066636918, 467.862178274689,
468.390474699237, 468.869842312237, 469.315478639902, 469.74901025705,
470.191756396207, 470.653952147748, 471.154758994025, 471.698672894308,
472.293910737885), V5 = c(314.384059526516, 314.95558512382,
314.921496201275, 314.882092487732, 314.837676590888, 314.790334336513,
314.74286022387, 314.697502713392, 314.65549623984, 314.617675945866,
314.58517227401, 314.558482333973, 314.537472692021, 314.52070437541,
314.505631383973, 314.490211116595, 314.473431803066, 314.455541373727,
314.437668589236, 314.421263791453, 314.407923664018, 314.398966275808,
314.396001516912, 314.3993734291, 314.409000460683, 314.424662660756,
314.446073458842, 314.472208396383, 314.501502439277, 314.531920195551,
314.561611780958, 314.58951544553, 314.614354844383, 314.636411818191,
314.656901885219, 314.678620920816, 314.705179137416, 314.738245314209,
314.777591741161, 314.821970842093, 314.869779210569, 314.919300932594,
314.967408697864, 315.010952427006, 315.047962495732, 315.078951995879,
315.105757641079, 315.129840902302, 315.151785892227, 315.170672617989,
315.185256397008, 315.194170347423, 315.196055633466, 315.190404600552,
315.178723777359, 315.163890579158, 315.149545352313, 315.138261653969,
315.131130401149, 315.127417149137, 315.125308302653, 315.124096433129,
315.12473065196, 315.130605122803, 315.147656465417, 315.18343815854,
315.240429559451, 315.317363629517, 315.408475194359, 315.510337393659,
315.619120511544, 315.734967923778, 315.858240792688, 315.989492765941,
316.128835818992, 316.272243945941, 316.416185332662, 316.559856868433,
316.704771932581, 316.851433299391, 316.99468691065, 317.1274100422,
317.246963764075, 317.357335720734, 317.46468123328, 317.574923437671,
317.690844191521, 317.815705045656, 317.948840448128, 318.089511567484
), V6 = c(77.6544500702095, 79.5967211571173, 81.7960624289552,
84.1373713488114, 86.4154187179779, 88.389872999251, 89.8544806232982,
90.7121101760369, 90.9790614642136, 90.733492208004, 90.036020912385,
88.9146045911228, 87.4062171867472, 85.4553040059864, 83.5311252156856,
82.8657870114023, 82.6654967517532, 79.1149257310998, 71.9920633371955,
63.1528016383671, 53.4027390322975, 43.0500408037574, 32.3287058869458,
21.7032552864132, 13.0436877159348, 10.1579416553081, 15.0294328340723,
24.4751027389957, 35.0114787218733, 45.6609430756035, 56.598944264802,
68.1870637662322, 80.6420267215977, 94.013030263447, 108.179107765857,
122.858492938974, 137.712039733548, 152.531514284118, 167.20468668551,
181.491491962867, 195.111297996157, 207.897226442466, 219.758095918405,
230.666456791146, 240.668240768018, 249.810421699481, 258.129345830109,
265.600556082584, 272.17475257595, 277.857702464358, 282.793981908209,
287.195889937384, 291.288235707612, 295.158722069813, 298.833288762195,
302.308300529554, 305.47121244586, 308.291811952999, 310.952930602306,
313.467005202536, 315.472416516834, 316.598902434977, 316.745389656015,
315.996708714403, 314.344014546762, 311.707893131224, 308.249827382123,
304.066850109038, 299.233863787681, 294.15508247401, 289.41422605264,
285.436033582435, 282.436410040228, 280.552187225324, 279.597475015451,
279.272853057788, 279.365667891074, 279.787799549876, 280.350865174633,
280.751149880548, 280.726173447533, 280.03174151085, 278.348053191143,
275.547010354231, 271.909606813082, 267.872049568937, 263.86533016946,
260.083715283842, 256.347964552832, 252.276751469399), V7 = c(51.4480314095009,
57.5816201042002, 63.6411704294435, 66.2722854148427, 63.6385194727121,
55.1932472167247, 41.698301321069, 25.4354541092531, 8.93261215242534,
-6.274540964104, -19.8698945441127, -32.4185613678941, -44.1128346610455,
-50.5391460721897, -44.1463352989928, -31.916798012143, -47.0585257378509,
-109.194854761563, -187.700602527724, -245.968763437001, -279.862969097574,
-299.595147314433, -307.857736808814, -288.753809825673, -210.9726062505,
-65.1550326835475, 105.831570515081, 234.629898183141, 295.067487408662,
314.462653774103, 325.597268488998, 344.472110431487, 367.167170753237,
390.812993511555, 414.046817816858, 429.820959629612, 432.736947772346,
430.884279682886, 428.818443594366, 416.788105803434, 395.882456531845,
374.435797794311, 353.364425308882, 324.551273875127, 293.514193529575,
267.285618779515, 245.070533423311, 221.357869081285, 195.751625779721,
169.834443929127, 147.065177149355, 130.704379409803, 121.277783326993,
115.216812598445, 109.084392253419, 102.04338350126, 93.1514222125054,
84.3035263789177, 77.4440856638193, 69.4079922090317, 54.2726015042625,
31.7950327396719, 5.37919874081433, -21.8359150720515, -48.6531462458845,
-74.6084628942048, -99.3052157147383, -121.515563578365, -137.731410747763,
-142.218576651789, -133.335682485888, -113.593358480026, -87.0542409157218,
-58.3873364396833, -32.4716986389187, -12.7497949111558, 0.935384462721025,
9.74065532781512, 12.7288079897491, 8.22959665962557, -4.16598901650454,
-24.4148098216698, -51.008299986274, -78.6372761202899, -100.583633052036,
-112.486275167353, -114.944934255289, -113.660470935251, -115.313348108527,
-123.225226010314), V8 = c(176.975697942618, 177.482606302604,
177.929469720604, 178.310222605972, 178.61453336687, 178.835331762098,
178.970316780718, 179.021424834984, 178.995360296074, 178.901209232659,
178.747565020935, 178.542936376789, 178.297708598723, 178.023929456041,
158.586376116383, 72.4771473428539, -69.305876495773, -155.440235518891,
-174.95837309362, -177.007211905103, -158.263287265243, -72.3007854896034,
68.917864425121, 146.405834345958, 135.295461736752, 84.5902300761542,
39.6889156531479, 18.7499723135408, 12.1788596231181, 9.84169632124827,
8.51948006309428, 7.55574681360299, 6.78473380781338, 6.13902515098798,
5.5806484694855, 5.08376972887534, 4.6285263419629, 4.19962291193802,
3.78969606002656, 3.40085313487997, 3.04143775021902, 2.71963085315169,
2.43873130948763, 2.19700449292612, 1.99017489489138, 1.81394321882811,
1.66654182984893, 1.55014560466285, 1.47050003211031, 1.43479761105802,
1.44708400716788, 1.5039935209109, 1.59581348985406, 1.71118754373894,
1.84187151361842, 1.98475655162367, 2.14232863240605, 2.32077818414242,
2.52636607604457, 2.76146309217018, 3.02297458588718, 3.30591380879753,
3.60801537992081, 3.93017147123611, 4.27274460261113, 4.63238312712042,
5.00511718541946, 5.39181904587125, 5.79816267170558, 6.22810768706081,
6.67784925736226, 7.13703862687252, 7.59550627402344, 8.04768077958597,
8.49145777102297, 8.92484345584686, 9.3437760256399, 9.74121348244031,
10.1057619067488, 10.4226016657657, 10.6784707539567, 10.8687985553899,
11.0006871073511, 11.0869580928486, 11.1366309391458, 11.149939652299,
11.1195446827404, 11.0369084026927, 10.899617235996, 10.7156463624773
), V9 = c(1.98619210040585, 2.7560868631792, 3.37520500958573,
3.81497765960184, 4.08976538730253, 4.21602480698687, 4.2118181214032,
4.09752289801817, 3.89504281373373, 3.62559168192297, 3.30711395313635,
2.95501518872097, 2.56879140331794, 2.21294820902311, 2.06712342369418,
2.08649643223339, 1.99190978614415, 1.98463260705346, 1.75511433181296,
1.36824104408505, 1.3899734186647, 1.41621882783257, 1.48435850042031,
1.64655153339521, 1.74570861379073, 1.5196896009812, 1.32976504384076,
1.11690102008759, 1.21332498472059, 1.61473699777163, 1.36396079728927,
1.05025689764031, 1.48782770573704, 2.1745791329998, 2.42336914635558,
2.12403249679967, 1.61058758688998, 1.13732090952412, 0.756350815626496,
0.465691118403319, 0.262158442042785, 0.142886822696197, 0.116665417465433,
0.261120945116082, 0.686186437963084, 1.17631132471452, 1.1723446293262,
0.814788235861579, 1.06237917494463, 1.83194974749923, 2.13536892594869,
1.82583365361083, 1.35807114281152, 1.00266499930436, 0.965724683374411,
0.904884412143251, 1.09330199793613, 1.78024498369561, 1.96548162582243,
1.43214834988696, 1.31383517511711, 1.89856809008893, 2.34559662603644,
2.05496693192545, 1.34182994462245, 0.77295928513312, 0.725191064964074,
1.21631058850099, 1.90904475717069, 2.38372862446284, 2.32977424329766,
1.8141740457693, 1.15454557896414, 0.644768322337396, 0.528137214142275,
0.838785310438783, 1.33792102785776, 1.83052733209556, 2.25705503261945,
2.59640059123711, 2.83671152683692, 2.97758764356467, 3.02955934825042,
3.00914871790722, 2.93094956183559, 2.79939287795865, 2.60933603367312,
2.35150544013667, 2.02008602795494, 1.61944134124658)), .Names = c("V1",
"V2", "V3", "V4", "V5", "V6", "V7", "V8", "V9"), row.names = c(NA,
90L), class = "data.frame")
我的第二个数据集:
> dput(AIB_nf3[1:90,])
structure(list(V1 = 7:96, V2 = c(0.236, 0.27, 0.304, 0.338, 0.372,
0.406, 0.44, 0.473, 0.507, 0.541, 0.575, 0.609, 0.643, 0.677,
0.71, 0.744, 0.778, 0.812, 0.846, 0.88, 0.913, 0.947, 0.981,
1.016, 1.049, 1.083, 1.117, 1.15, 1.184, 1.218, 1.252, 1.286,
1.32, 1.353, 1.387, 1.423, 1.455, 1.489, 1.523, 1.557, 1.59,
1.624, 1.658, 1.692, 1.726, 1.771, 1.794, 1.827, 1.861, 1.895,
1.929, 1.963, 1.997, 2.03, 2.064, 2.098, 2.132, 2.166, 2.2, 2.234,
2.267, 2.301, 2.335, 2.369, 2.403, 2.437, 2.471, 2.504, 2.538,
2.572, 2.606, 2.64, 2.674, 2.707, 2.741, 2.775, 2.809, 2.843,
2.877, 2.911, 2.944, 2.978, 3.012, 3.046, 3.08, 3.114, 3.147,
3.181, 3.215, 3.249), V3 = c(0.033, 0.034, 0.034, 0.034, 0.034,
0.034, 0.034, 0.033, 0.034, 0.034, 0.034, 0.034, 0.034, 0.034,
0.033, 0.034, 0.034, 0.034, 0.034, 0.034, 0.033, 0.034, 0.034,
0.035, 0.033, 0.034, 0.034, 0.033, 0.034, 0.034, 0.034, 0.034,
0.034, 0.033, 0.034, 0.036, 0.032, 0.034, 0.034, 0.034, 0.033,
0.034, 0.034, 0.034, 0.034, 0.045, 0.023, 0.033, 0.034, 0.034,
0.034, 0.034, 0.034, 0.033, 0.034, 0.034, 0.034, 0.034, 0.034,
0.034, 0.033, 0.034, 0.034, 0.034, 0.034, 0.034, 0.034, 0.033,
0.034, 0.034, 0.034, 0.034, 0.034, 0.033, 0.034, 0.034, 0.034,
0.034, 0.034, 0.034, 0.033, 0.034, 0.034, 0.034, 0.034, 0.034,
0.033, 0.034, 0.034, 0.034), V4 = c(244.397061324053, 244.400702120946,
243.925216555288, 243.443071251612, 242.954047234877, 242.46082119539,
241.959057483284, 241.429501231968, 240.863045745703, 240.259352731145,
239.63032746573, 238.99013001204, 238.352537803174, 237.735552453937,
237.150392846983, 236.585236045168, 236.026136509019, 235.456068404747,
234.874569393746, 234.290733373249, 233.727140918233, 233.202025357043,
232.717232961421, 232.270428417261, 231.84982306172, 231.442512212432,
231.038416380226, 230.641080216776, 230.263082097756, 229.918324740988,
229.607916123677, 229.329003437537, 229.069415382373, 228.806483078609,
228.524451292729, 228.207114513139, 227.846524592105, 227.434699094097,
226.985084592902, 226.515081576342, 226.036035597374, 225.552349769204,
225.064485653317, 224.576289037253, 224.097530276654, 223.635615610785,
223.199094889133, 222.782966742833, 222.366446949163, 221.926318957725,
221.454961351109, 220.95682356359, 220.445023295899, 219.924404781116,
219.403389529339, 218.88530175, 218.378256524002, 217.882933067039,
217.397386136205, 216.921817310201, 216.454611391707, 215.984877646023,
215.50876296071, 215.018672519419, 214.51462061468, 213.991720391506,
213.454336911796, 212.907456802085, 212.34957912176, 211.785428890574,
211.217274920029, 210.65034832934, 210.089772589538, 209.550411984895,
209.04869263392, 208.596846002682, 208.192579721103, 207.827692666835,
207.481745734835, 207.129630542572, 206.756514631536, 206.359570313963,
205.951831445474, 205.540582237763, 205.137406238673, 204.739430500441,
204.32752828419, 203.884327082834, 203.40106047782, 202.882839792132
), V5 = c(247.253076275209, 247.666689190985, 247.606310543649,
247.547739991371, 247.492902785217, 247.444192265313, 247.404598605725,
247.376411620011, 247.360554808759, 247.354950990327, 247.355325830061,
247.356755410001, 247.355374526673, 247.349593038983, 247.338336873903,
247.319018763008, 247.290260730096, 247.250866985579, 247.201788518557,
247.145173303549, 247.084612099233, 247.024232691108, 246.96678125726,
246.914326873819, 246.8659987676, 246.818690657025, 246.768022195506,
246.712434325847, 246.6529744292, 246.591936710812, 246.530521080133,
246.469431282949, 246.408215458628, 246.343444800624, 246.27347246623,
246.194302445092, 246.102249186779, 245.993279600228, 245.869830099101,
245.738116061633, 245.604788905026, 245.474912959814, 245.350217384966,
245.231111105075, 245.118352005408, 245.012596405117, 244.915173917605,
244.824620520579, 244.735372154443, 244.642676433661, 244.544802916204,
244.444945691068, 244.348915383423, 244.261960521966, 244.187504259114,
244.125516882205, 244.074409280046, 244.030967641594, 243.991962853134,
243.955729060899, 243.922546964241, 243.894413631016, 243.872980230431,
243.858764444866, 243.851178441494, 243.849077014124, 243.851190085077,
243.855978440196, 243.861740581271, 243.867022735832, 243.871230183108,
243.875240650383, 243.88014773269, 243.886630674707, 243.893315554404,
243.897163678352, 243.89491018853, 243.8852797719, 243.868871498642,
243.847308900227, 243.822535848646, 243.796244966181, 243.770400942538,
243.745875265347, 243.722933276947, 243.700012537055, 243.674107217076,
243.643324695952, 243.607245559772, 243.567282359555), V6 = c(218.506110693017,
219.686373857638, 220.80986670182, 221.979765967016, 223.049625573943,
223.70213147698, 223.600965331256, 222.698922624586, 221.231068678535,
219.515486066369, 217.703777272023, 215.900098465694, 214.096105982454,
212.101345919303, 210.190088668134, 209.351424263804, 209.440061093739,
208.293849202205, 205.794185979436, 203.040358839666, 200.585523299823,
198.627721433822, 196.954240993354, 195.354873413615, 193.720492063926,
191.993088165467, 190.190641299941, 188.440428796291, 186.748992806273,
184.947149867057, 183.244754862898, 182.011642909152, 180.591401665671,
178.76764486427, 177.055973600571, 175.903619723177, 175.561340296572,
176.035641460277, 177.113543362917, 178.461819863897, 179.883966220502,
181.256301356353, 182.579821004423, 184.046734851384, 185.836245524309,
188.015264665033, 190.53240694469, 193.272931235783, 196.118951687063,
198.977703529312, 201.620712970462, 203.783200709525, 205.503499807243,
206.862409476056, 207.942678495566, 208.871691661372, 209.751660010553,
210.55570470269, 211.270010216347, 211.919014206651, 212.081378643191,
211.14828946494, 209.841022365372, 208.653709571572, 207.440015997988,
206.138594054999, 204.719911633923, 203.171843357273, 201.517136845011,
199.855041236237, 198.346557034031, 197.194668936763, 196.545914143282,
196.477310871163, 196.936478376011, 197.735581902005, 198.633396102401,
199.361219205372, 199.686506860322, 199.455352442737, 198.693427589303,
197.583624940463, 196.324745327191, 195.13784171566, 194.171677258684,
193.491615219708, 193.137449958667, 193.025767131504, 193.125820654388,
193.539987389851), V7 = c(54.9644160370263, 40.1189099453233,
34.5740305579775, 32.5016991249785, 27.4483859631039, 15.3581825584586,
-3.23600998306826, -23.0581917053714, -38.6906044118474, -48.1042396554854,
-52.0211361419906, -53.4596609051209, -54.9986722739059, -54.6823098127378,
-45.6489995377139, -28.0493818934812, -20.4761588552912, -37.110965152763,
-61.6414579598598, -72.2722900183545, -68.5213701129446, -60.0822690411778,
-52.4725301468913, -48.7525059733258, -49.0297068513153, -50.8929738161912,
-51.7749526065722, -51.3158910990465, -50.2762034076858, -48.255618974491,
-46.138844689408, -46.9470782604168, -48.1302309707482, -48.9001136517256,
-44.3811929913082, -30.4806629718139, -10.0367025462385, 11.1240027635677,
27.573874708254, 36.7426321791337, 39.9868022114109, 40.2688397753311,
41.0228349262637, 45.3088805326236, 53.7069201811144, 63.8631251779578,
72.5883352337391, 78.6839250020183, 81.7518339571473, 80.743483955464,
74.4584265138868, 63.8832738738687, 52.1572057361882, 41.5118982840146,
33.4609578532465, 28.5247147136518, 25.7271924915013, 23.5875276104449,
20.7582964718266, 13.9218222661232, -0.919329898905578, -19.8607822002949,
-32.0229404811507, -35.4719836309114, -36.6937306645807, -38.9918098252683,
-41.9271678709482, -44.9760359215027, -47.0974850090785, -46.5545111183888,
-41.8458212818634, -32.2506818860908, -18.4345430673698, -2.96728733869023,
10.8302333095278, 20.0013767816711, 22.659933876692, 18.2813737670982,
7.82377573915431, -6.08583752023972, -19.6052893797683, -29.4648039043913,
-33.9117373755672, -32.917811540577, -27.6975776990766, -19.8924127048628,
-11.5004523135903, -3.76863197570263, 3.74207935315723, 11.560497774965
), V8 = c(159.293927504914, 72.3883850945661, -71.0084350953145,
-157.856556857663, -177.00554710696, -178.317037243782, -178.055136408475,
-177.824016066419, -177.6250281113, -177.4514922881, -177.290496619937,
-177.128825377031, -176.959406963087, -176.782453075151, -176.517253859305,
-175.96348820455, -175.190624821963, -174.700809199787, -174.511562908076,
-174.369139733249, -174.177669696731, -173.906156944182, -173.535226055074,
-173.062221173025, -172.506097075525, -171.90103960845, -171.284516587405,
-170.687423185897, -170.130944734713, -169.62716475187, -169.179600433639,
-168.784185781334, -168.432144279701, -168.115430843157, -167.832080030439,
-167.58701995647, -167.388715158312, -167.24512879833, -167.161632904219,
-167.139385723799, -167.175659886351, -167.265507864388, -167.403173794388,
-167.582756548443, -167.799531513718, -168.052339662852, -168.343381722393,
-168.673965944675, -169.042750088636, -169.447235767376, -169.887222743903,
-170.364553504055, -170.879288189246, -171.424542039734, -171.984961344876,
-172.542449289639, -173.083328471416, -173.600386896672, -174.088678181392,
-174.54068213537, -174.94645168287, -175.299463935392, -175.604199733357,
-175.877167460519, -176.138189823576, -176.399552340593, -176.66059159355,
-176.910371463733, -177.134426801918, -177.320531797548, -177.461327627444,
-177.555041112992, -177.606102037448, -177.623466028151, -177.616534625189,
-177.591456067558, -177.550466519513, -177.493975143847, -177.422083688544,
-177.334647887677, -177.231215359635, -177.112776922012, -176.984421932529,
-176.856525882669, -176.744183059778, -176.663265976465, -176.624271509496,
-176.628507345565, -176.670788271004, -176.746236125494), V9 = c(4.92179362638642,
4.45799145175165, 3.3142039265343, 2.2180986760283, 2.19253654220885,
2.75644354895474, 2.87579814794824, 2.56388872662233, 2.20030616765693,
1.88658051271806, 1.61369838922698, 1.36456236302468, 1.1246550001753,
0.859412609329144, 0.574024202847935, 0.536947947334694, 1.1229880448779,
2.03167746641588, 2.45197673151306, 2.22444301866936, 1.97085250007109,
2.02379954624926, 1.87832656594216, 1.65846674309255, 1.71474098773618,
2.01203252409553, 2.39959618941928, 2.69444035331993, 2.70471366054553,
2.42710132196309, 2.2065443976429, 2.37365419463478, 2.60338280076387,
2.57070942196687, 2.40087491789891, 2.10507860447239, 1.93303465881098,
1.96537799291892, 2.07806860623314, 2.23058789058307, 2.42662680623326,
2.6485584531679, 2.79132634856552, 2.68371169097736, 2.24101321753584,
1.5363108532042, 0.856512740292693, 0.598891393913475, 0.84853115782464,
1.36615626094641, 1.94735012797043, 2.34883820489323, 2.22762316220787,
1.58999650565364, 0.997099472422149, 1.05829046320003, 1.71186384166178,
2.23640703246486, 2.06099664143051, 1.39252499562373, 0.770866518925266,
0.589098018487265, 0.897974700574298, 1.42359498039829, 1.95719213635683,
2.42584468730935, 2.72180218117444, 2.7413158008594, 2.56998781213098,
2.38656828529225, 2.28322037883289, 2.27453720291951, 2.35232022279321,
2.50417848456058, 2.69547318585436, 2.82071143328568, 2.74275740403399,
2.45104807156726, 2.03599988832058, 1.55558507367217, 1.04203002189925,
0.617449227876231, 0.527625421413082, 0.883703135286949, 1.47366025502406,
2.07335983162881, 2.53716795522192, 2.69765677114675, 2.51693976755006,
2.19809603906687)), .Names = c("V1", "V2", "V3", "V4", "V5",
"V6", "V7", "V8", "V9"), row.names = c(NA, 90L), class = "data.frame")
首先,对于动态时间扭曲,我需要时间序列数据帧,我使用“动物园数据”,v4和v5是我想要使用的两个功能,V2是“时间”:
zooData1 <- zoo(AIB_nf1$V4, AIB_nf1$V2)
zooData2<-zoo(AIB_nf1$V5, AIB_nf1$V2)
test<-cbind(zooData1,zooData2)
然后,我使用“大内存”包来处理这个“大矢量”。但首先,我需要将“动物园数据框”转换为“大内存”包可以读取的矩阵:
test<-as.matrix(test)
big1<-as.big.matrix(test)
然后,我对第二个数据框重复了相同的步骤:
zooData4<-zoo(AIB_nf3$V4, AIB_nf3$V2)
zooData5<-zoo(AIB_nf3$V5, AIB_nf3$V2)
ref<-cbind(zooData4,zooData5)
ref<-as.matrix(ref)
big2<-as.big.matrix(ref)
然后,我使用DTW包来计算这两个数据集之间的DTW距离:
alignment<-dtw(big1,big2,step.pattern =rabinerJuangStepPattern(1,slope.weighting="c",smoothed=TRUE))
我收到了错误消息: “as.vector(数据)出错: 没有方法可以将这个S4类强制转换为矢量“