ProjectContext.params() provides kwargs to Parameters for
validation and application of default options.
The created Parameters instance is set to the context scope as ctx.setup and
serves as the global default configuration for all workers.
Each worker inherits required parameters from ctx.setup, but allows custom overrides
at instantiation: worker(param1=1, param2=2).
Parameters
Genesis
project : str
Unique identifier for the project.
Used as a root directory of model artifacts, and logging files to ensure traceability.
Used as a root directory of model artifacts, and logging files to ensure traceability.
target : str
The name of the target (label) column in the input dataset. Specifies the dependent variable
the model will learn to predict.
the model will learn to predict.
input_data : str
Defines path and format of the input dataset.
1. file: file name (if in data) or full path
2. spark: connection e.g. catalog.db.table_name
3. db: connection e.g. postgresql://user:pass@localhost:5432/mydb
When local files are used:
• Files in
• Files located out of the main project dir have to use OS path to the data file.
1. file: file name (if in data) or full path
2. spark: connection e.g. catalog.db.table_name
3. db: connection e.g. postgresql://user:pass@localhost:5432/mydb
When local files are used:
• Files in
data folder can be loaded by their filename only, e.g. test.csv.• Files located out of the main project dir have to use OS path to the data file.
input_source : str = "file"
Defines the ingestion engine. Options:
• file: Local or network file system (csv / gz / parquet / feather)
• spark: Distributed Spark DataFrame
• db: SQL Database connection
• file: Local or network file system (csv / gz / parquet / feather)
• spark: Distributed Spark DataFrame
• db: SQL Database connection
input_cols : list = None
Explicit list of columns to load. Leave empty to load ALL available columns from the source.
Supports also syntax by dictionary:
•
•
Supports also syntax by dictionary:
•
{"remove": "COL1", "COL2"}•
{"keep": "COL1", "COL2"}flow_vars : list = None
Columns to retain as non-feature metadata/IDs. These are excluded from feature engineering but preserved for model application (scoring) and traceability.
yy_mm : str = None
The column name representing the timestamp/decision date. Used for time-based train/test
splits and PSI stability checks.
If no time variable is specified, an artificial one is generated based on row order.
splits and PSI stability checks.
If no time variable is specified, an artificial one is generated based on row order.
yy_mm_format : str = None
The strftime format string used to parse the time column. Standard Python % directives apply.
Common Examples:
• “2023-01-15” -> “%Y-%m-%d”
• “15Jan23” -> “%d%b%y”
Common Examples:
• “2023-01-15” -> “%Y-%m-%d”
• “15Jan23” -> “%d%b%y”
import_start : float = 0.0
Fraction of the dataset to start loading from. Useful if the dataset head contains stale/noisy
data or if processing in chunks.
data or if processing in chunks.
import_end : float = 1.0
Fraction of the dataset to stop loading at. Allows testing with subsets before committing to
full data ingestion.
full data ingestion.
train_test : float = 0.3
Proportion of the loaded data reserved for the Test Set (held out). The remaining (1-ratio) is
used for training/validation.
used for training/validation.
train_valid : float = 0.33
Proportion of the Training data further split into a Validation Set. Used for hyperparameter
tuning and early stopping.
tuning and early stopping.
smp_train : int|float = 1.0
Sub-sampling ratio for the Training set to accelerate the learning during prototyping.
• Value over 1 represents sample observation count.
• Value between (0, 1) represents fraction of the input dataset.
• Value over 1 represents sample observation count.
• Value between (0, 1) represents fraction of the input dataset.
smp_feature : int|float = 1.0
Sub-sampling ratio of input variables to reduce dimensionality and accelerate the learning
during prototyping.
• Value over 1 represents sample feature count.
• Value between (0, 1) represents fraction of the features in the input dataset.
during prototyping.
• Value over 1 represents sample feature count.
• Value between (0, 1) represents fraction of the features in the input dataset.
Data
max_miss : float = 0.7
Drop variables with missing values exceeding set percentage.
max_1val : float = 0.9
Drop variables where > X% of values are identical (mode). High share indicates lack of variance (e.g., constant columns).
max_var : float = 0.9
Threshold to detect quasi-IDs (variables with extremely high cardinality/variability).
Variables exceeding this are removed to prevent overfitting.
Variables exceeding this are removed to prevent overfitting.
max_corr : float = 0.9
Threshold for pairwise correlation. Variables with absolute correlation > X are considered redundant (multicollinearity) and one is dropped.
cat_max : int = 500
Maximum number of unique categories allowed in a categorical variable. Variables exceeding this are dropped or require special handling.
th_stationarity : float = 0.1
p-value threshold for the Dickey-Fuller test. Variables with p-value > X are considered
non-stationary (unstable over time).
non-stationary (unstable over time).
th_outliers : float = 0.01
Expected proportion of outliers (noise/errors) in the data. Outliers algorithm uses the set
value as the data cutoff threshold.
value as the data cutoff threshold.
float_downcast : int | bool = 0
Downcast float64 variable to float32. When enabled, all 64-bit float variables (NumPy & PyArrow)
are cast to 32-bit float to reduce memory footprint.
are cast to 32-bit float to reduce memory footprint.
Encoding
gini_cutoff : float = 0.02
Minimum Gini Index required for a feature to be retained. Features with lower predictive
power are dropped.
power are dropped.
min_bin_share : float = 0.03
Minimum relative size (share) for a bin (cat + num). Bins smaller than this are merged
with adjacent bins to ensure stability.
with adjacent bins to ensure stability.
max_num_bins : int = 10
aximum N bins to explore during ML numerical binning transformation. Binning exploration
goes from 2 to N.
goes from 2 to N.
num_alpha : float = 0.05
Significance level (alpha) for statistical tests during binning optimization.
Different bin versions are considered statistically equal if feature performance Bin1 ~ Bin2.
Different bin versions are considered statistically equal if feature performance Bin1 ~ Bin2.
ixn_strategy : int = 1
Strategy for generating interaction features:
• 1: LightGBM (LGB) based interactions
• 2: XGBoost (XGB) based interactions
• 1: LightGBM (LGB) based interactions
• 2: XGBoost (XGB) based interactions
ixn_max_leaves : int = 8
Interaction GB-algo critical gen setup of interaction depth.
Maximum number of leaves per tree. Controls model complexity/depth.
Maximum number of leaves per tree. Controls model complexity/depth.
ixn_min_target : float = 0.10
Minimum target rate (imbalance metric) required in an interaction feature.
Interactions below this threshold are pruned as noise.
Interactions below this threshold are pruned as noise.
woe_strategy : int = 1
Minimum target rate (imbalance metric) required in an interaction variable.
Transformation Strategy to WOE
• 1: Gini search
• 2: Gini + t-test search
Transformation Strategy to WOE
• 1: Gini search
• 2: Gini + t-test search
woe_alpha : float = 0.05
Significance level for bin pruning and stability checks during WOE transformation.
woe_stability : float = 0.65
Predictive Stability Index cutoff. Features with PSI < X are removed.
Training
gb_strategy : int = 1
Model training by GBM Tree Strategy:
• 1: LightGBM (LGB)
• 2: XGBoost (XGB)
• 1: LightGBM (LGB)
• 2: XGBoost (XGB)
gb_max_leaves : int = 31
Maximum number of leaves per tree. Controls model complexity/depth.
gb_estimators : int = 100
Total number of boosting stages (trees) to be added.
gb_learning_rate : float = 0.1
Step size shrinkage used in updating leaves. Lower values require more trees.
gb_min_child_weight : float = 0.1
Minimum sum of instance weights (Hessian) needed in a child node.
Prevents overfitting by limiting splits with low data support.
Prevents overfitting by limiting splits with low data support.
shadow_quantile : float = 0.9
During Feature Pruning the shadow features are generated as permutated orig.
features to provide a noise distribution. Shadow quantile value set to 1 means
max value from the noise dst (stronger pruning) 0 min (weaker pruning).
features to provide a noise distribution. Shadow quantile value set to 1 means
max value from the noise dst (stronger pruning) 0 min (weaker pruning).
cross_val_folds : int = 3
Number of cross-validation folds for shadow assessment and where feature significance
to model residuals is assessed.
to model residuals is assessed.
glm_strategy : int = 1
Strategy for GLM Dense Optimization
• 1: LassoGLM
• 2: ElasticGLM
• 3: LogRegGLM
• 1: LassoGLM
• 2: ElasticGLM
• 3: LogRegGLM
glm_alpha : float = 0.05
Significance level during GLM Sparse training to add/remove significant
feature given change in model residulas p-value.
feature given change in model residulas p-value.
glm_eps : float = 1e-3
Epsilon (eps) represents a relative search range. Defines the ratio between
the strongest and weakest regularization strength.
• eps=1e-3 means that alpha_min / alpha_max = 1e-3
the strongest and weakest regularization strength.
• eps=1e-3 means that alpha_min / alpha_max = 1e-3
glm_tol : float = 1e-4
Tolerance (tol) represents optimization accuracy. Defines when the change in
the loss function is small enough to stop computing a single model.
the loss function is small enough to stop computing a single model.
Selection
select_alpha : float = 0.05
Significance level during tuning phase for agents comparison and cross behavior checks.
select_bins : float = 10
Selection phase transform continous probability to distinct bins for comparison and
transition matrix.
transition matrix.
select_choice : int = 0
Selection of the final production candidate:
• 0: Auto select the best one based on comparison scoring
• 1: Sparse Selector <br> 2: Dense Selector
• 3: PLS Selector
• 4: Tree Selector
• 0: Auto select the best one based on comparison scoring
• 1: Sparse Selector <br> 2: Dense Selector
• 3: PLS Selector
• 4: Tree Selector
Output
save : bool | int = 1
Set to 1 (True) to persist models, metrics, reports and artifacts to the project output folder.
logging : bool | int = 1
Set to 1 (True) to persist logging during training to the project output folder “run.log”;
independent of verbosity level and save state.
independent of verbosity level and save state.
offload : bool | int = 0
Offloads relay-data structures to disk via the Arrow engine to reduce memory footprint.
Enable when working with large feature spaces or limited RAM. Trade-off: minor I/O
overhead on access in exchange for significantly lower peak memory usage.
Enable when working with large feature spaces or limited RAM. Trade-off: minor I/O
overhead on access in exchange for significantly lower peak memory usage.
verbose : int = 2
Controls the amount of output:
• 0: Silent (Production mode)
• 1: Info (Standard logs)
• 2: GUI Interactive Panels & Reports
• 0: Silent (Production mode)
• 1: Info (Standard logs)
• 2: GUI Interactive Panels & Reports
