cursus.steps.configs.config_feature_selection_step¶
Feature Selection Configuration with Self-Contained Derivation Logic
This module implements the configuration class for SageMaker Processing steps for feature selection, using a self-contained design where each field is properly categorized according to the three-tier design: 1. Essential User Inputs (Tier 1) - Required fields that must be provided by users 2. System Fields (Tier 2) - Fields with reasonable defaults that can be overridden 3. Derived Fields (Tier 3) - Fields calculated from other fields, private with read-only properties
- class FeatureSelectionConfig(*, author, bucket, role, region, service_name, pipeline_version, model_class='xgboost', current_date=<factory>, framework_version='2.1.0', py_version='py310', source_dir=None, enable_caching=False, use_secure_pypi=False, max_runtime_seconds=172800, project_root_folder, processing_instance_count=1, processing_volume_size=500, processing_instance_type_large='ml.m5.4xlarge', processing_instance_type_small='ml.m5.2xlarge', use_large_processing_instance=False, skip_volume_kms=None, processing_source_dir=None, processing_entry_point='feature_selection.py', processing_script_arguments=None, processing_framework_version='1.2-1', label_field, job_type='training', feature_selection_methods='variance, correlation, mutual_info, rfe', n_features_to_select=10, correlation_threshold=0.95, variance_threshold=0.01, random_state=42, combination_strategy='voting', **extra_data)[source]¶
Bases:
ProcessingStepConfigBaseConfiguration for the Feature Selection step with three-tier field categorization. Inherits from ProcessingStepConfigBase.
Fields are categorized into: - Tier 1: Essential User Inputs - Required from users - Tier 2: System Fields - Default values that can be overridden - Tier 3: Derived Fields - Private with read-only property access
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'allow', 'protected_namespaces': (), 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- property environment_variables: Dict[str, str]¶
Get environment variables for the feature selection script.
- Returns:
Dictionary of environment variables
- property method_list: List[str]¶
Get list of feature selection methods from comma-separated string.
- Returns:
List of method names
- classmethod validate_entry_point_relative(v)[source]¶
Ensure processing_entry_point is a non‐empty relative path.
- classmethod validate_feature_selection_methods(v)[source]¶
Validate feature selection methods string.
- classmethod validate_combination_strategy(v)[source]¶
Ensure combination_strategy is one of the allowed values (case-insensitive).
Matching is case-insensitive and the stored value is normalized to the canonical-cased allowed value.
- get_public_init_fields()[source]¶
Override get_public_init_fields to include feature selection specific fields.
- Returns:
Dictionary of field names to values for child initialization
- Return type:
Dict[str, Any]
- model_post_init(context, /)¶
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self (BaseModel) – The BaseModel instance.
context (Any) – The context.