compute_BART_model: Use Bayesian Additive Regression Trees to predict records...

compute_BART_modelR Documentation

Use Bayesian Additive Regression Trees to predict records labels

Description

The prediction engine of the framework. It produces a model which assigns a probability distribution for each record of the probability of being relevant (i.e., positive label). It is not used alone but inside enrich_annotation_file().

Usage

compute_BART_model(
  train_data,
  Y,
  preds = NULL,
  save = FALSE,
  folder = getwd(),
  name = as.character(Y),
  rebuild = FALSE,
  num_trees = 50,
  k = 2,
  num_iterations_after_burn_in = 2000,
  run_in_sample = FALSE,
  mem_cache_for_speed = TRUE,
  use_missing_data = TRUE,
  verbose = TRUE,
  ...
)

Arguments

train_data

A Document Term Matrix with an outcome column. if pred is null, all column apart from Y will be considered as features.

Y

The name of the outcome column in the data set.

preds

A vector of column names to use as features.

save

Whether to save the model to disk, with a file name given in name, to be placed into folder.

folder

Where to look for/create the model backup file.

name

The name of the model backup file. If the file exists and rebuilt is FALSE, the model will not be retrained but the backup will be used instead.

rebuild

If TRUE, retrain the model even if a model backup file exists.

num_trees, k, num_iterations_after_burn_in, run_in_sample, mem_cache_for_speed, use_missing_data, verbose

bartMachine::bartMachine() specific parameters.

...

More argument to pass to bartMachine::bartMachine().

Details

This implementation is built over bartMachine::bartMachine().

Value

An object of class bartMachine.


bakaburg1/BaySREn documentation built on March 30, 2022, 12:16 a.m.