CMSIS-DSP: Modified the arm_bayes_example
diff --git a/CMSIS/DSP/Examples/ARM/arm_bayes_example/arm_bayes_example_f32.c b/CMSIS/DSP/Examples/ARM/arm_bayes_example/arm_bayes_example_f32.c
index 207ae6a..6470257 100755
--- a/CMSIS/DSP/Examples/ARM/arm_bayes_example/arm_bayes_example_f32.c
+++ b/CMSIS/DSP/Examples/ARM/arm_bayes_example/arm_bayes_example_f32.c
@@ -104,9 +104,9 @@
in[0] = 1.5f;
in[1] = 1.0f;
- arm_gaussian_naive_bayes_predict_f32(&S, in, result);
+ index = arm_gaussian_naive_bayes_predict_f32(&S, in, result);
- arm_max_f32(result, NB_OF_CLASSES, &maxProba, &index);
+ maxProba = result[index];
#if defined(SEMIHOSTING)
printf("Class = %d\n", index);
@@ -115,9 +115,9 @@
in[0] = -1.5f;
in[1] = 1.0f;
- arm_gaussian_naive_bayes_predict_f32(&S, in, result);
+ index = arm_gaussian_naive_bayes_predict_f32(&S, in, result);
- arm_max_f32(result, NB_OF_CLASSES, &maxProba, &index);
+ maxProba = result[index];
#if defined(SEMIHOSTING)
printf("Class = %d\n", index);
@@ -126,9 +126,9 @@
in[0] = 0.0f;
in[1] = -3.0f;
- arm_gaussian_naive_bayes_predict_f32(&S, in, result);
+ index = arm_gaussian_naive_bayes_predict_f32(&S, in, result);
- arm_max_f32(result, NB_OF_CLASSES, &maxProba, &index);
+ maxProba = result[index];
#if defined(SEMIHOSTING)
printf("Class = %d\n", index);