Uses a model generated with iucnn_train_model
to predict the IUCN status of
Not Evaluated or Data Deficient species based on features, generated
from species occurrence records with iucnn_prepare_features
.
These features should be of the same type as those used for training the
model.
iucnn_predict_status(
x,
model,
target_acc = 0,
dropout_reps = 100,
return_IUCN = TRUE,
return_raw = FALSE
)
a data.set, containing a column "species" with the species names, and
subsequent columns with different features,
in the same order as used for iucnn_train_model
the information on the NN model returned by
iucnn_train_model
numerical, 0-1. The target accuracy of the overall model. Species that cannot be classified with
integer, (default = 100). The number of how often the predictions are to be repeated (only for dropout models). A value of 100 is recommended to capture the stochasticity of the predictions, lower values speed up the prediction time.
logical. If TRUE the predicted labels are translated into the original labels. If FALSE numeric labels as used by the model are returned
logical. If TRUE, the raw predictions of the model will be returned, which in case of MC-dropout and bnn-class models includes the class predictions across all dropout prediction reps (or MCMC reps for bnn-class). Note that setting this to TRUE will result in large output objects that can fill up the memory allocated for R and cause the program to crash.
outputs an iucnn_predictions
object containing the predicted
labels for the input species.
See vignette("Approximate_IUCN_Red_List_assessments_with_IUCNN")
for a
tutorial on how to run IUCNN.
if (FALSE) {
data("training_occ") #geographic occurrences of species with IUCN assessment
data("training_labels")# the corresponding IUCN assessments
data("prediction_occ") #occurrences from Not Evaluated species to prdict
# 1. Feature and label preparation
features <- iucnn_prepare_features(training_occ, type = "geographic") # Training features
labels_train <- iucnn_prepare_labels(training_labels, features) # Training labels
features_predict <- iucnn_prepare_features(prediction_occ,
type = "geographic") # Prediction features
# 2. Model training
m1 <- iucnn_train_model(x = features, lab = labels_train)
# 3. Prediction
iucnn_predict_status(x = features_predict, model = m1)
}