- Added a boosted condition estimator to
benchmark(),reference_use(),variable_importance(), andhcas_inspection(). The default is nowboost = k2, withk1 = 70andk2 = 10: the highest-probability retained site's kernel weight is multiplied by the boost factor before computing condition, condition attribution, or variable-importance weights. Setboost = NULLorboost = NAto use the previous unboosted LDC/ordinary-kernel behaviour. - Renamed the public
k_predandk_obsarguments tok1andk2, respectively, to identify them as the first- and second-stage reference filters rather than imply that each filter is tied exclusively to an environmental or observed-RS definition. - Added an experimental expanded temporal reference mode to
benchmark(). It is off by default; supplytemporal_sigmato enable it.temporal_sigmacontrols the bandwidth of the Gaussian temporal weighting used to select and weight the most relevant reference year for each site. Reference samples can be supplied as a named list of yearly matrices. This expands the temporal representation of reference sites rather than applying a post-hoc correction to the target condition score. - Added selectable retained-reference distance kernels.
kernel = "Gaussian"remains the default and usesexp(-(distance / lambda)^2);kernel = "Cauchy"uses the standard Cauchy shape1 / (1 + (distance / lambda)^2). Lower-casegaussianandcauchyare also accepted. The same option is used bybenchmark(),reference_use(),hcas_inspection(), andvariable_importance(). - Added raster target support to
hcas_inspection(). Raster inputs use x/y target coordinates, can extract reference-sample values from xy-onlysamples, and support Leaflet map clicks that snap the clicked location to the containing raster cell centre. - Added
reference_use()to assess how reference sites are used during benchmarking. A single run returns each site'spredictedselection count amongk1,densityretention count amongk2, andconditionattribution. Its attribution uses the selected distance kernel andboostsetting. Expanded temporal references are not yet supported byreference_use(). - Added
variable_importance()to attribute the observed target-to-reference departure to each RS variable. Theoutputargument selects per-variable layers of"importance"(default; signal-to-noise ratio: the weighted mean absolute departure of the target from its references, standardised by the weighted spread among the references themselves),"signal"(the raw weighted departure contribution, which sums per cell to the total observed departure), or"share"(the per-cell departure partition, where a cell's variables sum to one — a direct percent attribution).aggregate_importance()summarises the per-cell scores across the landscape into a median ranking and a mean relative-share attribution. Its retained-reference weighting uses the same selected distance kernel andboostsetting asbenchmark(). Expanded temporal references are not yet supported.
- Consolidated package colour helpers into a single
palettes()function and removedhcas_color()andref_density_color(). - Changed
drop_featuresso excluded RS variables are removed from the active feature set before C++ distance calculations, instead of being zeroed in place.
- Renamed the reference density function to
ref_density(), renamed the radial counting function (fromproximity()) toradial_count(), and changed the reference density object class toreference_density. - The order of input data has completely changed and both
ref_density()andbenchmark()functions require data with x, y, predicted, and observed remote sensing variable order. - Complete re-write of the main C++ functions (for
ref_density(),benchmark(), andradial_count()) using vectorised operations, including changing feature space distance calculations fromdoubletofloat32, resulting in significant speed improvement (~10x) with no loss of accuracy. - The Eigen C++ library is adapted as the main matrix engine.
- The dependency on KDtrees is dropped while keeping or even improving the speed.
- The reference density now performs only one-way pairwise distance calculations. As a result, the raw reference density values are exactly halved compared to before. This has no impact on the normalised reference density or the final output.
- The "corner value" in the reference density (previously calculated as the count of values) is no longer computed, since it is simply equal to the number of samples.
- The
calibrate()function no longer performs interpolation. The output is now fully fitted using a monotonic spline. - A fast spatial distance calculation is implemented (no difference for projected CRS with 0.01 meters accuracy).
- The geographic distance for lat/long is now corrected for the latitude of the source cell, not just the radius transformation to degrees.
- A new function (
tiling()) is added for making raster tiles using raster or matrix data. - The
NaNpixels are now directly handled within C++ code. - Expanded the test suite with additional C++-focused coverage, including edge cases and thread-consistency checks for core workflows.
- Added
drop_featuresparameter to fully exclude specific remote sensing variables from both theref_densityandbenchmarkfunctions. - Added a condition to ensure that
k_obsis less than or equal tok_pred. - A new reference density normalisation method has been implemented in R using the
legacy = FALSEargument to mitigate edge effects. - The zero-zero point (reference self-count) in the raw reference density is now excluded prior to normalisation.
- The
ref_densityfunction arguments have changed todataandsamples.
- Added a
scale_factorparameter to allow user-defined correction of geographic CRS distance calculations, enhancing flexibility in handling distance conversions (previously set to a default value only). - Enhanced C++ code for improved efficiency in point class creation.
- Replaced the natural spline in the
calibratefunction with a monotonically increasing spline function.
- Deprecated the linear (piece-wise) calibration method, superseded with the spline method.
- The arguments of
calibrateare updated withx_valuesandy_values. - Fixed the benchmarking
self_excludefloating point error.
- Added the
proximityfunction to count the number of samples within a specified radius. - Removed the requirement for
add_xyin thebenchmark()function. - Removed
filenameandwoptparameters from all functions and replaced them with additional arguments...for more flexibility. - Internal
terrafunctions have been improved by eliminating the need for explicit creation of x and y coordinates.
- Check for availability of the
terrapackage is added when input is a raster - improved documentation and imports
- a bug fix in benchmarking
- Added the geographic distance penalty for selecting the nearest predicted neighbours (
xy_penaltyandxy_statsparameters) - Added an option for excluding self-assessment for benchmark sample sites (default).
- Translated all legacy HCAS codes to R and Rcpp