
<!-- badges: start -->

[![Project Status: Active – The project has reached a stable, usable
state and is being actively
developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![License: GPL
v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
<!-- badges: end -->

<!-- [![R-CMD-check](https://github.com/FINNverse/FINN/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/FINNverse/FINN/actions/workflows/R-CMD-check.yaml) -->

<!-- README.md is generated from README.Rmd. Please edit that file -->

# Forest Informed Neural Networks (FINN)

FINN is an R package designed for modular, dynamic vegetation (forest)
models. Modularity is achieved by implementing all components and the
platform in R and by allowing users to pass their own processes to FINN
as R functions. Nevertheless, FINN is highly performant (has a low
runtime) because it is implemented in torch for R, which allows access
to highly optimised routines and enables FINN to run on the GPU.
Consequently, FINN scales extremely well with the number of sites.
Furthermore, FINN can seamlessly integrate neural networks into
processes, or even replace them entirely (hybrid modelling).
Additionally, FINN’s parameters can be optimised directly using
stochastic gradient descent.

## Internal workings of FINN

You can learn more about FINN in our preprint [Pichler & Käber, 2025 -
Inferring processes within dynamic forest models using hybrid
modeling](https://arxiv.org/abs/2508.01228)

## Installation

You can install the development version of FINN from
[GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("FINNverse/FINN")
```

## Introduction

Start with [Introduction to
FINN](https://finnverse.github.io/FINN/articles/A-Introduction_to_FINN.html),
then browse the rest:

| Vignette | What it covers |
|----|----|
| [Introduction to FINN](https://finnverse.github.io/FINN/articles/A-Introduction_to_FINN.html) | the model, its processes, and a first simulation |
| [Parameterising FINN from Ellenberg indicator values](https://finnverse.github.io/FINN/articles/B-Succession_demo.html) | deriving species niches from Ellenberg values; succession along a climate gradient |
| [Preparing your data for FINN](https://finnverse.github.io/FINN/articles/C-Data_preparation.html) | going from a raw tree list to FINN’s input tables |
| [Fitting FINN to forest inventory data](https://finnverse.github.io/FINN/articles/D-Fit_to_FIA.html) | calibrating on US FIA data, with a held-out test |
| [Mortality: a binomial response and a NN process](https://finnverse.github.io/FINN/articles/E-Mortality.html) | choosing the right likelihood, and scoring it honestly |

The same pages ship with the package — `vignette(package = "FINN")`
lists them.

<!-- Link to the RENDERED articles, not to files in vignettes/. Source paths break
     whenever a vignette is renamed (they did once already, when these moved from
     .qmd to precompiled .Rmd), and GitHub shows the un-executed source anyway -
     no figures, no results. The site URLs survive renames. -->
