do_fit: Fit model

View source: R/do_fit.R

do_fitR Documentation

Fit model

Description

Fit model, make predictions, and generate SHAP values.

Usage

do_fit(
  tweets_transformed,
  stem = get_valid_stems(),
  overwrite = TRUE,
  ...,
  .overwrite = list(tune = NULL, fit = NULL),
  .path = list(tune = NULL, fit = NULL)
)

Arguments

tweets_transformed

Tweets retrieved from retrieve_tweets() and passed into transform_tweeets()

stem

Either "favorite" or "retweet"

overwrite

Whether to overwrite existing fit, predictions, and SHAP values.

...

Extra arguments to pass to .transform_tweets()

.overwrite

Specific booleans for overwriting specific outputs saved to file. Default is to use same value as overwrite. Only use this if you know what you're doing.

.path

Specific paths to export the tune results and fitted model to. If left as NULL, they are saved as "res_tune_cv_{stem}.rds" and "fit_{stem}" in the directory at getOption("xengagement.dir_data"). As with .overwrite, only use this if you know what you're doing.


tonyelhabr/xengagement documentation built on June 22, 2022, 5 a.m.