tune_max: a grid combination whose fits all failed was assigned the previous combination’s model/performance (stale mod); now initialised to NULL and checked with is.null() (#478)
fit_max: the final refit fallback used the CV loop index in its check and could discard a successful fit; it now uses is.null(mod) and falls back on presences + background (data_2) (#478)
tune_svm: removed na.omit() on partition performance so all combinations are compared across the same partitions (#478)
fit_gbm: final model now uses bag.fraction = 0.9, consistent with the CV models; tune_gbm validity guard also uses 0.9 (#478)
occfilt_geo: moran method no longer collapses to one record (Inf distance) when no Moran’s I falls in the selection window; the closest value is used, and the threshold comparison is now numeric (#479)
sample_pseudoabs: factor maskval now matches raster category IDs in the kmeans, env_const, env_clust and env_kmeans methods (#479)
get_absences: NA in the species column no longer creates phantom NA rows (#479)
calib_area: mcp/bmcp with three or more groups no longer errors (#479)
get_absences: Function to build a presence-absence database from multi-species occurrence data, by @sjevelazco
occ_reproject: Function to reproject occurrence coordinates to a new coordinate reference system, by @sjevelazco
minor warnings and package formality were fixed, by @sjevelazco467
correct_colinvar: Unicode box-drawing characters in the documentation’s example directory tree were replaced with plain ASCII, fixing a LaTeX error that caused the PDF manual build to fail on CRAN, by @sjevelazco
Vignette v07_Complete_workflow: two dataset links were missing the https:// scheme (www.doi.org/...), which CRAN flagged as invalid URIs; fixed to https://doi.org/..., by @sjevelazco
tune_max: fixed a bug where the default hyperparameter grid (used when grid = NULL) tested a regmult step of 0.05 instead of the documented 0.5, producing ~10x more combinations than intended, by @sjevelazco
Test suite and vignette runtimes were substantially reduced in response to CRAN’s request (test suite ~17 min -> ~3 min; vignette rebuilding ~14 min -> ~2 min, as measured locally) by shrinking hyperparameter grids, dataset sizes, and replicate/fold counts in tests and vignettes, and by gating the most expensive/redundant test cases behind skip_on_cran(), by @sjevelazco
Further reduced test and vignette runtimes after win-builder’s automated “Overall checktime > 10 min” rejection, by gating most secondary/edge-case assertions in the tune_* and sdm_uncertainty test files behind skip_on_cran() (kept a representative case running on CRAN for each), and by shrinking dataset sizes and search-grid sizes (part_sband, part_sblock, occfilt_env, occfilt_geo) further in the vignettes, by @sjevelazco
Test and vignette runtimes were cut again after CRAN’s incoming check (tests ~6 min, vignettes ~6 min on win-builder): all but one representative test_that() block per test file (or none for the slowest files) now run only when NOT_CRAN=true, and vignettes v01, v02, v03, v05 and v06 are now precomputed (source in vignettes/*.Rmd.orig, excluded from the build), by @sjevelazco
Shortened the \donttest{} examples of the slowest functions (sdm_varimp, fit_max, fit_gau, tune_*, esm_gam, fit_gam, occfilt_geo, sdm_summarize, esm_max) by using smaller hyperparameter grids, fewer folds/replicates and subsampled datasets (~10 min -> ~3.5 min locally), by @sjevelazco
fit_raf: the ntree argument was ignored in the no-partition fit and in the cross-validation fits (hardcoded to 500); it is now used everywhere, reported in #474, by @sjevelazco
tune_raf: the final model now uses the tuned ntree instead of the randomForest default, #474, by @sjevelazco
esm_gbm: n_trees and shrinkage were hardcoded and are now forwarded to fit_gbm; esm_net: size and decay are now forwarded to fit_net, #474, by @sjevelazco
esm_svm: performance_part was labelled esm_gau; now esm_svm. fit_svm and fit_max: partition ids in performance_part were wrong (earlier folds were relabelled), #474, by @sjevelazco
Removed the DeepWiki badge from README.md, whose URL returned HTTP 429 in CRAN’s URL check, by @sjevelazco
sdm_eval: fixed a bug in the KAPPA metric calculation, by @sjevelazco
sample_background and sample_pseudoabs: fixed three bugs in categorical maskval/k-means handling reported in #472: maskval on a factor raster was resolved to its row position in the levels table instead of its actual category ID; the k-means branch of sample_pseudoabs masked and overwrote the environmental raster with the region raster instead of the other way around; and the internal kf() helper could fail with “differing number of rows” when the environmental raster had no NA cells, by @sjevelazco
flexsdm 1.4.0
map_env_dist: C++ function to calculate Euclidean and Mahalanobis distance was implemented, by @sjevelazco463
extra_eval: C++ function to calculate Euclidean and Mahalanobis distance was implemented, by @sjevelazco463
fit_dom: C++ function to calculate gower distance was optimized, by @sjevelazco463
map_env_dist: C++ function to calculate gower distance was optimized, by @sjevelazco463
msdm_posteriori: a new argument that assumes unsuitable cells with presences as patches. This is only used in the ‘lq’ approach, by @sjevelazco461
sdm_eval: Boyce metric was readapted based on enmSdmX package, by @sjevelazco457
msdm_posteriori: now car return semi-binary suitability maps, by @sjevelazco455
part_senv: new argument to use or not presences-absences coordinate to perform environmental partition, by @sjevelazco445
flexsdm 1.3.9
map_env_dist was improved. Now it is possible to calculate Euclidean and Mahalanobis distances in addition to the Gower distance (Domain algorithm), by @sjevelazco.
sdm_eval() now calculates three additional performance metrics: the Matthews Correlation Coefficient (MCC). the Continuous Ranked Probability Score (CRPS), and a prevalence-weighted average of TPR and TNR (W_TPR_TNR), by @sjevelazco445.
fit_gbm() and tune_gbm() were improved to prevent the argument is of length zero error. This was achieved by adding a safeguard that dynamically adjusts n.minobsinnode based on the size of the training data partition, ensuring it remains valid for the gbm algorithm, by @sjevelazco445.
sdm_uncertainty This new function calculates species distribution model uncertainty using a bootstrap procedure, by @sjevelazco#442
fit_ functions now can handle partition = NULL, by @sjevelazco#442
fit_, tune_, esm_ and fit_ensemble functions now return a performance table for each partition and replicate (performance_part), by @sjevelazco#432 and 434
p_pdp was improved to depict exactly training range values when projection data are used, by @sjevelazco#429
sample_pseudoabs a sample approach was implemented based on environmental K-means, by @sjevelazco#410
sample_pseudoabs K-means step was improved for the geoenv_const_kmeans approach, by @sjevelazco#410
p_extra Now can handle binary maps to plot suitability or extrapolation values in the geographical or environmental space, by @sjevelazco418
map_env_dist This new function calculates environmental distance between presences and projection data. Only the nearest Gower distance was implemented (Domain algorithm), by @sjevelazco419
fit_dom This is a new function to fit and validate the Domain algorithm, by @sjevelazco
flexsdm 1.3.6
occfilt_geo adapted to test different values for the three methods by @sjevelazco in 386
occfilt_env now can filter with several bins by @sjevelazco in 388
occfilt_select was created and a test protocol was written by @sjevelazco in 389
occfit_select included in vignette and website by @sjevelazco in 390
mean change in sdm_predict to handle 0 weight value for weighted mean by @sjevelazco in 391
documentation of occfilt_select was improved by @sjevelazco in 392
It is possible to tune ntree hyperparameter of random forest algorithm by @sjevelazco in 393
correct_colinvar can be used with species points by @sjevelazco in 394
correct_colivar was fixed and improved, FA method by @sjevelazco in 383
occfilt_geo ‘defined’ method was fixed by @sjevelazco in 384
flexsdm 1.3.4
it is possible to restrict the cell used to perform collinearity reduction analysis to a geographical area smaller than the full extent of environmental variables in correct_clinvar()
esm_ family function was improved and debugged
occfilt_geo has a new argument “rep” to control number o repetition to filter occurrences