--- alias: user-guide-train-ml-model description: "Train an ML model by transforming data, optimizing metrics, and evaluating its performance" --- # Train ML Model :lock: MLModel.**Edit** ## Overview This operation is used to train an **ML Model**. ## Setup No specific setup is required other than to meet the preconditions of the transaction. ## Preconditions * The **ML Model** exists in the system and a transformation has been applied. ## Sequence of Steps When the **ML Model** has been created, you can proceed with training. To conclude the training effectively, the **ML Model** goes through a scaling process. ### Transformations 1. On the top menu, select **Transform**. 2. Choose a field to predict by marking it as a Label. 3. Optionally, you may enable cleaning of `null` values or removing outliers. 4. Optionally, if you do not select a field as a Label, the **ML Model** will automatically be set to `Unsupervised`. 5. Select the percentage of data that should be used to train/validate/test the model. 6. Transform the data. 7. After this scaling operation is successfully completed, the **ML Model** is now ready to train. When the transformation is applied, the normalized features can be observed in the **Transformed Data** section. ![train_model_05][train_model_step_05] ### Training 1. Select **Train** on the top menu to train the model by choosing how long the AutoML algorithm should run and the metric to optimize. ![train_model_01][train_model_step_01] 2. AutoML will automatically train numerous models using different machine learning algorithms with varying hyper-parameters, and then return the best model according to the specified metric. You may also define a timeout for training. If there is no significant improvement on the validation set and the **ML Model** accuracy starts to steadily decrease, the **ML Model** will stop training or it will continue to train until it reaches the timeout you defined. ![train_model_02][train_model_step_02] !!! info In case of unsupervised learning, the model will ask you to define: the number of estimators (trees), the layer depth, and the number of samples. 3. When trained, the model can be tested to evaluate its accuracy. ![train_model_06][train_model_step_06] 4. Finally, the model can be deployed so that it can start outputting predictions in real time. ![train_model_04][train_model_step_04] [train_model_step_01]: images/train_ml_model_sep_01.png [train_model_step_02]: images/train_ml_model_step_02.png [train_model_step_04]: images/train_ml_model_step_04.png [train_model_step_05]: images/train_ml_model_step_05.png [train_model_step_06]: images/train_ml_model_step_06.png