@@ -1038,7 +1038,7 @@ double ERClassifierNM1::eval(const ERStat& stat)
10381038 (float )(1 -stat.euler ), // number of holes
10391039 stat.med_crossings );
10401040
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);
10421042
10431043 // Logistic Correction returns a probability value (in the range(0,1))
10441044 return (double )1 -(double )1 /(1 +exp (-2 *votes));
@@ -1070,7 +1070,7 @@ double ERClassifierNM2::eval(const ERStat& stat)
10701070 stat.med_crossings , stat.hole_area_ratio ,
10711071 stat.convex_hull_ratio , stat.num_inflexion_points );
10721072
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);
10741074
10751075 // Logistic Correction returns a probability value (in the range(0,1))
10761076 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
21522152 {
21532153 HCluster cluster;
21542154 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 ;
21552160
21562161 int node1 = (int )Z[i];
21572162 int node2 = (int )Z[i+1 ];
@@ -2611,7 +2616,7 @@ double MaxMeaningfulClustering::probability(vector<int> &cluster)
26112616 sample.push_back ((float )mean[0 ]);
26122617 sample.push_back ((float )std[0 ]);
26132618
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);
26152620
26162621 return (double )1 -(double )1 /(1 +exp (-2 *votes_group));
26172622}
0 commit comments