KMDS Featurization
KMDS Featurization turns cleaned data into model-ready datasets using a configurable stage pipeline.
It is designed to be flexible:
- works with standard cross-sectional datasets
- supports survival analysis workflows when needed
- keeps feature engineering and train/validation flow leakage-safe
- resolves file anchors relative to the workspace
working_dir
What it produces
The main outputs are:
featurized_data.csv: a consolidated engineered datasetmodel_ready_numeric_data.csv: a numeric model-ready export for modeling
This tool also creates diagnostic artifacts such as:
feature_selection_knee_curve.png
How it works
The pipeline is built from stage wrappers in featurization_scripts/featurization.py. Each stage returns a DataFrame and the runner concatenates stage outputs by index.
Key ideas:
- every row can be assigned a stable
record_id - stages are configured in
featurizer_config.yaml - stage output is merged horizontally to build the final dataset
- only the final stage may intentionally add new records back into the pipeline
Survival vs. regular featurization
This repository supports two kinds of workflows:
- regular cross-sectional featurization: one row per input record
- survival featurization: one row per subject after flattening event or interval history
If you are doing survival analysis, read:
documents/survival_featurization_pipeline.md
For regular workflows, see:
documents/user_guide_cs_featurization.md
Quick start
Initialize a workspace config:
featurization-cli init \
--working-dir /path/to/workspace \
--metadata-file your_metadata.csv \
--data-file your_cleaned_dataset.csv
Create a provisional starter config:
featurization-cli bootstrap \
--working-dir /path/to/workspace \
--metadata-file your_metadata.csv \
--data-file your_cleaned_dataset.csv
Run the pipeline:
featurization-cli run --working-dir /path/to/workspace
If you want to validate survival config first, check:
documents/survival_featurization_pipeline.md
Testing
Run the core tests with:
pytest -q tests/test_sba_pipeline.py tests/test_survival_prep.py tests/test_survival_featurizer_pipeline.py
Notes for users
featurizer_config.yamlfile anchors are workspace-relative.- absolute paths depend on your local
working_dirsetting. - stage wrappers should stay thin and use shared
src/tabular/logic. - survival support is a use-case extension, not a universal default.
Recommended documents
documents/client_onboarding.mddocuments/sba_pipeline_featurization.mddocuments/config_blueprint.mddocuments/path_coordinator_function.mddocuments/user_guide_cs_featurization.mddocuments/survival_featurization_pipeline.md
Package metadata API
The package exposes get_package_info() for runtime discovery and orchestration clients. It returns a metadata dictionary containing:
package_name:kmds-featurizationversion: package version fromfeaturization.__version__entry_point: the CLI entry pointfeaturization-clicli_commands: available CLI subcommands such asinit,bootstrap,run, andadvisedocumentation_note: note that installed packages do not include internal docsusage: a dictionary with workflow guidance and repository guide linkscross_sectional_guide:documents/user_guide_cs_featurization.mdsurvival_guide:documents/survival_featurization_pipeline.mdguidance: notes about feature selection and wide/short datasets
The package no longer ships embedded documents in the installed distribution. Use the repository's top-level documents/ folder for onboarding and implementation guidance.
Example:
from featurization import get_package_info
info = get_package_info()
print(info["version"])
print(info["cli_commands"])
print(info["usage"]["cross_sectional_guide"])
Release files for kmds-featurization 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kmds_featurization-0.9.0.tar.gz | 47.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kmds_featurization-0.9.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 91.3 kB
Release files / kmds_featurization-0.9.0.tar.gz
| Download URL | kmds_featurization-0.9.0.tar.gz |
|---|---|
| Size | 47.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9e1a61e9ed91accec12bcb83ca95e991d51c18d9ee24841bdbdc1db379679c22
|
|
BLAKE2b-256 checksum How to use checksums |
653b6b9f37720468480073791dc7dda596b4047696ccc5a7ffdfdd6baf7d006b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / kmds_featurization-0.9.0-py3-none-any.whl
| Download URL | kmds_featurization-0.9.0-py3-none-any.whl |
|---|---|
| Size | 43.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7a2d728dacdf7ee35824a6694c4f6fff1e6e42e8c3f2fd211061e393c0703c40
|
|
BLAKE2b-256 checksum How to use checksums |
00594ed2cdfcbd63b9f13ca5eae90fc4b2ba28dab13513d1808cce039585a7a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|