clean_params: Check parameters sum to 1 in param_set; normalize if needed;...

View source: R/clean_params.R

clean_paramsR Documentation

Check parameters sum to 1 in param_set; normalize if needed; add names if needed

Description

Check parameters sum to 1 in param_set; normalize if needed; add names if needed

Usage

clean_params(parameters_df, warning = TRUE)

Arguments

parameters_df

A data.frame. This object is first generated by make_model.

warning

Logical. Whether to print warning (if any) in console. Defaults to TRUE

Value

A parameters data.frame with names and where parameters sum to 1.

Examples


model <- make_model('X->Y')
model$parameters_df$param_value <- 1:6
CausalQueries:::clean_params(model$parameters_df, warning = TRUE)


CausalQueries documentation built on June 22, 2024, 6:50 p.m.