Design a feature dictionary with owners and units
In this article (3 sections)
A feature name rarely captures enough meaning to reproduce it. spend_30d needs currency, grain, time window, refund policy, availability and an owner who can explain changes.
Make critical fields machine-checkable
Our illustrative dictionary contains three customer-grain entries:
| Name | Owner | Unit | Availability | Max age |
|---|---|---|---|---|
| orders_30d | growth_data | count | decision minus 1 hour | 25 h |
| spend_30d | finance_data | INR | decision minus 1 hour | 25 h |
| account_age | identity_data | days | decision time | 24 h |
Every entry must have exactly name, owner, unit, grain, availability and max_age_h. Names must be unique. The local validator confirms all three entries meet that structural contract.
from feature_cases import dictionary_case
r = dictionary_case()
assert r['valid'] and r['unique_names']
assert len(r['entries']) == 3
assert set(r['required_fields']) == {
'name', 'owner', 'unit', 'grain', 'availability', 'max_age_h'
}
print(r)Run the dictionary check in the feature-engineering lab. Owners and definitions are fictional teaching examples, not live NeuraPath production metadata.
Add semantics beyond the minimum schema
A production dictionary should include description, source tables, aggregation formula, window boundaries, null meaning, allowed range, category policy, sensitive-data classification, lineage, version and deprecation date. Examples help reviewers test interpretation.
Ownership must be actionable. Name the team responsible for source correctness and the consumer responsible for model use. Define incident routing and change notification. A stale contact list is not governance.
Units deserve automated checks. Currency needs currency code and minor-unit policy. Rates need denominator and scale. Counts need deduplication grain. Timestamps need timezone and availability semantics.
Link dictionary versions to training manifests and model artifacts. When a definition changes, either preserve versioned historical computation or create a new feature name. Silent semantic reuse makes old evaluations irreproducible.
Exercise: extend the three entries with SQL lineage, null meaning, valid range and sensitive-data tier. Introduce a breaking refund-policy change to spend_30d and design its version and migration plan.
NeuraPath's Data Science course teaches features as owned data products. A dictionary makes assumptions visible before they become model bugs.
Continue learning
This article is part of the Feature engineering and data quality sequence. Use the neighbouring tasks when you need the prerequisite or the next application.
- Review the prerequisite or neighbouring task in Feature freshness: prevent stale values at prediction time.
- Continue with Data validation for model inputs with realistic edge cases.
Pankit Kumar has 10 years in Data Science & AI, building and shipping production systems in regulated pharma and clinical environments. He is a freelance trainer at Boston Institute of Analytics, AnalytixLabs and Scaler, and has taught this material to thousands of working professionals.
This article is part of our Data Science programme — 6 months. From data foundations to machine learning, deep learning and deployment.
Explore Data Science