Skip to contents

This function makes predictions using a random forest model. In many situations, you would want to make predictions from many random forest models and aggregate them downstream.

Usage

prediction(model_filename, query, ncores = 1L)

Arguments

model_filename

(character) The filename of the Random Forest model.

query

(character) The filename of the query data in CSV format. This is an MLST profiles spreadsheet.

ncores

(integer, default: 1L) The number of cores to use for parallel processing.

Value

prediction The prediction object from predict.rfsrc()

Examples

if (FALSE) {
# Example usage:
result <- prediction(model_filename = "results/bs23.rds",
                     query = "tests/testthat/example_query.csv", ncores = 4)
}