library_templates: Functions to create boilerplate code for specific types of...

library_templatesR Documentation

Functions to create boilerplate code for specific types of experiments.

Description

These functions make suggestions for code when performing a few common types of experiments (i.e., for prediction, feature selection, and inference). They print out code to the console that could be considered minimal syntax.

Usage

use_prediction_template(
  experiment_name = "Prediction Experiment",
  type = c("regression", "classification"),
  support = FALSE,
  include_dgp_example = FALSE,
  include_method_example = FALSE
)

use_feature_selection_template(
  experiment_name = "Feature Selection Experiment",
  include_dgp_example = FALSE,
  include_method_example = FALSE
)

use_inference_template(
  experiment_name = "Inference Experiment",
  include_dgp_example = FALSE,
  include_method_example = FALSE
)

Arguments

experiment_name

Name of the experiment.

type

Either "regression" or "classification" specifying the type of prediction problem.

support

Logical. If TRUE, include code to evaluate the estimated feature support.

include_dgp_example

Logical. If TRUE, include a completed DGP example, rather than a fill-in-the-blank template.

include_method_example

Logical. If TRUE, include a completed Method example, rather than a fill-in-the-blank template.

Value

Invisible NULL but code is printed to the console.

Examples

# prediction templates
use_prediction_template(type = "regression")
use_prediction_template(type = "classification")

# prediction templates with example DGP and Method
use_prediction_template(type = "regression",
                        include_dgp_example = TRUE,
                        include_method_example = TRUE)
use_prediction_template(type = "classification",
                        include_dgp_example = TRUE,
                        include_method_example = TRUE)

# feature selection template
use_feature_selection_template()
# feature selection template with example DGP and Method
use_feature_selection_template(include_dgp_example = TRUE,
                               include_method_example = TRUE)

# inference template
use_inference_template()
# inference template with example DGP and Method
use_inference_template(include_dgp_example = TRUE,
                       include_method_example = TRUE)


Yu-Group/simChef documentation built on Jan. 11, 2025, 1:25 a.m.