Back to Knowledge Base
How to Train an ML Model
What is an ML Model in CoCoCo?
Section titled “What is an ML Model in CoCoCo?”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 type | Predicts |
|---|---|
| Regression | A continuous value — delivery time, cost, waste percentage |
| Classification | A category — pass/fail, machine type, priority level |
How to train an ML Model
Section titled “How to train an ML Model”- Go to Menu → AI & ML → ML Models
- Click + New Model
- Enter a Name and select the Type (Regression or Classification)
- Define the training data query — a SQL query that returns the training rows (
dataQuerySQL) - Choose the Target column to predict (
targetColumn) and the Feature columns to learn from (featureColumns) - Click Train
Training runs in the background. You are notified when it completes.
Using a trained model in a Workflow
Section titled “Using a trained model in a Workflow”Add an ML Predict node:
- Select the trained model
- Map Workflow data to the model’s input features
- The node output contains the prediction
Retraining
Section titled “Retraining”Models can be retrained at any time with updated data. The previous version stays active until the new training succeeds.