⌨️ typing.package¶
This package provides type definitions, enumerations, normalization utilities, and constants for the owlmix library.
Submodules¶
The owlmix.typing package is organized into several submodules:
constrants: Contains constant values used throughout the library, such as default settings and fixed parameters.
enums: Defines enumerations for categorical values, improving code clarity and type safety.
normalize: Provides utility functions for normalizing and validating data types and values.
types: Declares custom type aliases and type definitions to enhance code readability and static analysis.
This module defines constant values used across the owlmix library, such as default thresholds, default lag values, and other fixed parameters that are commonly referenced in analysis and plotting functions.
This module defines constant values used across the owlmix library, such as default thresholds, default lag values, and other fixed parameters that are commonly referenced in analysis and plotting functions.
- owlmix.typing.constrants.CHART_IDS = ('vif_chart', 'acf_pacf_chart', 'kpi_vs_feature_chart', 'distribution_chart', 'categorical_distribution_chart', 'correlation_chart', 'lag_correlation_chart', 'time_series_chart', 'outliers_chart', 'comparison_chart')¶
Identifiers for different types of charts
- owlmix.typing.constrants.COMPARISON_TYPE_VALUES = ('yoy', 'qoq', 'mom', 'wow', 'yoy_month', 'yoy_quarter', 'yoy_week')¶
Types of comparisons for time series analysis
- owlmix.typing.constrants.MODE_VALUES = ('absolute', 'pct_change', 'dual')¶
Modes for data representation
- owlmix.typing.constrants.PERIOD_VALUES = ('daily', 'weekly', 'monthly', 'yearly')¶
Time periods for time series analysis and comparison
This module defines enumerations for categorical values used in the owlmix library, such as method types, plot styles, and other categorical parameters. These enums enhance code readability and maintainability by providing clear, descriptive names for fixed sets of values.
- class owlmix.typing.enums.BaseEnum(new_class_name, /, names, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum- classmethod list()¶
- classmethod names()¶
- classmethod options()¶
- classmethod pretty_options()¶
- classmethod values()¶
- class owlmix.typing.enums.ChartID(*values)¶
Bases:
BaseEnum- ACF_PACF_CHART = 'acf_pacf_chart'¶
- CATEGORICAL_DISTRIBUTION_CHART = 'categorical_distribution_chart'¶
- COMPARISON_CHART = 'comparison_chart'¶
- CORRELATION_CHART = 'correlation_chart'¶
- DISTRIBUTION_CHART = 'distribution_chart'¶
- KPI_VS_FEATURE_CHART = 'kpi_vs_feature_chart'¶
- LAG_CORRELATION_CHART = 'lag_correlation_chart'¶
- OUTLIERS_CHART = 'outliers_chart'¶
- TIME_SERIES_CHART = 'time_series_chart'¶
- VIF_CHART = 'vif_chart'¶
- class owlmix.typing.enums.ComparisonType(*values)¶
Bases:
BaseEnum- MoM = 'mom'¶
- QoQ = 'qoq'¶
- WoW = 'wow'¶
- YoY = 'yoy'¶
- YoY_MONTH = 'yoy_month'¶
- YoY_QUARTER = 'yoy_quarter'¶
- YoY_WEEK = 'yoy_week'¶
- class owlmix.typing.enums.Period(*values)¶
Bases:
BaseEnum- DAILY = 'daily'¶
- MONTHLY = 'monthly'¶
- WEEKLY = 'weekly'¶
- YEARLY = 'yearly'¶
- class owlmix.typing.enums.PlotMode(*values)¶
Bases:
BaseEnum- ABSOLUTE = 'absolute'¶
- DUAL = 'dual'¶
- PCT_CHANGE = 'pct_change'¶
- class owlmix.typing.enums.SectionEnum(*values)¶
Bases:
BaseEnum- ACF_PACF = 'acf_pacf'¶
- BOX_PLOT = 'box_plot'¶
- CAUSALITY = 'causality'¶
- CCF = 'ccf'¶
- CORRELATION = 'correlation'¶
- DIST_NUMERIC = 'dist_numeric'¶
- RESPONSE_SUMMARY = 'response_summary'¶
- VIF = 'vif'¶
This module provides utility functions for normalizing and validating data types and values, ensuring consistency across the owlmix library.
- owlmix.typing.normalize.normalize_comparison_type(comparison_type: ComparisonType | str) str¶
This module declares custom type aliases and type definitions to enhance code readability and static analysis within the owlmix library. It includes type definitions for data structures, function signatures, and other commonly used types to improve code clarity and maintainability.