Trait MultiConsensus

Source
pub trait MultiConsensus<E, Data>
where E: Estimator<Data>,
{ type Inliers: IntoIterator<Item = usize>; type Models: IntoIterator<Item = (E::Model, Self::Inliers)>; // Required method fn models<I>(&mut self, estimator: &E, data: I) -> Self::Models where I: Iterator<Item = Data> + Clone; }
Expand description

See Consensus. A multi-consensus can handle situations where different subsets of the data are consistent with different models. This kind of consensus also considers whether a point is part of another orthogonal model that is known before assuming it is a true outlier. In this situation there are inliers of different models and then true outliers that are actual erroneous data that should be filtered out.

Required Associated Types§

Source

type Inliers: IntoIterator<Item = usize>

Iterator over the indices of the inliers in the clonable iterator.

Source

type Models: IntoIterator<Item = (E::Model, Self::Inliers)>

Required Methods§

Source

fn models<I>(&mut self, estimator: &E, data: I) -> Self::Models
where I: Iterator<Item = Data> + Clone,

Takes a slice over the data and an estimator instance. It returns an iterator over all of the models and all of the inliers that are consistent with that model. Every point that is not an inlier of a given model is considered an outlier of that model.

Make sure to shuffle your data before calling this. You can use SliceRandom::shuffle.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§