add_data

add_data(df, outcome_col=None, input_cols=None, overwrite=False)

Ingests raw simulation data, configures columns, and manages the cache.

This method sets the outcome and input variables, subsets the data accordingly, and automatically clears the mathematical caches whenever new data is ingested to prevent state mismatches. If input_cols is not provided, it smartly infers that all columns other than the outcome are inputs.

Parameters

Name Type Description Default
df pd.DataFrame The DataFrame to ingest. required
outcome_col str The name of the target/outcome variable. Required on first ingestion, optional when appending. None
input_cols List[str] Explicit list of input variables. Defaults to None (infers all non-outcome columns). None
overwrite bool If True, replaces existing data. If False, appends to existing data. Defaults to False. False