predict.maxnet: Predict using a maxnet model

View source: R/predict.maxnet.R

predict.maxnetR Documentation

Predict using a maxnet model

Description

Prediction can be on a spatial raster or vector space.

Usage

## S3 method for class 'maxnet'
predict(
  object,
  newdata,
  clamp = T,
  type = c("link", "exponential", "cloglog", "logistic"),
  ...
)

Arguments

object

an object of class "maxnet", i.e., a fitted model.

newdata

values of predictor variables to predict to, possibly matrix, data.frame, SpatRaster or stars object.

clamp

logical, f true, predictors and features are restricted to the range seen during model training.

type

character, type of response required. Using lp for the linear predictor and entropy for the entropy of the exponential model over the background data, the values returned are determined by the value of type.

  • "link"yields lp

  • "exponential"yields exp(lp)

  • "cloglog"yields 1-exp(-exp(entropy+lp))

  • "logistic"yields 1/(1+exp(-entropy-lp))

...

not used

Value

vector with predicted values (one per input row), SpatRaster or stars object of predicted values


mrmaxent/maxnet documentation built on Jan. 12, 2023, 8:20 a.m.