core
Core data classes and structures for LOS estimation.
- class los_estimator.core.SeriesData(x_full: numpy.ndarray, y_full: numpy.ndarray, model_config: ModelConfig, debug_config: DebugConfig | None = None)
Bases:
objectTime series data container with sliding window functionality.
Manages time series data and provides iteration over sliding windows for temporal analysis of length of stay models.
- model_config
Configuration for window sizes and parameters.
- Type:
- x_full
Full input time series (e.g., admissions).
- Type:
np.ndarray
- y_full
Full output time series (e.g., occupancy).
- Type:
np.ndarray
- windows
Array of window start indices.
- Type:
np.ndarray
- window_infos
List of WindowInfo objects.
- Type:
list[WindowInfo]
- n_windows
Number of analysis windows.
- Type:
int
- n_days
Total number of days in the data.
- Type:
int
- class los_estimator.core.WindowInfo(window: int, model_config: ModelConfig)
Bases:
objectInformation about a time window for analysis.
Contains all the necessary indices and slices for a specific time window used in the sliding window analysis approach.
- window
Index between training and prediction.
- Type:
int
- train_end
End index of training period.
- Type:
int
- train_start
Start index of training period.
- Type:
int
- test_start
Start index of test period.
- Type:
int
- test_end
End index of test period.
- Type:
int
- train_window
Slice object for training window.
- Type:
slice
- train_test_window
Slice object for combined train+test window.
- Type:
slice
- test_window
Slice object for test window.
- Type:
slice
- model_config
Associated model configuration.
- Type: