Package: FINN 0.2.0

Yannek Käber

FINN: Forest Informed Neural Networks

A hybrid dynamic forest (gap) model (FINN) that can be configured as a fully mechanistic, process-based model, like classic forest gap models, or with its demographic processes (growth, mortality, regeneration) replaced by deep neural networks (DNNs), or any combination of the two. Provides functions to define a model and its mechanistic or empirical components, calibrate it to forest inventory data, and interpret the calibrated processes. FINN is implemented with the 'torch' package, which supplies GPU support and the automatic differentiation used to calibrate the model by stochastic gradient descent; no knowledge of 'torch' is required. The hybrid modeling approach is described in Pichler and Käber (2026) <doi:10.1111/2041-210x.70347>.

Authors:Yannek Käber [aut, cre], Maximilian Pichler [aut]

FINN_0.2.0.tar.gz
FINN_0.2.0.zip(r-4.7-x86_64)FINN_0.2.0.zip(r-4.7-arm64)FINN_0.2.0.zip(r-4.6-x86_64)FINN_0.2.0.zip(r-4.6-arm64)FINN_0.2.0.zip(r-4.5-x86_64)
FINN_0.2.0.tgz(r-4.6-x86_64)FINN_0.2.0.tgz(r-4.6-arm64)FINN_0.2.0.tgz(r-4.5-x86_64)FINN_0.2.0.tgz(r-4.5-arm64)
FINN_0.2.0.tar.gz(r-4.7-arm64)FINN_0.2.0.tar.gz(r-4.7-x86_64)FINN_0.2.0.tar.gz(r-4.6-arm64)FINN_0.2.0.tar.gz(r-4.6-x86_64)
FINN_0.2.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
FINN/json (API)

# Install 'FINN' in R:
install.packages('FINN', repos = c('https://finnverse.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/finnverse/finn/issues

Pkgdown/docs site:https://finnverse.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:

On CRAN:

Conda:

cpp

6.84 score 3 stars 76 scripts 367 downloads 37 exports 32 dependencies

Last updated from:609a30c72e. Checks:14 OK, 1 ERROR. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK163
linux-devel-x86_64OK179
source / vignettesERROR279
linux-release-arm64OK148
linux-release-x86_64OK170
macos-release-arm64OK196
macos-release-x86_64OK359
macos-oldrel-arm64OK215
macos-oldrel-x86_64OK258
windows-devel-arm64OK474
windows-devel-x86_64OK189
windows-release-arm64OK414
windows-release-x86_64OK156
windows-oldrel-x86_64OK141
wasm-releaseOK141

Exports:aggregate_results_oldALEapply_env_scalingarray2obsDFaverageConditionalEffectsBA_standBA_stembinomial_from_bernoullibinomial_from_gammaclimateDF2arrayCohortMatcompetitioncompute_env_scalingconditionalEffectscreateHybridcreateProcessdbh2bafeature_importancefinnFINN.seedfitgroupby_meangrowthheightindex_speciesmakeInitCohortsmakeObsDatamortalitynp_runifobsDF2arrayspred2DFregenerationregeneration_saturationresolveSiteIDsrweibull_cohortssample_poisson_relaxedsimulateForest

Dependencies:abindbitbit64callrclicorocpp11data.tabledescfarverggplot2gluegtableisobandjsonlitelabelinglifecyclemagrittrotelprocessxpsR6RColorBrewerRcpprlangS7safetensorsscalestorchvctrsviridisLitewithr

Fitting FINN to forest inventory data (Oregon, US FIA)
The data | Initial cohorts | Fit a Process-FINN | Replace growth with a neural network (Hybrid-FINN) | Training convergence | What the model learned: summary() | Assess the fit: in-sample and on held-out sites | Interpreting the growth process with ALE | Environmental niches | Which drivers matter: feature_importance() | Response to size and light: did the network recover the mechanistic form?

Last update: 2026-09-22
Started: 2026-07-14

Mortality: a binomial response and a neural-network process
Mortality is a proportion, not a rate | Why binomial and not mse | Two models: mechanistic mortality, and mortality as a network | Scoring mortality: why not Spearman | What the network learned: ALE

Last update: 2026-09-22
Started: 2026-07-14

Introduction to FINN
How FINN works | Installation | Run the model | Species parameters | Environment and disturbances | Simulate

Last update: 2026-08-11
Started: 2026-07-14

Parameterising FINN from Ellenberg indicator values
From Ellenberg to FINN parameters | Simulate succession | The successional pattern | Ecological plausibility of the successional pattern | Adding a climate gradient | References

Last update: 2026-07-28
Started: 2026-07-14

Preparing your data for FINN
What FINN needs | Start from a raw tree list | Acquiring raw data (example: US FIA) | Define status flags | Build obs_dt with makeObsData() | Environmental data | Resolve IDs across tables | Initial cohorts | Checklist before fitting

Last update: 2026-07-28
Started: 2026-07-14

Readme and manuals

Help Manual

Help pageTopics
Accumulated local effect plotsALE
Apply stored z-standardization to environmental predictorsapply_env_scaling
Transform Arrays to Observation Data Tablearray2obsDF
Average conditional effects of a FINN modelaverageConditionalEffects
Calculate the Basal Area of a StandBA_stand
Calculate the basal area of a tree given the diameter at breast height (dbh)BA_stem
Draw binomial counts from per-trial Bernoulli probabilitiesbinomial_from_bernoulli
Convert a climate data frame to a FINN environment arrayclimateDF2array
Cohort Matrix ClassCohortMat
Compute the fraction of available light (light) for each cohort based on the given parameterscompetition
Compute per-predictor environmental scalingcompute_env_scaling
Conditional effects of a FINN modelconditionalEffects
Define a hybrid (deep-neural-network) demographic process for FINNcreateHybrid
Define a demographic process for FINNcreateProcess
Convert DBH to basal areadbh2ba
Permutation feature importance for FINN demographic ratesfeature_importance
Oregon FIA calibration data: site climatefia_env_dt fia_env_test
Oregon FIA calibration data: initial tree listfia_init_test fia_init_trees
Oregon FIA calibration data: training sitesfia_obs_dt fia_obs_test
Oregon FIA calibration data: species codingfia_species_dt
Forest Informed Neural Networkfinn
Set Seed for Reproducibility in R and TorchFINN.seed
Fit FINNfit
Calculate growthgrowth
Calculate the height of a tree based on its diameter at breast height and an allometry parameterheight
Make initial cohorts for FINNmakeInitCohorts
Create observation data from treesmakeObsData
Mortalitymortality
Generate random numbers from a uniform distributionnp_runif
Convert observation data frame to arraysobsDF2arrays
Plot ALE curves of a FINN modelplot.FINNale
Convert Prediction Arrays to Data Framespred2DF
Predict from a FINN modelpredict.finn_class
Calculate the regeneration of forest patches based on the input parametersregeneration
Regeneration with Beverton-Holt density saturationregeneration_saturation
Resolve site, patch, and year indices for FINN inputsresolveSiteIDs
Generate Cohorts Using Weibull Distributionrweibull_cohorts
SimulatesimulateForest
Summarise a fitted FINN modelsummary.finn_class