Fix warnings I missed.

This commit is contained in:
Relintai 2023-04-16 16:23:33 +02:00
parent dbe25ef093
commit 7a30524998
2 changed files with 5 additions and 5 deletions

View File

@ -8,10 +8,10 @@
std::tuple<bool, real_t> MLPPHypothesisTesting::chiSquareTest(std::vector<real_t> observed, std::vector<real_t> expected) {
//real_t df = observed.size() - 1; // These are our degrees of freedom
real_t sum = 0;
for (uint32_t i = 0; i < observed.size(); i++) {
sum += (observed[i] - expected[i]) * (observed[i] - expected[i]) / expected[i];
}
//real_t sum = 0;
//for (uint32_t i = 0; i < observed.size(); i++) {
// sum += (observed[i] - expected[i]) * (observed[i] - expected[i]) / expected[i];
//}
return std::tuple<bool, real_t>();
}

View File

@ -243,7 +243,7 @@ Ref<MLPPVector> MLPPKMeans::silhouette_scores() {
closest_centroids->get_row_into_mlpp_vector(i, closest_centroids_i_tempv);
// COMPUTING b[i]
real_t b = INT_MAX;
real_t b = Math_INF;
for (int j = 0; j < mu_size_y; ++j) {
_mu->get_row_into_mlpp_vector(j, mu_j_tempv);