From 06fd01782816305789083f723ad7a3498a4e415b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Wed, 1 Oct 2014 15:30:27 -0400 Subject: [PATCH] Improve description of stop_probability --- skimage/measure/fit.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/skimage/measure/fit.py b/skimage/measure/fit.py index 9386c9b8..7de90291 100644 --- a/skimage/measure/fit.py +++ b/skimage/measure/fit.py @@ -564,14 +564,15 @@ def ransac(data, model_class, min_samples, residual_threshold, threshold. stop_probability : float in range [0, 1], optional RANSAC iteration stops if at least one outlier-free set of the - training data is sampled. This requires to generate at least - N samples (iterations): + training data is sampled with ``probability >= stop_probability``, + depending on the current best model's inlier ratio and the number + of trials. This requires to generate at least N samples (trials): N >= log(1 - probability) / log(1 - e**m) - where the probability (confidence) is typically set to high value such - as 0.99 and e is the current fraction of inliers w.r.t. the total - number of samples. + where the probability (confidence) is typically set to a high value + such as 0.99, and e is the current fraction of inliers w.r.t. the + total number of samples. Returns -------