load_params: Load Parameters from YAML File

View source: R/data_loading.R

load_paramsR Documentation

Load Parameters from YAML File

Description

Reads a YAML file containing model parameters, including station settings, variables, and configurations for various models. If no file path is provided, the function defaults to loading params.yaml from the package's extdata directory.

Usage

load_params(filepath = NULL)

Arguments

filepath

Character. Path to the YAML file. If NULL, the function will attempt to load the default params.yaml provided in the package.

Details

The YAML file should define parameters in a structured format, such as:

target: 'NO2'

lightgbm:
  nrounds: 200
  eta: 0.03
  num_leaves: 32

dynamic_regression:
  ntrain: 8760

random_forest:
  num.trees: 300
  max.depth: 10

meteo_variables:
  - GLO
  - TMP

Value

A list containing the parameters loaded from the YAML file.

Examples

params <- load_params()

ubair documentation built on April 12, 2025, 2:12 a.m.