predict | R Documentation |
Predict species of events for novel data from a BANTER model.
predict(object, ...) ## S3 method for class 'banter_model' predict(object, new.data, ...) ## S4 method for signature 'banter_model' predict(object, new.data, ...)
object |
a |
... |
unused. |
new.data |
a list of event and detector data that has the same
predictors as in the |
A list with the following elements:
the data frame used in the event model for predictions.
data.frame of predicted species and assignment probabilities for each event.
data.frame giving the number of events available for each detector.
if species
is a column in new.data
,
a table giving the classification rate for each event
At least one detector in the model must be present in new.data
.
Any detectors in the training model that are absent will have all species
proportions and the the detector propoprtion set to 0. If a column called
species
is in new.data
, columns for the original species
designation and if that matches predicted (correct
) will be added
to the predict.df
data.frame of the output.
Eric Archer eric.archer@noaa.gov
Rankin, S. , Archer, F. , Keating, J. L., Oswald, J. N., Oswald, M. , Curtis, A. and Barlow, J. (2017), Acoustic classification of dolphins in the California Current using whistles, echolocation clicks, and burst pulses. Marine Mammal Science 33:520-540. doi:10.1111/mms.12381
data(train.data) # initialize BANTER model with event data bant.mdl <- initBanterModel(train.data$events) # add all detector models bant.mdl <- addBanterDetector( bant.mdl, train.data$detectors, ntree = 50, sampsize = 2, num.cores = 1 ) # run BANTER event model bant.mdl <- runBanterModel(bant.mdl, ntree = 1000, sampsize = 1) # predict test data data(test.data) test.pred <- predict(bant.mdl, test.data) test.pred
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.