Skip to content

yohou.utils

Utility functions for data manipulation, validation, and tabularization.

Classes

Name Description
ForecasterTags Tags specific to time series forecasters.
InputTags Tags describing input requirements.
SplitterTags Tags specific to cross-validation splitters.
Tags Metadata tags for yohou estimators.
TargetTags Tags describing target (y) requirements.
TransformerTags Tags specific to time series transformers.

Functions

Name Description
all_displays Get a list of all displays from yohou.
all_estimators Get a list of all estimators from yohou.
all_functions Get a list of all functions from yohou.
dict_to_panel Convert a dict of group DataFrames to a single DataFrame with prefixed columns.
get_group_df Extract and rename columns for a specific panel group.
inspect_panel Inspect DataFrame columns to distinguish global and local (panel) data.
panel_aware_prefix Add a prefix to a column name while preserving the panel group prefix.
panel_aware_rename Apply a rename function to a column name while preserving the panel group prefix.
panel_aware_suffix Add a suffix to a column name while preserving the panel group prefix.
select_panel_columns Select panel group columns and optionally global columns of a DataFrame.
window_forecasts Window forecast data into step-indexed columns using as-of vintage selection.
window_futures Window known-future features into step-indexed columns.
cast Cast columns according to schema with integer rounding.
get_categorical_columns Get list of categorical column names from a DataFrame.
get_numeric_columns Get list of numeric column names from a DataFrame.
tabularize Convert time series to tabular format using lags.
validate_forecaster_data Validate and prepare input data for forecasters.
validate_plotting_data Validate a DataFrame for plotting and resolve columns.
validate_plotting_params Validate common plotting function parameters.
validate_scorer_data Validate and prepare scorer input data.
validate_splitter_data Validate and prepare input data for time series splitters.
validate_transformer_data Validate data for transformers.
add_interval Add n intervals to a datetime (handles variable-length intervals).
check_continuity Validate temporal continuity between consecutive DataFrames.
check_forecasting_horizon_positive Validate forecasting horizon is positive.
check_groups Validate and normalize panel group names for forecaster operations.
check_inputs Validate that target and feature DataFrames have consistent time intervals.
check_interval_consistency Validate that a time series has uniform time spacing.
check_panel_groups_match Validate that y and X_actual have compatible panel group structures.
check_panel_internal_consistency Validate that all panel groups in a DataFrame have the same local column structure.
check_schema Validate DataFrame schema and return with proper column ordering.
check_scorer_column_selection Subselect columns based on scorer configuration.
check_sufficient_rows Validate DataFrame has sufficient rows for operation.
check_time_column Validate that time column exists, has proper dtype, no nulls, and is sorted.
check_X_actual_required Validate X_actual is provided when required for recursive prediction.
interval_to_timedelta Convert fixed interval to timedelta, or None for variable intervals.
parse_interval Parse interval string into (multiplier, unit).
validate_column_names Validate that __ separator is used only for panel data group names.
validate_search_data Validate input data for hyperparameter search (GridSearchCV, RandomizedSearchCV).