Why this matters
Experienced practitioners often say the data matters more than the model. A simple model with well prepared inputs usually beats a clever model with poor ones. Ghanaian adverts for machine learning roles name feature engineering directly, and real Ghanaian data is messy: district names typed three ways, dates in mixed formats, blank cells from field surveys and amounts recorded in old and new cedis.
What a feature is
A feature is one input column the model uses. Feature engineering means choosing, cleaning and creating those columns so they carry useful signal. Some examples:
- From a planting date, create
planting_weekordays_after_first_rain. - From a transaction time, create
hour_of_dayoris_weekend. - From total sales and number of days, create
sales_per_day.
Categories
Models need numbers, but many columns are categories, such as district or crop type. You cannot just number them Tolon = 1, Savelugu = 2, Yendi = 3, because the model would think Yendi is "bigger" than Tolon. Instead use one hot encoding: one column per category, holding 1 if the row belongs to it and 0 otherwise. Clean the spelling first, or "Savelugu" and "savelugu " become two different districts.