fit_model: Fit Random Forest model to epitope data

View source: R/fit_model.R

fit_modelR Documentation

Fit Random Forest model to epitope data

Description

This function fits a Random Forest model to epitope data (after feature calculation using calc_features()). Feature column names should start with feat_, and the class attribute should be called Class. All other columns are ignored when fitting the model.

Usage

fit_model(
  data.train,
  data.test = NULL,
  rnd.seed = NULL,
  ncpus = 1,
  threshold = 0.5,
  ...
)

Arguments

data.train

data frame containing the training data (one or more numerical predictors and one Class attribute).

data.test

data frame containing the test data, in the same format as data.train.

rnd.seed

seed for random number generator

ncpus

number of cores to use.

threshold

probability threshold for attributing a prediction as positive.

...

options to be passed down to the Random Forest implementation (see ranger::ranger() for details)

Value

List containing the fitted model, predictions for and several performance indicators.

Author(s)

Felipe Campelo (f.campelo@aston.ac.uk)


fcampelo/epitopes documentation built on April 22, 2023, 12:23 a.m.