liveBook · Manning

Domain knowledge

As explained in Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI

Domain knowledge is expertise about the subject matter and phenomena represented by a dataset.

Domain knowledge is expertise about the subject matter and phenomena represented by a dataset. It turns business understanding into modeling decisions rather than treating features as interchangeable columns. section 7.4

Feature engineering is a primary way to apply domain knowledge: encode how the problem works, create useful predictors, and represent information in a form the model can learn. Deep learning can discover representations automatically, but domain-specific insights may still improve particular applications. section 7.4 section 1.3

Domain knowledge supports practical choices that statistical analysis alone may not settle:

  • Identify a likely causal feature among duplicated or highly collinear features, then remove redundant alternatives. section 2.2.2
  • Choose which feature to retain when the underlying cause is not recorded, using theoretical deductions, causal analysis, target association, and data quality. section 2.2.2
  • Set missing-value defaults according to the meaning of each field instead of applying one universal replacement rule. section 9.2.1
  • Shape exploratory analysis, validation, pipelines, baselines, and model tuning around the problem’s targets and predictors. section 7.4

Real-estate missing values

For Bathrooms, use the column median because residential properties rarely have no washrooms. For Car Parks, use zero because many properties have no parking spaces. For categorical fields, use explicit unknown values such as unknown_furnishing, unknown_property, and unknown_location. section 9.2.1

Listing 9.4 Defining the default replacement values for missing values
misc_col_dict: # default values to replace missing values for general columns 
   Bathrooms: median                                     #1
   Car Parks: 0                                          #2
   Furnishing: unknown_furnishing                        #3
   Property Type: unknown_property
   Location: unknown_location

Inspect the configuration pattern that records domain-informed defaults for general columns before applying them in a cleanup function. section 9.2.1

How Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI covers it

How deep it goes
Explains practical decisions with real-estate and collinearity examples but stops short of a general method for acquiring domain expertise.
Examples
Uses car-fuel relationships, duplicated numeric features, and real-estate bathrooms, parking, furnishing, property type, and location fields.
What it assumes
Assumes familiarity with datasets and modeling while teaching how subject-matter understanding informs feature and cleaning decisions.
What you can do after
Apply it to design meaningful features, select among redundant predictors, justify imputations, and adapt modeling workflows to the problem.
How it connects
Links domain knowledge to feature engineering, causal analysis, collinearity, missing data, exploratory data analysis, validation, and representation learning.

Also explained in

Compare how 17 books explain domain knowledge →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI. The section links point to the parts of the book it draws on.