Skip to content
Back to Knowledge Base

How to Train an ML Model

CoCoCo includes a built-in machine learning runtime powered by XGBoost. You can train regression or classification models directly on your production data and use them in Workflows for prediction.

Model typePredicts
RegressionA continuous value — delivery time, cost, waste percentage
ClassificationA category — pass/fail, machine type, priority level
  1. Go to Menu → AI & ML → ML Models
  2. Click + New Model
  3. Enter a Name and select the Type (Regression or Classification)
  4. Define the training data query — a SQL query that returns the training rows (dataQuerySQL)
  5. Choose the Target column to predict (targetColumn) and the Feature columns to learn from (featureColumns)
  6. Click Train

Training runs in the background. You are notified when it completes.

Add an ML Predict node:

  1. Select the trained model
  2. Map Workflow data to the model’s input features
  3. The node output contains the prediction

Models can be retrained at any time with updated data. The previous version stays active until the new training succeeds.