Closed dangorogoro closed 4 years ago
Hi @dangorogoro ,
You're totally right !
It is redundant. In the example I wanted to extract the probability in addition to the index. But it does not make sense to re-compute the max for this.
I'll merge your pull request a bit later.
According to the function of arm_gaussian_naive_bayes_predict_f32, it puts each probability to the buffer and returns the index of the highest probability value.
But in the example code of arm_bayes_example_f32.c, it calculates the max value in the result buffer even though arm_gaussian_naive_bayes_predict_f32 returns it.
I think this is a bit redundant. So, unless there is a clear reason to write it this way, wouldn't it be less confusing to write the following?
I've written a pull request, so please take a look at that as well. #1002
Thank you.