build_file_path: Build the path to a file in the data directory

Description Usage Arguments Value

View source: R/data_io.R

Description

The data directory ([data_dir]) contains one or more problem files and fits (solutions) uniquely specified by the analysis name ([analysis_name]). For example, if the analysis name is "US" and the there are two cross validation folds ([num_folds=2]), there are five total problem files in the data directory:

problem_US.rds The main problem file test_US_fold1.rds The 1st test fold test_US_fold2.rds The 2nd test fold train_US_fold1.rds The 1st training fold train_US_fold2.rds The 2nd training fold

This function returns the path to one of these files. Which one is specified by the variables [file_type] and fold. [file_type] is a string that must be one of: 'main_problem', 'test_problem', 'training_problem', 'univariate_ord_soln', 'ordinal_ci', 'univariate_ord_rmd', 'univariate_cont_soln', 'univariate_cont_rmd', 'solutionx', 'cv_data', 'mcp_inputs', 'cindep_model', 'hjk_progress', and 'cdep_model'. If [file_type] is test_problem' or training_problem', a valid fold number is required as input. If [file_type] is univariate_ord_soln', 'univariate_cont_soln', 'solutionx', mcp_inputs', 'hjk_progress', or 'mcp_model, a fold number may be input.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
build_file_path(
  data_dir,
  analysis_name,
  file_type,
  j = NA,
  k = NA,
  var_name = c(),
  mean_spec = c(),
  noise_spec = c(),
  fold = NA
)

Arguments

data_dir

The data directory with problems and results

analysis_name

A unique analysis name (for the input data directory)'

file_type

The type of file to return the path for (see Description)

j

The index of the ordinal variable (if applicable)

k

The index of the continuous variable (if applicable)

var_name

The variable name (if applicable)

fold

The fold number (only needed file_type is 'test_problem' or 'training_problem').

Value

The path to the file


MichaelHoltonPrice/yada documentation built on Sept. 19, 2021, 11:27 p.m.