Available on crate feature
regression
only.Expand description
Theil-Sen estimator, a robust linear (also implemented as polynomial) estimator. Up to ~27% of values can be outliers - erroneous data far from the otherwise good data - without large effects on the result.
LinearTheilSen
implements LinearEstimator
.
Structs§
- Linear
Theil Sen - Linear estimation using the Theil-Sen estimatior. This is robust against outliers.
O(n²)
- Permutation
Iter - An iterator over the permutations.
- Permutation
Iter Buffer - A buffer returned by
PermutationIter
to avoid allocations. - Polynomial
Theil Sen - Polynomial estimation using the Theil-Sen estimatior. Very slow and should probably not be
used.
O(n^degree)
Functions§
- estimate_
permutation_ count - Lower-bound estimate (up to
pairs > 20
), within 100x (which is quite good for factorials). - permutation_
count - An exact count of permutations.
Returns
None
if the arithmetic can’t fit. - permutations
- Unique permutations of two elements - an iterator of all the pairs of associated values in the slices.
- permutations_
generic - The returned iterator is a bit funky.
It returns a buffer, which at all costs should be reused.
This could either be done using a while loop
(e.g.
while let Some(buf) = iter.next() { iter.give_buffer(buf) }
) or any of the built-in methods. If you know the length at compile time, usePermutationIter::collect_len
. - slow_
linear - Naive Theil-Sen implementation, which checks each line.
- slow_
polynomial - Naive Theil-Sen implementation, which checks each polynomial.