---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.5
alternate:
  - https://catboost.ai/docs/en/concepts/output-data_training-log.md
  - href: en/concepts/output-data_training-log.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://catboost.ai/docs/en/llms.txt

# Metrics and time information

#### Contains

- <!-- source: en/_includes/work_src/reusage-formats/format__contains__metrics.md -->
  The [metric](https://catboost.ai/docs/en/concepts/loss-functions.md) values for the training and test sets.

  The table below lists the names of parameters that define the metric values to output. The values of all functions defined by these parameters are output.

  Command-line version parameters| Python parameters | R parameters
  -------------------------------|-------------------|------------------|
  `--custom-metric`              | `custom_metric`   |  `custom_loss`   |
  `--loss-function`              | `loss-function`   |  `loss-function` |
  `--eval-metric`                | `eval-metric`     |  `eval-metric`   |
  <!-- endsource: en/_includes/work_src/reusage-formats/format__contains__metrics.md -->

- Information about the number of seconds of training:
    - passed since the beginning
    - remaining until the end


#### Format

The resulting JSON file consists of the following arrays:

- [meta](#meta__array)
- [iterations](#iterations__array)

#### meta

Contains basic information about the training.

<!-- source: en/_includes/work_src/reusage-formats/json__format__array.md -->
Format of the array with prettified sample data:
<!-- endsource: en/_includes/work_src/reusage-formats/json__format__array.md -->


```
"meta": {
    "`launch_mode`": "Train",
    "`name`": "second",
    "`iteration_count`": 1000,
    "`learn_metrics`": [
      {
        "`name`": "Precision:class=0",
        "`value`": "Max"
      },
      {
        "`name`": "Precision:class=1",
        "`value`": "Max"
      }
    ],
    "`test_sets`": [
      "test",
      ...
      "testN"
    ],
    "`test_metrics`": [
      {
        "`name`":"Precision:class=0",
        "`value`":"Max"
      },
      {
        "`name`":"Precision:class=1",
        "`value`":"Max"
      }
    ],
    "`learn_sets`": [
      "learn"
    ]
}
```


Property | Type | Description
----- | ----- | -----
`launch_mode` | string | The specified launch mode.<br/><br/>Possible values:<br/>- Train — Training launch mode.<br/>- CV — Cross-validation launch mode (for the Python [cv](python-reference_cv.md) method only).<br/><br/>The command-line implementation of the [Cross-validation](cli-reference_cross-validation.md) feature returns the Train value in this parameter.<br/><br/>{% endnote %}
`name` | string | The experiment name.<br/><br/>The value can be set in the `--name` (`--name`) training parameter. The default name is experiment.
`iteration_count` | int | The maximum number of trees that can be built when solving machine learning problems.<br>The final number of iterations may be less than the output in this property.
`learn_metrics` | array | A list of metrics calculated for the learning dataset and information regarding the optimization method.
`test_sets` | array | The names of the arrays within the [iterations](#iterations__array) array that contain the calculated values of metrics for the validation datasets.
`test_metrics` | array | A list of metrics calculated for the validation dataset and information regarding the optimization method.
`name` | string | The name of the metric.
`value` | string | The method for defining the best value of the metric. Possible values:<br/>- Min — The smaller the value of the metric, the better.<br/>- Max — The bigger the value of the metric, the better.<br/>- Undefined — The best value of the metric is not defined.<br/>- Float value — The best value of the metric is user-defined.
`learn_sets` | array | The name of the array within the [iterations](#iterations__array) array that contains the calculated values of the metrics for the learning dataset.


#### iterations

Contains an array of [metric](https://catboost.ai/docs/en/concepts/loss-functions.md) values for the training and test sets and information on the duration of training for each iteration.

<!-- source: en/_includes/work_src/reusage-formats/json__format__array.md -->
Format of the array with prettified sample data:
<!-- endsource: en/_includes/work_src/reusage-formats/json__format__array.md -->


```
"iterations": [
    {
      "`learn`": [
        0.8333333333,
        0.6666666667,
        0.7325581395,
        -1.0836257,
        0.4347826087,
        0.1428571429,
        0.984375,
        -0.6881395691
      ],
      "`iteration`": 0,
      "`passed_time`": 0.0227411829,
      "`remaining_time`": 22.71844172,
      "`test`1": [
        0.8333333333,
        0.6666666667,
        0.7325581395,
        -1.0836257,
        0.4347826087,
        0.1428571429,
        0.984375,
        -0.6881395691
      ],
      ...
      "`test`N": [
        0.7333453333,
        0.3666664267,
        0.0325581395,
        -1.9046257,
        0.8937826089,
        0.4138571478,
        0.004313,
        -0.3881390984
      ]
    }
  ]
```

Property | Type | Description
----- | ----- | -----
`learn` | array | A list of metric values calculated for the learning dataset. The order of metrics is given in the `learn_metrics` array of the [meta](#meta__array) array.
`iteration` | int | The index of the iteration. Numbering starts from zero.
`passed_time` | float | The number of seconds passed since the beginning of training.
`remaining_time` | float | The number of seconds remaining until the end of training given that all the scheduled iterations take place.
`test` | array | The values of metrics calculated for the corresponding validation dataset.<br/><br/>The order of the metrics is given in the `test_metrics` array of the [meta](#meta__array) array.


#### Example

```
{
  "meta": {
    "`launch_mode`": "Train",
    "`name`": "second",
    "`iteration_count`": 1000,
    "`learn_metrics`": [
      {
        "`name`": "Precision:class=0",
        "`value`": "Max"
      },
      {
        "`name`": "Precision:class=1",
        "`value`": "Max"
      },
      {
        "`name`": "Precision:class=2",
        "`value`": "Max"
      },
      {
        "`name`": "MultiClass",
        "`value`": "Max"
      },
      {
        "`name`": "Recall:class=0",
        "`value`": "Max"
      },
      {
        "`name`": "Recall:class=1",
        "`value`": "Max"
      },
      {
        "`name`": "Recall:class=2",
        "`value`": "Max"
      },
      {
        "`name`": "MultiClassOneVsAll",
        "`value`": "Max"
      }
    ],
    "`test_sets`": [
      "test"
    ],
    "`test_metrics`": [
      {
        "`name`": "Precision:class=0",
        "`value`": "Max"
      },
      {
        "`name`": "Precision:class=1",
        "`value`": "Max"
      },
      {
        "`name`": "Precision:class=2",
        "`value`": "Max"
      },
      {
        "`name`": "MultiClass",
        "`value`": "Max"
      },
      {
        "`name`": "Recall:class=0",
        "`value`": "Max"
      },
      {
        "`name`": "Recall:class=1",
        "`value`": "Max"
      },
      {
        "`name`": "Recall:class=2",
        "`value`": "Max"
      },
      {
        "`name`": "MultiClassOneVsAll",
        "`value`": "Max"
      }
    ],
    "`learn_sets`": [
      "learn"
    ]
  },
  "iterations": [
       {
       "`learn`": [
       0.8333333333,
       0.6666666667,
       0.7325581395,
       -1.0836257,
       0.4347826087,
       0.1428571429,
       0.984375,
       -0.6881395691
       ],
       "`iteration`": 0,
       "`passed_time`": 0.0227411829,
       "`remaining_time`": 22.71844172,
       "`test`": [
       0.8333333333,
       0.6666666667,
       0.7325581395,
       -1.0836257,
       0.4347826087,
       0.1428571429,
       0.984375,
       -0.6881395691
      ]
    },
    {
      "`learn`": [
        0.7142857143,
        1,
        0.7820512821,
        -1.068965402,
        0.652173913,
        0.1428571429,
        0.953125,
        -0.6832264
      ],
      "`iteration`": 1,
      "`passed_time`": 0.04471753966,
      "`remaining_time`": 22.31405229,
      "`test`": [
        0.7142857143,
        1,
        0.7820512821,
        -1.068965402,
        0.652173913,
        0.1428571429,
        0.953125,
        -0.6832264
      ]
    },
    ...
  ]
}
```
