ltsa() can now retain extra nonconstant modes from one fixed LTSA operator with spectral_dim and output = "result". The usual embedding remains ndim-dimensional, while spectral_embedding and eigen$spectral expose the larger block and its separate boundary diagnostics. Defaults and ordinary return shapes are unchanged.
Connected-component diagnostics now use a compiled union-find scan, avoiding substantial transient R allocation when assembling larger neighborhood graphs.
Serial sparse-matrix finalization now avoids a redundant aggregation pass while preserving the exact LTSA matrix construction.
Fixed numerical errors in local LTSA projection for constant and nearly constant neighborhoods and for inputs at very small or large scales.
LTSA assembly now checks for user interrupts during serial processing and parallel preparation and finalization. Serial assembly also reuses its SVD workspace across neighborhoods.
output = "B" now honors normalize: it returns the raw LTSA alignment matrix by default and the normalized operator supplied to eigenanalysis when normalize = TRUE, while still skipping eigenanalysis.
When computed neighbors are requested and n_neighbors is omitted, the default is now the smaller of 15 and the largest neighborhood permitted by the dataset and include_self. Explicit values and precomputed-neighbor inference retain their existing validation and behavior.
Assembly resources are now controlled only by n_assembly_threads: 1 requests serial assembly and larger values request parallel assembly. The copy_max_mib argument was removed; row-major copying is now an internal optimization.
eig_method now defaults to "auto", which retains the existing dense threshold policy and otherwise uses RSpectra. Explicit "rspectra", "irlba", and "svdr" requests now always use the named backend, including for small inputs. Dense thresholds are accepted only with "auto", backend controls only with their explicit backend, and shift_eps only with an explicit iterative method. Existing calls that tune a backend must now name it explicitly. In detailed results, eigen$method records "auto" or the explicit canonical method, while eigen$backend$name records the backend that actually ran.
New argument: eig_k, controls the number of eigenvectors to return before the Rayleigh-Ritz processing step and final ndim return. A larger candidate span can rescue some clustered or incompletely converged fixed-operator solves, but can also be expensive and remain unsuccessful; increase it explicitly and report the retry rather than treating a wider span as a universal default.
New argument: output. output = "result" returns compact eigenanalysis and assembly diagnostics. output = "B" replaces the older ret_B = TRUE argument.
Removed the automatic adaptive rescue/refinement introduced in 0.0.0.9001. Eigenanalysis now makes one fixed-width candidate request controlled by eig_k, followed by Rayleigh-Ritz processing and diagnostics; request a larger eig_k explicitly when a wider candidate span is needed.
flotsam 0.0.0.9001
New parameter: n_assembly_threads to control number of threads to construct the B matrix.
You can now pass a precomputed nearest-neighbor index (or the full dense neighbor graph list created by rnndescent) directly to nn_method, for example ltsa(X, nn_method = nn$idx). Leave n_neighbors unset when using this because the correct number of neighbors is inferred from the graph.
LTSA matrix construction is improved for high-dimensional inputs (ncol(X) larger than n_neighbors) by using a row-major centered Gram and a triangular matrix taking advantage of B matrix symmetry.
New parameter: copy_max_mib to control the size cap for the optional row-major dense copy. The default is 256 MiB.
Replaced the old sparse slot-search LTSA assembly path with the serial append/finalize C++ builder. Now modestly faster and slightly less peak memory usage.
More robust eigenanalysis convergence.
Iterative eigenanalysis now extracts more eigenvectors than requested and uses null-aware Rayleigh-Ritz polishing on the candidate subspace to attempt a better final result. verbose = TRUE reports residual, rank, and boundary-gap diagnostics. The eig_method = "irlba" and "svdr" paths now share this postprocessing, but rely on post-hoc diagnostics because they do not report RSpectra-style convergence counts.
LTSA now warns when final eigenanalysis diagnostics indicate an ambiguous low-energy eigenspace, such as extra near-zero nonconstant modes or a weak boundary gap after the requested embedding dimensions. This can indicate a disconnected or weakly connected neighborhood graph, too-small n_neighbors, or ndim cutting through a low-energy eigenspace.
If the ndim eigenvalues appear to contain only part of a near-zero low-energy cluster, a further refinement step is added with tighter settings and more candidates in case eigenvectors have been missed.
Better argument validation and eigenanalysis error reporting.
Updated GitHub Actions.
flotsam 0.0.0.9000
Added a NEWS.md file to track changes to the package.