API Reference¶
This section provides comprehensive documentation for all DRN classes, functions, and modules. The API documentation is automatically generated from the source code docstrings, similar to R package documentation.
Overview¶
The DRN package is organized into several key modules:
- Models - Core distributional regression models (GLM, DRN, CANN, MDN, DDR)
- Distributions - Custom distribution implementations and utilities
- Training - Training functions, loss functions, and optimization utilities
- Metrics - Evaluation metrics for distributional forecasting
- Interpretability - Model explanation and visualization tools
- Utilities - Data preprocessing, splitting, and helper functions
Quick Reference¶
Core Classes¶
Class | Purpose | Key Methods |
---|---|---|
BaseModel |
Abstract base for all models | .fit() , .predict() , .quantiles() |
GLM |
Generalized Linear Models | .fit() , .predict() , .clone() |
DRN |
Distributional Refinement Network | .fit() , .predict() , .log_adjustments() |
Key Functions¶
Function | Purpose | Module |
---|---|---|
train() |
Train models with PyTorch | drn.train |
drn_loss() |
DRN loss function | drn.models |
crps() |
Continuous Ranked Probability Score | drn.metrics |
split_and_preprocess() |
Data preprocessing | drn.utils |