2024-05-28
02:59 AM
- last edited on
2024-06-14
02:05 AM
by
Lina_DABASINSKA
I compiled a 1C library using nanoedge ai studio and verified the sample successfully using the emulator. I also successfully added it to my Keil project, but the result was always 0 when I ran it.
My code:
Error_code = neai_oneclass(input_user_buffer, &oneclass_result);
onecclasss_result is always 0, regardless of the data. Why?
2024-05-28 07:04 AM - edited 2024-05-31 12:51 AM
Hello
Here is the documentation about the neai_oneclass function:
https://wiki.st.com/stm32mcu/wiki/AI:NanoEdge_AI_Library_for_1-class_classification_(1CC)
As you can see, if it returns 0, it means that the library predicts that the signal is not an outlier. So, if your library output only 0, it means that the library is classifying all the signal as not an outlier.
1-class classification is a type of project made to help user without anomalies, but in practice, it is very hard to get a good model without any example of anomalies.
In certain use case, 1-class classification model can be of some help and detect some anomalies, but in other it is not helpful and cannot make the difference between normal or abnormal signals.
If you have abnormal data, please do an anomaly detection or N-class classification project.
If you don't have abnormal data, please try to obtain some, and if it is not possible, there might be no solution for you.
Best regards,
Julian
2024-05-29 10:44 PM
thanks.
Why is status "regular using the emulator, but status is "outlier" using the liberay in the keil
2024-05-30 12:11 AM - edited 2024-05-31 12:51 AM
Hello,
Indeed, in NanoEdge AI Studio, in the emulator step, the "classes" are regular and abnormal, and it should be outlier.
In the emulator that you can download, it is regular or outlier
In the library it is 0 or 1, 0 being regular and 1 outlier.
We will change abnormal to outlier in the NanoEdge AI Studio emulator.
Thank you for the remark.
Best regards,
Julian
2024-05-30 06:44 PM
Okay, so when will the new version be released
2024-05-31 02:39 AM - edited 2024-05-31 02:43 AM
Hello,
Our updates are scheduled on a quarterly basis, so you can expect the next one around the summer.
Best regards,
Julian
2024-06-25 02:39 AM
Has the new version(v4.5.0) been fixed?
2024-06-25 03:02 AM - edited 2024-06-25 03:13 AM
Hello,
If I understood your previous remark correctly, yes it has been fixed. In any case, it is a naming issue, the 1 class classification libraries return 0 or 1.
Please let me know if you have any other remark concerning this matter or any other one in NanoEdge AI Studio.
Best regards,
Julian
2024-06-26 02:58 AM
I mean:
I gave the function an all-zero data set in the keil project, but the function returned 0. But the emulator of the ZIP package returns 1, why?
2024-06-26 06:02 AM
Hello,
Thank you for the clarification.
Can you send me your project (if you don't want to share the data, please send the emulator and your library).
To export a project in NanoEdge AI Studio, on the main page, select your project > click the 3 dots and click Export Project:
Thank you
Julian