<div dir="ltr"><p class="MsoNormal" style="text-align:justify;margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:12pt;line-height:107%;font-family:"Times New Roman",serif">Pessoal,</span></p>
<p class="MsoNormal" style="text-align:justify;margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:12pt;line-height:107%;font-family:"Times New Roman",serif">quero encontrar o
horizonte de previsões, usando o expoente de Lyapunov.</span></p>
<p class="MsoNormal" style="text-align:justify;margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:12pt;line-height:107%;font-family:"Times New Roman",serif">O exemplo proposto no R, a
serie de lorenz.ts funciona. Porém, quando troco pela minha variável que estou
predizendo, da erro. Gostaria de entender qual parâmetro estou colocando
errado. Segue o código mínimo reproduzível.</span></p><p class="MsoNormal" style="text-align:justify;margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:12pt;line-height:107%;font-family:"Times New Roman",serif"><br></span></p><p class="MsoNormal" style="text-align:justify;margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:12pt;line-height:107%;font-family:"Times New Roman",serif">#=====================================</span></p><p class="MsoNormal" style="text-align:justify;margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:12pt;line-height:107%;font-family:"Times New Roman",serif">set.seed(22) <br>y_obs <- 1:100 + rnorm(100,mean=0, sd=5) # supondo essa ser a variavel observada (100 observações temporais)<br>y_estimado <- 1:80
# supondo essa ser a variavel estimada, até o tempo 80<br>y_pred <- 81:100 + rnorm(20,mean=0, sd=3) # suponha que usando uma rede recorrente chegue nesse resultado, como codigo minimo reproduzido, #simplifiquemos com uma rnorm com tendencia linear, para predição usando 80 tempos de predição<br>plot(y_obs)<br>points(1:80,1:80, type = "l")<br>points(81:100,y_pred, type = "l", col="blue")<br>legend("topleft", c("Observado","Estimado", "Predito"),<br> col=c("black","black", "blue"), pch = c(1,NA, NA), lty = c(NA,1, 1))<br><br># Horizonte de predicao usando o expoente de Lyapunov<br>require("tseriesChaos")<br>y_pred = as.ts(y_pred)<br>output <-lyap_k(y_pred, m=3, d=2, s=200, t=2, ref=2, k=2, eps=4) <br>par = lyap(output, 0.73, 2.47)<br>lambda = par[2]<br>plot(output)<br></span></p><p class="MsoNormal" style="text-align:justify;margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:12pt;line-height:107%;font-family:"Times New Roman",serif">#===================================</span></p><p class="MsoNormal" style="text-align:justify;margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:12pt;line-height:107%;font-family:"Times New Roman",serif">O erro é esse:</span></p><p class="MsoNormal" style="text-align:justify;margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:12pt;line-height:107%;font-family:"Times New Roman",serif">> output <-lyap_k(y_pred, m=3, d=2, s=200, t=2, ref=2, k=2, eps=4) <br>Finding nearests<br>Error in find_knearests(series, m = m, d = d, t = t, ref = length(ref), : <br> cannot allocate memory block of size 134217728 Tb<br></span></p><p class="MsoNormal" style="text-align:justify;margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:12pt;line-height:107%;font-family:"Times New Roman",serif"><br></span></p><p class="MsoNormal" style="text-align:justify;margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:12pt;line-height:107%;font-family:"Times New Roman",serif"></span></p><p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:12pt;line-height:107%;font-family:"Times New Roman",serif">OBS: No meu caso, já havia testado e a dimensão m e d,
são exatamente 3 e 2. Porém, não sei como controlar os demais parâmetros.</span></p><p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:12pt;line-height:107%;font-family:"Times New Roman",serif"><br></span></p><p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:12pt;line-height:107%;font-family:"Times New Roman",serif">Fico no aguardo, se alguém conseguir me explicar o problema.</span></p><p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:12pt;line-height:107%;font-family:"Times New Roman",serif">Agradeço e obrigado.</span></p></div>