cursus.processing.validation¶
Field type validation utilities for preprocessing pipelines.
Provides strict validation functions that validate field types before applying numerical imputation or categorical risk table mapping.
- validate_categorical_fields(df, cat_fields, dataset_name='dataset')[source]¶
Strictly validate categorical fields before risk table mapping.
- Parameters:
- Raises:
ValueError – If field not found in dataframe
TypeError – If field has wrong type with specific field names
- validate_numerical_fields(df, num_fields, dataset_name='dataset')[source]¶
Strictly validate numerical fields before numerical imputation.
- Parameters:
- Raises:
ValueError – If field not found in dataframe
TypeError – If field has wrong type with specific field names