From 2167103cdae08b7259af8344718da9990d78c8c7 Mon Sep 17 00:00:00 2001 From: Alessandro Santuz <7524938+alesantuz@users.noreply.github.com> Date: Fri, 5 Jan 2024 14:52:46 +0100 Subject: [PATCH] Small correction to function `sMLE` --- R/sMLE.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/sMLE.R b/R/sMLE.R index 8d46f58..4d0760d 100644 --- a/R/sMLE.R +++ b/R/sMLE.R @@ -75,7 +75,7 @@ sMLE <- function(synergies, mean_period, future_pts, norm, pts, R2_threshold = 0 # can be 50 but ideally not less (in case of 200-point cycles, 100 can be a good choice) upper_limit <- nrow(P) - future_pts nearest_n <- FNN::get.knn( - data = P[1:(nrow(P) - future_pts), ], + data = P[1:upper_limit, ], k = mean_period )$nn.index