Skip to main content
HAlzo
Associate III
February 18, 2020
Solved

How CubeMX AI dose validation and calculates L2R with random data?

  • February 18, 2020
  • 1 reply
  • 843 views

Hello,

In CubeMX-AI , after loading the H5 model and analyzing it, there is an option to validate on desktop without providing validation data.

How the validation is done using validation input as random numbers?

and How L2R is calculated?

This topic has been closed for replies.
Best answer by fauvarque.daniel

The validation process in X-Cube-AI consist on running the model using the original framework and comparing this run with a run of the C generated code.

When you use random data the result may be good or bad but it doesn't tell you a lot of the actual results you are going to have with the real data (the random data may be far from your actual ones). It is a quick way to see if the C code generation is behaving correctly.

You can refer to this chapter of the documentation Documentation/evaluation_metrics.html#ref_l2r for a detailed L2R formula.

In STM32CubeMX you can open the documentation using the Help->X-Cube-AI Documentation menu

If you want to access it directly it is in the pack distribution. Usually on Windows it is under

C:\Users\***\STM32Cube\Repository\Pack\STMicroelectronics\X-Cube-AI\5.0.0\Documentation

Hope it helps

Regards

Daniel

1 reply

fauvarque.daniel
fauvarque.danielBest answer
ST Employee
February 18, 2020

The validation process in X-Cube-AI consist on running the model using the original framework and comparing this run with a run of the C generated code.

When you use random data the result may be good or bad but it doesn't tell you a lot of the actual results you are going to have with the real data (the random data may be far from your actual ones). It is a quick way to see if the C code generation is behaving correctly.

You can refer to this chapter of the documentation Documentation/evaluation_metrics.html#ref_l2r for a detailed L2R formula.

In STM32CubeMX you can open the documentation using the Help->X-Cube-AI Documentation menu

If you want to access it directly it is in the pack distribution. Usually on Windows it is under

C:\Users\***\STM32Cube\Repository\Pack\STMicroelectronics\X-Cube-AI\5.0.0\Documentation

Hope it helps

Regards

Daniel