Utilities¶
Supporting utilities for validation, data handling, and export.
Validation¶
industrialstats.utils.validation ¶
Validation utilities for experimental designs.
DesignValidator ¶
Comprehensive design validation.
validate_factors
staticmethod
¶
validate_factors(factors: list[Factor]) -> list[str]
Validate factor specifications and return warnings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
factors
|
list of Factor
|
Factors to validate. |
required |
Returns:
| Type | Description |
|---|---|
list of str
|
Validation warnings, if any. |
Source code in src/industrialstats/utils/validation.py
validate_design_matrix
staticmethod
¶
Validate a generated design matrix.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
design_matrix
|
DataFrame
|
Design matrix to inspect. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Validation summary including missing values, duplicates and single-level factors. |
Source code in src/industrialstats/utils/validation.py
check_confounding
staticmethod
¶
Check for confounding patterns.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
design_matrix
|
DataFrame
|
Design matrix to analyze. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Dictionary containing high-correlation pairs, variance inflation
factors (VIF), alias structures derived from the design matrix null
space, and variance decomposition (:math: |
References
.. [1] Box, G. E. P., Hunter, J. S., & Hunter, W. G. (2005). Statistics for Experimenters. .. [2] Montgomery, D. C. (2017). Design and Analysis of Experiments.
Source code in src/industrialstats/utils/validation.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | |
estimate_power
staticmethod
¶
Estimate design power for a given effect size.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
design_matrix
|
DataFrame
|
Design matrix. |
required |
effect_size
|
float
|
Expected effect size. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Estimated statistical power. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the design matrix is empty. |
Source code in src/industrialstats/utils/validation.py
Data generation¶
industrialstats.utils.data_generation ¶
Utilities to simulate experimental data.
The :class:DataSimulator class centralizes routines for generating
experimental and process-oriented data with rich noise structures. The
implementation follows the mathematical guidelines in Montgomery [1] and Box &
Jenkins [2] for factorial responses and stochastic process modelling,
respectively.
DataSimulator ¶
Generate realistic experimental data.
Initialize the simulator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
seed
|
int
|
Random seed for reproducibility. |
None
|
Source code in src/industrialstats/utils/data_generation.py
simulate_factorial_response ¶
simulate_factorial_response(design_matrix: DataFrame, main_effects: dict[str, float] | None = None, interactions: dict[tuple[str, str], float] | None = None, noise_level: float = 1.0, noise_dist: str = 'normal', noise_params: dict[str, float] | None = None, response_type: str = 'continuous', random_effects: dict[str, float] | None = None, corr: float = 0.0, heteroskedastic: Sequence[float] | Callable[[DataFrame], ndarray] | None = None, drift: float = 0.0, missing_rate: float = 0.0, missing_pattern: str = 'MCAR', measurement_error: dict[str, Any] | None = None) -> Series
Simulate response for a factorial design.
The deterministic part of the response follows the linear model
.. math:: y = Xeta + arepsilon,
where X is the encoded design matrix and arepsilon denotes the
stochastic noise component. Interaction terms are formed by pairwise
products of encoded factors. Optional random effects and AR(1) correlated
noise may be superimposed on the deterministic structure.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
design_matrix
|
DataFrame
|
Design matrix. |
required |
main_effects
|
dict
|
Mapping of factor names to effect sizes. If |
None
|
interactions
|
dict
|
Mapping of |
None
|
noise_level
|
float
|
Scale of the random noise, by default 1.0. |
1.0
|
noise_dist
|
('normal', 'laplace', 't', 'gamma', 'exponential')
|
Distribution for noise generation, by default |
'normal'
|
noise_params
|
dict
|
Additional parameters for the selected distribution, e.g., degrees of
freedom for |
None
|
response_type
|
('continuous', 'binomial', 'poisson')
|
Type of response variable, by default |
'continuous'
|
random_effects
|
dict
|
Mapping of grouping column names to variance components for random intercepts. |
None
|
corr
|
float
|
Correlation coefficient for AR(1) noise. A value of |
0.0
|
heteroskedastic
|
sequence of float or callable
|
Observation-wise noise scales. Length must equal the number of
design rows. Overrides |
None
|
drift
|
float
|
Linear drift coefficient applied in run order, by default |
0.0
|
missing_rate
|
float
|
Fraction of responses to set as missing. Must be in |
0.0
|
missing_pattern
|
('MCAR', 'MAR', 'MNAR', 'block')
|
Missing-data mechanism. |
'MCAR'
|
measurement_error
|
dict
|
Parameters describing an additive measurement error model applied to
the final response. Accepts |
None
|
Returns:
| Type | Description |
|---|---|
Series
|
Simulated response values. |
See Also
industrialstats.utils.validation.DesignValidator.check_confounding Assess correlation-based confounding in design matrices. industrialstats.analysis.power_analysis.factorial_power Power calculations for factorial designs.
Examples:
>>> import pandas as pd
>>> from industrialstats.utils.data_generation import DataSimulator
>>> dm = pd.DataFrame({"A": [1, -1, 1, -1], "B": [1, 1, -1, -1]})
>>> sim = DataSimulator(seed=1)
>>> sim.simulate_factorial_response(dm, main_effects={"A": 2, "B": 1}).round(2)
0 3.62
1 1.33
2 0.88
3 -3.53
Name: Response, dtype: float64
References
.. [1] Montgomery, D.C. (2017). Design and Analysis of Experiments. 9th ed. Wiley. .. [2] Box, G.E.P., Hunter, J.S., Hunter, W.G. (2005). Statistics for Experimenters, 2nd ed. Wiley. .. [3] Laird, N. M., & Ware, J. H. (1982). "Random-effects models for longitudinal data." Biometrics, 38(4), 963-974. .. [4] Carroll, R.J., Ruppert, D., Stefanski, L.A., & Crainiceanu, C.M. (2006). Measurement Error in Nonlinear Models, 2nd ed. Chapman & Hall/CRC.
Source code in src/industrialstats/utils/data_generation.py
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 | |
simulate_correlated_responses ¶
simulate_correlated_responses(design_matrix: DataFrame, main_effects_list: list[dict[str, float]], cov: ndarray, **kwargs) -> DataFrame
Simulate multiple correlated responses.
Each response uses simulate_factorial_response for its deterministic
component. Correlated noise is then added using a multivariate normal
distribution with covariance cov.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
design_matrix
|
DataFrame
|
Design matrix. |
required |
main_effects_list
|
list of dict
|
Main-effect specifications for each response. |
required |
cov
|
ndarray
|
Covariance matrix defining correlations between responses. |
required |
**kwargs
|
Additional arguments forwarded to
:meth: |
{}
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
Simulated responses with one column per response. |
Source code in src/industrialstats/utils/data_generation.py
simulate_process_data ¶
simulate_process_data(n_periods: int, model: Callable[[DataFrame], ndarray], covariates: DataFrame | None = None, freq: str = 'D', noise_dist: str = 'normal', noise_params: dict[str, float] | None = None, trend: dict[str, Any] | None = None, seasonality: dict[str, float] | None = None, ar_params: Sequence[float] | None = None, ma_params: Sequence[float] | None = None, heteroskedastic: Iterable[float] | Callable[[DataFrame], ndarray] | None = None, outliers: dict[str, dict[str, float | int]] | None = None, missing: dict[str, float | str] | None = None, measurement_error: dict[str, Any] | None = None, return_components: bool = False) -> DataFrame
Simulate a univariate or multivariate process response.
The function evaluates a custom model over a time-indexed frame and
enriches the result with trend, seasonality, heteroskedasticity, and
ARMA-style autocorrelation. Noise can be drawn from Gaussian, Student
:math:t, Gamma, or Exponential families. Outlier generation follows the
guidelines of Hawkins [3] whereas missingness mechanisms mirror Little &
Rubin [4].
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n_periods
|
int
|
Number of time points to simulate. |
required |
model
|
callable
|
Callable mapping a covariate frame to deterministic response values. |
required |
covariates
|
DataFrame
|
External drivers aligned with |
None
|
freq
|
str
|
Frequency string passed to :func: |
'D'
|
noise_dist
|
('normal', 'laplace', 't', 'gamma', 'exponential')
|
Distribution used for the innovation process. |
'normal'
|
noise_params
|
dict
|
Distribution-specific parameters. |
None
|
trend
|
dict
|
Specification of deterministic trend. Supports |
None
|
seasonality
|
dict
|
Describes periodic fluctuations with keys |
None
|
ar_params
|
sequence of float
|
Autoregressive parameters :math: |
None
|
ma_params
|
sequence of float
|
Moving-average parameters :math: |
None
|
heteroskedastic
|
iterable or callable
|
Observation-specific noise scales. |
None
|
outliers
|
dict
|
Mapping of outlier types ( |
None
|
missing
|
dict
|
Missing-data mechanism configuration with keys |
None
|
measurement_error
|
dict
|
Additive measurement error with keys |
None
|
return_components
|
bool
|
If |
False
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
Simulated process data containing the response and metadata columns. |
References
.. [1] Montgomery, D.C. (2017). Design and Analysis of Experiments, 9th ed. Wiley. .. [2] Box, G.E.P., Jenkins, G.M., Reinsel, G.C., & Ljung, G.M. (2015). Time Series Analysis: Forecasting and Control, 5th ed. Wiley. .. [3] Hawkins, D.M. (1980). Identification of Outliers. Chapman and Hall. .. [4] Little, R.J.A., & Rubin, D.B. (2002). Statistical Analysis with Missing Data, 2nd ed. Wiley.
Source code in src/industrialstats/utils/data_generation.py
488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 | |
simulate_multi_response ¶
simulate_multi_response(design_matrix: DataFrame, response_models: Sequence[Callable[[DataFrame], ndarray]], covariance: ndarray, response_types: Sequence[str] | None = None, noise_scales: Sequence[float] | None = None, noise_dist: str = 'normal', measurement_error: Sequence[dict[str, Any] | None] | None = None) -> DataFrame
Simulate correlated multi-response experimental outcomes.
Each response is constructed from a deterministic model augmented with a
correlated latent noise term drawn from covariance. Response types
may be continuous, categorical (binary logistic), or count (Poisson).
References
.. [1] Khuri, A.I., & Cornell, J.A. (1996). Response Surfaces: Design and Analyses. CRC Press. .. [2] Johnson, R.A., & Wichern, D.W. (2007). Applied Multivariate Statistical Analysis, 6th ed. Pearson.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
design_matrix
|
DataFrame
|
Design or feature matrix shared across responses. |
required |
response_models
|
sequence of callable
|
Deterministic response functions applied to the design matrix. |
required |
covariance
|
ndarray
|
Positive semi-definite covariance matrix governing latent noise. |
required |
response_types
|
sequence of {'continuous', 'categorical', 'count'}
|
Specifies the distribution of each response. Defaults to continuous. |
None
|
noise_scales
|
sequence of float
|
Additional scale multipliers applied per response. |
None
|
noise_dist
|
('normal', 't', 'gamma', 'exponential', 'laplace')
|
Distribution used to generate latent noise prior to correlating. |
'normal'
|
measurement_error
|
sequence of dict
|
Optional measurement-error configuration for each response using the
same schema as :meth: |
None
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
Multi-response dataset preserving the original design columns. |
Source code in src/industrialstats/utils/data_generation.py
652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 | |
validate_against_real_data ¶
validate_against_real_data(simulated: DataFrame | Series, real_data: DataFrame | Series) -> dict[str, dict[str, float]]
Compare simulated data to real experimental measurements.
The function computes absolute differences in means and standard deviations for each variable, allowing users to gauge similarity between simulated and actual data sets.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
simulated
|
Series or DataFrame
|
Simulated responses. |
required |
real_data
|
Series or DataFrame
|
Empirical measurements to compare against. |
required |
Returns:
| Type | Description |
|---|---|
dict of dict
|
Mapping each column name to |
Source code in src/industrialstats/utils/data_generation.py
Transforms¶
industrialstats.utils.transforms ¶
Data transformation helpers.
center ¶
Center numeric columns around zero.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df
|
DataFrame
|
Input DataFrame. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
Centered DataFrame. |
Source code in src/industrialstats/utils/transforms.py
standardize ¶
Standardize numeric columns to unit variance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df
|
DataFrame
|
Input DataFrame. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
Standardized DataFrame. |
Source code in src/industrialstats/utils/transforms.py
log_transform ¶
Apply natural logarithm to specified columns.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df
|
DataFrame
|
Input DataFrame. |
required |
columns
|
list[str]
|
Columns to transform. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with transformed columns. |
Source code in src/industrialstats/utils/transforms.py
Efficiency¶
industrialstats.utils.efficiency ¶
Design efficiency metrics and visualization utilities.
d_efficiency ¶
Compute D-efficiency of a design.
D-efficiency is defined as (\det(X^T X)^{1/p}) / n where p is the
number of parameters and n is the run count.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
design_matrix
|
DataFrame
|
Encoded design matrix including intercept. |
required |
Returns:
| Type | Description |
|---|---|
float
|
D-efficiency value. |
References
.. [1] Montgomery, D.C. (2017). Design and Analysis of Experiments, 9th ed. Wiley.
Source code in src/industrialstats/utils/efficiency.py
a_efficiency ¶
Compute A-efficiency of a design.
A-efficiency is p / (\operatorname{trace}((X^T X)^{-1}) \cdot n).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
design_matrix
|
DataFrame
|
Encoded design matrix including intercept. |
required |
Returns:
| Type | Description |
|---|---|
float
|
A-efficiency value. |
Source code in src/industrialstats/utils/efficiency.py
g_efficiency ¶
Compute G-efficiency for a design.
G-efficiency is the reciprocal of the maximum scaled prediction variance over the candidate set.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
design_matrix
|
DataFrame
|
Design matrix used to fit the model. |
required |
candidate_points
|
DataFrame
|
Candidate matrix covering the region of interest. |
required |
Returns:
| Type | Description |
|---|---|
float
|
G-efficiency value. |
Source code in src/industrialstats/utils/efficiency.py
i_efficiency ¶
Compute I-efficiency for a design.
I-efficiency is the reciprocal of the average scaled prediction variance over the candidate set.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
design_matrix
|
DataFrame
|
Design matrix used to fit the model. |
required |
candidate_points
|
DataFrame
|
Candidate matrix covering the region of interest. |
required |
Returns:
| Type | Description |
|---|---|
float
|
I-efficiency value. |
Source code in src/industrialstats/utils/efficiency.py
relative_efficiency ¶
Compare efficiencies of two designs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
design_a
|
DataFrame
|
Design matrices to compare. |
required |
design_b
|
DataFrame
|
Design matrices to compare. |
required |
metric
|
('D', 'A')
|
Efficiency measure for comparison, by default |
"D"
|
Returns:
| Type | Description |
|---|---|
float
|
Relative efficiency |
Source code in src/industrialstats/utils/efficiency.py
variance_inflation_factors ¶
Compute variance inflation factors (VIF) for regressors.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
design_matrix
|
DataFrame
|
Encoded design matrix including intercept. |
required |
Returns:
| Type | Description |
|---|---|
Series
|
VIF values indexed by column name. |
Source code in src/industrialstats/utils/efficiency.py
estimate_power ¶
estimate_power(design_matrix: DataFrame, effect_contrast: ndarray, effect_size: float, sigma: float = 1.0, alpha: float = 0.05) -> float
Estimate power for detecting a specified contrast.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
design_matrix
|
DataFrame
|
Encoded design matrix including intercept. |
required |
effect_contrast
|
ndarray
|
Contrast vector |
required |
effect_size
|
float
|
Magnitude of the effect along |
required |
sigma
|
float
|
Residual standard deviation, by default |
1.0
|
alpha
|
float
|
Significance level, by default |
0.05
|
Returns:
| Type | Description |
|---|---|
float
|
Approximate statistical power. |
Source code in src/industrialstats/utils/efficiency.py
plot_efficiencies ¶
Plot efficiency metrics for multiple designs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
efficiencies
|
dict
|
Mapping of design labels to efficiency values. |
required |
Returns:
| Type | Description |
|---|---|
Axes
|
Axes containing a bar chart of efficiencies. |
Source code in src/industrialstats/utils/efficiency.py
Input and output¶
industrialstats.utils.io ¶
Structured data-loading helpers for external tabular inputs.
load_csv ¶
Load a CSV file and expose operational failures through DataExcept.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str or Path
|
CSV source path. |
required |
**kwargs
|
Any
|
Additional arguments passed to :func: |
{}
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
Loaded tabular data. |
Raises:
| Type | Description |
|---|---|
DataLoadingError
|
If pandas or the filesystem cannot load the CSV source. |
Source code in src/industrialstats/utils/io.py
Export¶
industrialstats.utils.export ¶
Data export utilities for industrialstats.
export_to_csv ¶
Save a DataFrame to CSV.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df
|
DataFrame
|
DataFrame to export. |
required |
path
|
str or Path
|
Destination file path. |
required |
include_index
|
bool
|
Whether to include the DataFrame index. Defaults to |
False
|
**kwargs
|
Any
|
Additional arguments passed to :func: |
{}
|
Raises:
| Type | Description |
|---|---|
FileWriteError
|
If pandas or the filesystem cannot write the destination. |
Source code in src/industrialstats/utils/export.py
export_to_excel ¶
export_to_excel(df: DataFrame, path: str | Path, include_index: bool = False, **kwargs: Any) -> None
Save a DataFrame to an Excel workbook.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df
|
DataFrame
|
DataFrame to export. |
required |
path
|
str or Path
|
Destination file path. |
required |
include_index
|
bool
|
Whether to include the index column. Defaults to |
False
|
**kwargs
|
Any
|
Additional arguments passed to :func: |
{}
|
Raises:
| Type | Description |
|---|---|
FileWriteError
|
If pandas or the filesystem cannot write the destination. |
Source code in src/industrialstats/utils/export.py
export_to_json ¶
Save a DataFrame and metadata to JSON.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df
|
DataFrame
|
DataFrame to export. |
required |
path
|
str or Path
|
Destination file path. |
required |
**kwargs
|
Any
|
Additional JSON |
{}
|
Raises:
| Type | Description |
|---|---|
FileWriteError
|
If serialization or filesystem writing fails. |
Source code in src/industrialstats/utils/export.py
Performance¶
industrialstats.utils.performance ¶
Utilities for profiling code execution paths.
profile_function ¶
Profile a callable and return execution statistics.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
func
|
Callable
|
Function or method to profile. |
required |
*args
|
Any
|
Positional arguments passed to |
()
|
**kwargs
|
Any
|
Keyword arguments passed to |
{}
|
Returns:
| Type | Description |
|---|---|
Stats
|
Profiling statistics sorted by cumulative time. |
Source code in src/industrialstats/utils/performance.py
Configuration¶
industrialstats.config ¶
Global configuration management for industrialstats.
This module provides a simple configuration system that controls plotting preferences, numerical precision, and logging levels across the package. Configuration values can be loaded from a JSON or YAML file and are applied to relevant third-party libraries.
Config
dataclass
¶
Config(plot_style: str = 'ggplot', theme: str = 'whitegrid', precision: int = 4, log_level: str = 'INFO')
Package configuration settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plot_style
|
str
|
Matplotlib style to apply for plots. |
"ggplot"
|
theme
|
str
|
Seaborn theme used to style figures. |
"whitegrid"
|
precision
|
int
|
Number of decimal places for NumPy printing. |
4
|
log_level
|
str
|
Logging level applied to the root logger. |
"INFO"
|
load_config ¶
Load configuration from a JSON or YAML file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str or Path
|
Path to the configuration file. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the file format is unsupported or PyYAML is required but not installed. |