← Machine Learning Academy

Machine Learning Academy · 4 / 5

Start with a bounded baseline

Make a small, reviewable initial configuration before attempting tuning.

YOUR TASK

Make this happen

3 steps
  1. Add baseline hyperparameters: maxDepth 3, eta 0.1, rounds 100 and evalMetric rmse. Connect them to the tabular model.

  2. Keep the working capabilities from the previous lesson and connect the new pieces to the same solution.

  3. Check the complete solution, then inspect any unmet requirements.

This step starts with the earlier solution and one new challenge. Each lesson keeps its own draft.

Read the starter files

main.cococo

ml_model_document "main" {
  format = "1"
  name = "job-quantity"
  backend = "xgboost"
  spec = {
    tabular = ml_model_tabular.quantity
  }
  dataQuerySQL = file("queries/training.sql")
}

model.cococo

ml_model_tabular "quantity" {
  task = "REGRESSION"
  targetColumn = "quantity"
  featureColumns = [ml_model_feature.priority]
  normalizationStages = [ml_model_normalization_stage.clean]
}

features.cococo

ml_model_feature "priority" {
  column = "priority"
}

queries/training.sql

SELECT quantity, priority FROM jobs WHERE quantity IS NOT NULL LIMIT 1000

normalize.cococo

ml_model_normalization_stage "clean" {
  name = "require-priority"
  source = file("scripts/normalize.lua")
}

scripts/normalize.lua

if input.priority == nil then return nil end
return { quantity = input.quantity, priority = input.priority }

tuning.cococo

ml_model_hyperparameters "baseline" {
  # TODO: add maxDepth — see the task above.
  # TODO: add eta — see the task above.
  # TODO: add rounds — see the task above.
  # TODO: add evalMetric — see the task above.
}
Supplied supporting files

Reference: machine-learning · authoring