@@ -1038,7 +1038,7 @@ double ERClassifierNM1::eval(const ERStat& stat)
1038
1038
(float )(1 -stat.euler ), // number of holes
1039
1039
stat.med_crossings );
1040
1040
1041
- float votes = boost->predict ( sample, noArray (), DTrees::PREDICT_SUM | StatModel::RAW_OUTPUT);
1041
+ float votes = boost->predict ( sample, noArray (), ( int ) DTrees::PREDICT_SUM | ( int ) StatModel::RAW_OUTPUT);
1042
1042
1043
1043
// Logistic Correction returns a probability value (in the range(0,1))
1044
1044
return (double )1 -(double )1 /(1 +exp (-2 *votes));
@@ -1070,7 +1070,7 @@ double ERClassifierNM2::eval(const ERStat& stat)
1070
1070
stat.med_crossings , stat.hole_area_ratio ,
1071
1071
stat.convex_hull_ratio , stat.num_inflexion_points );
1072
1072
1073
- float votes = boost->predict ( sample, noArray (), DTrees::PREDICT_SUM | StatModel::RAW_OUTPUT);
1073
+ float votes = boost->predict ( sample, noArray (), ( int ) DTrees::PREDICT_SUM | ( int ) StatModel::RAW_OUTPUT);
1074
1074
1075
1075
// Logistic Correction returns a probability value (in the range(0,1))
1076
1076
return (double )1 -(double )1 /(1 +exp (-2 *votes));
@@ -2152,6 +2152,11 @@ void MaxMeaningfulClustering::build_merge_info(double *Z, double *X, int N, int
2152
2152
{
2153
2153
HCluster cluster;
2154
2154
cluster.num_elem = (int )Z[i+3 ]; // number of elements
2155
+ cluster.nfa = 0 ;
2156
+ cluster.dist_ext = 0 .0f ;
2157
+ cluster.max_meaningful = false ;
2158
+ cluster.min_nfa_in_branch = 0 ;
2159
+ cluster.probability = 0.0 ;
2155
2160
2156
2161
int node1 = (int )Z[i];
2157
2162
int node2 = (int )Z[i+1 ];
@@ -2611,7 +2616,7 @@ double MaxMeaningfulClustering::probability(vector<int> &cluster)
2611
2616
sample.push_back ((float )mean[0 ]);
2612
2617
sample.push_back ((float )std[0 ]);
2613
2618
2614
- float votes_group = group_boost->predict ( Mat (sample), noArray (), DTrees::PREDICT_SUM | StatModel::RAW_OUTPUT);
2619
+ float votes_group = group_boost->predict ( Mat (sample), noArray (), ( int ) DTrees::PREDICT_SUM | ( int ) StatModel::RAW_OUTPUT);
2615
2620
2616
2621
return (double )1 -(double )1 /(1 +exp (-2 *votes_group));
2617
2622
}
0 commit comments