Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# pc 0.3

### enhancements

* Clarify output indexing and boundary handling in `fnn` generic (#69).

# pc 0.2

### new
Expand Down
6 changes: 3 additions & 3 deletions R/fnn.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.fnn_ts = \(data, target, E = 2:10, k = 1, tau = 1, style = 1, lib = NULL, pred = NULL,
.fnn_ts = \(data, target, E = 10, k = 1, tau = 1, style = 1, lib = NULL, pred = NULL,
dist.metric = c("euclidean", "manhattan", "maximum"), rt = 10, eps = NULL,
threads = length(E), higher.parallel = TRUE, ...) {
dist.metric = match.arg(dist.metric)
Expand All @@ -11,7 +11,7 @@
k, threads, higher.parallel, NULL, NULL))
}

.fnn_lattice = \(data, target, E = 3:10, k = 1, tau = 1, style = 1, lib = NULL, pred = NULL,
.fnn_lattice = \(data, target, E = 10, k = 1, tau = 1, style = 1, lib = NULL, pred = NULL,
dist.metric = c("euclidean", "manhattan", "maximum"), rt = 10, eps = NULL,
threads = length(E), higher.parallel = TRUE, detrend = FALSE, nb = NULL, ...) {
if (is.null(nb)) nb = sdsfun::spdep_nb(data)
Expand All @@ -25,7 +25,7 @@
k, threads, higher.parallel, nb, NULL))
}

.fnn_grid = \(data, target, E = 3:10, k = 1, tau = 1, style = 1, lib = NULL, pred = NULL,
.fnn_grid = \(data, target, E = 10, k = 1, tau = 1, style = 1, lib = NULL, pred = NULL,
dist.metric = c("euclidean", "manhattan", "maximum"), rt = 10, eps = NULL,
threads = length(E), higher.parallel = TRUE, detrend = FALSE, ...) {
dist.metric = match.arg(dist.metric)
Expand Down
6 changes: 3 additions & 3 deletions man/fnn.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/FNN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,9 @@ Rcpp::NumericVector RcppFNN(
result.names() = resnames;

// Terminal-friendly hint (one-time, non-intrusive)
Rcpp::Rcout << "[fnn] Output 'E:i' corresponds to the i-th valid embedding dimension.\n"
<< "[fnn] Input E values exceeding max embeddable dimension were truncated.\n"
<< "[fnn] Please map output indices to original E inputs before interpretation.\n";
Rcpp::Rcout << "[fnn] Input E values exceeding max embeddable dimension were truncated, and values < 2 were clamped to 2.\n"
<< "[fnn] Max embedding dimension E_max is auto-computed, with results returned for dimensions 1 through E_max.\n"
<< "[fnn] Output 'E:i' (where i = 1 to E_max-1) corresponds to the comparison between dimension i and i+1.\n";

return result;
}
Loading