Your question is Preprocessing for Model Ingestion. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Implement a preprocessing function for the Randstad Digital Belgium model-ingestion pipeline. Given raw records, convert selected numeric and categorical features into deterministic numeric vectors suitable for model input.
For numeric columns, replace None with the column median, then apply min-max normalization. If a column has the same value for every record, its normalized value must be 0.0. For categorical columns, replace None with the string "UNKNOWN", discover categories from the input batch, sort them lexicographically, and one-hot encode each value.
Return one vector per input record. Each vector must contain normalized numeric values first, followed by one-hot values for each categorical column in the order supplied by categorical_columns. Do not mutate the input records.
rows is a non-empty list of dictionaries whose values are numbers, strings, or None.numeric_columns and categorical_columns are lists of column names with no duplicates.None value.float values.def preprocess_dataset(rows, numeric_columns, categorical_columns):