-
-
Notifications
You must be signed in to change notification settings - Fork 26.6k
Closed
Description
in skimage/measure/fit.py
managing the number of iterations is done with max_trials. This is compared to _dynamic_max_trials which is computed using the largest inlier group found so far. However, this comparison is done only in cases when sample_inlier_num is larger than the biggest group. In cases when a large group is found early (but not large enough to end) the best_inlier_num is updated but the max_trials is not updated and will only be checked next time a larger group is found.
the lines (926) :
if (
best_inlier_num >= stop_sample_num
or best_inlier_residuals_sum <= stop_residuals_sum
or num_trials
>= _dynamic_max_trials(best_inlier_num, num_samples,
min_samples, stop_probability)
):
breakshould be
max_trials = min(max_trials, _dynamic_max_trials(best_inlier_num, num_samples,
min_samples, stop_probability))
if (
best_inlier_num >= stop_sample_num
or best_inlier_residuals_sum <= stop_residuals_sum
or num_trials > max_trials
):
break Metadata
Metadata
Assignees
Labels
No labels