@@ -66,6 +66,7 @@ get_gp_ransac_inlier_metric(const RegressionDataset<FeatureType> &dataset,
6666 };
6767}
6868
69+ /*
6970template <typename ModelType, typename FeatureType>
7071inline typename RansacFunctions<
7172 FitAndIndices<ModelType, FeatureType>>::ConsensusMetric
@@ -77,6 +78,17 @@ get_gp_ransac_model_entropy_metric(const FoldIndexer &indexer,
7778 return differential_entropy(consensus_cov);
7879 };
7980}
81+ */
82+
83+ template <typename ModelType, typename FeatureType>
84+ inline typename RansacFunctions<
85+ FitAndIndices<ModelType, FeatureType>>::ConsensusMetric
86+ get_gp_ransac_feature_count_consensus_metric (const FoldIndexer &indexer) {
87+ return [&, indexer](const std::vector<FoldName> &groups) {
88+ auto inds = indices_from_names (indexer, groups);
89+ return (-1.0 * static_cast <double >(inds.size ()));
90+ };
91+ }
8092
8193template <typename ModelType, typename FeatureType, typename InlierMetric>
8294inline RansacFunctions<FitAndIndices<ModelType, FeatureType>>
@@ -97,12 +109,12 @@ get_gp_ransac_functions(const ModelType &model,
97109 get_gp_ransac_inlier_metric<ModelType, FeatureType, InlierMetric>(
98110 dataset, indexer, full_cov, model, inlier_metric);
99111
100- const auto consensus_metric_from_gorup =
101- get_gp_ransac_model_entropy_metric <ModelType, FeatureType>(indexer,
102- full_cov );
112+ const auto consensus_metric_from_group =
113+ get_gp_ransac_feature_count_consensus_metric <ModelType, FeatureType>(
114+ indexer );
103115
104116 return RansacFunctions<FitAndIndices<ModelType, FeatureType>>(
105- fitter, inlier_metric_from_group, consensus_metric_from_gorup );
117+ fitter, inlier_metric_from_group, consensus_metric_from_group );
106118};
107119
108120template <typename InlierMetric, typename IndexingFunction>
0 commit comments