{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Raises": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Yields": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Methods": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Returns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "model",
              "annotation": "object",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Best model with largest consensus set."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "inliers",
              "annotation": "ndarray of shape (N,)",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Boolean mask of inliers classified as "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "True"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Fit a model to data with the RANSAC (random sample consensus) algorithm."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Receives": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warnings": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Attributes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "data",
              "annotation": "list or tuple or array of shape (N,)",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Data set to which the model is fitted, where N is the number of data points and the remaining dimension are depending on model requirements. If the model class requires multiple input data arrays (e.g. source and destination coordinates of  "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "skimage.transform.AffineTransform"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "), they can be optionally passed as tuple or list. Note, that in this case the functions "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "estimate(*data)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "residuals(*data)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "is_model_valid(model, *random_data)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " and "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "is_data_valid(*random_data)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " must all take each data array as separate arguments."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "model_class",
              "annotation": "type",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Class with the following methods:"
                    }
                  ]
                },
                {
                  "__type": "BulletList",
                  "__tag": 4053,
                  "ordered": false,
                  "start": 1,
                  "children": [
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "Either:"
                            }
                          ]
                        },
                        {
                          "__type": "BulletList",
                          "__tag": 4053,
                          "ordered": false,
                          "start": 1,
                          "children": [
                            {
                              "__type": "ListItem",
                              "__tag": 4054,
                              "children": [
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "from_estimate"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " class method returning transform instance, as in     "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "tform = model_class.from_estimate(*data, **kwargs)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "; the resulting     "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "tform"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " should be truthy ("
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "bool(tform) == True"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": ") where     estimation succeeded, or falsey ("
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "bool(tform) == False"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": ") where it     failed;  OR"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "__type": "ListItem",
                              "__tag": 4054,
                              "children": [
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "(deprecated) "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "estimate"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " instance method, returning flag to     indicate successful estimation, as in "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "tform = model_class();     success = tform.estimate(*data)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": ". "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "success == True"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " when     estimation succeeded, "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "success == False"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " when it failed."
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "residuals(*data)"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Your model should conform to the "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "RansacModelProtocol"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " — meaning implement all of the methods / attributes specified by the :class:"
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "RansacModelProctocol"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". An easy check to see whether that is the case is to use "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "isinstance(MyModel, RansacModelProtocol)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". See https://docs.python.org/3/library/typing.html#typing.Protocol for more details."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "min_samples",
              "annotation": "int, in range (0, N)",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The minimum number of data points to fit a model to."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "residual_threshold",
              "annotation": "float, >0",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Maximum distance for a data point to be classified as an inlier."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "is_data_valid",
              "annotation": "Callable, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "This function is called with the randomly selected data before the model is fitted to it: "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "is_data_valid(*random_data)",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "is_model_valid",
              "annotation": "Callable, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "This function is called with the estimated model and the randomly selected data: "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "is_model_valid(model, *random_data)",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", ."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "max_trials",
              "annotation": "int, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Maximum number of iterations for random sample selection."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "stop_sample_num",
              "annotation": "int, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Stop iteration if at least this number of inliers are found."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "stop_residuals_sum",
              "annotation": "float, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Stop iteration if sum of residuals is less than or equal to this threshold."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "stop_probability",
              "annotation": "float, optional, in range [0, 1]",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "RANSAC iteration stops if at least one outlier-free set of the training data is sampled with "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "probability >= stop_probability"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", depending on the current best model's inlier ratio and the number of trials. This requires to generate at least N samples (trials):"
                    }
                  ]
                },
                {
                  "__type": "Blockquote",
                  "__tag": 4059,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "N >= log(1 - probability) / log(1 - e**m)"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "where the probability (confidence) is typically set to a high value such as 0.99, e is the current fraction of inliers w.r.t. the total number of samples, and m is the min_samples value."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "rng",
              "annotation": "{`numpy.random.Generator`, int}, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Pseudo-random number generator. By default, a PCG64 generator is used (see "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "numpy.random.default_rng",
                      "reference": {
                        "__type": "RefInfo",
                        "__tag": 4000,
                        "module": "numpy",
                        "version": "*",
                        "kind": "api",
                        "path": "numpy.random:default_rng"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "). If "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "rng"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is an int, it is used to seed the generator."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "initial_inliers",
              "annotation": "array-like of bool, shape (N,), optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Initial samples selection for model estimation"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "model_kwargs",
              "annotation": "dict of {str: Any}, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The dict of keyword arguments passed to "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "from_estimate"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " of "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "model_class"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "RANSAC is an iterative algorithm for the robust estimation of parameters from a subset of inliers from the complete data set. Each iteration performs the following tasks:"
            }
          ]
        },
        {
          "__type": "BulletList",
          "__tag": 4053,
          "ordered": true,
          "start": 1,
          "children": [
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Select "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "min_samples"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " random samples from the original data and check    whether the set of data is valid (see "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "is_data_valid"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ")."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Estimate a model to the random subset    ("
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "model_cls.from_estimate(*data[random_subset]",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ") and check whether the    estimated model is valid (see "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "is_model_valid"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ")."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Classify all data as inliers or outliers by calculating the residuals    to the estimated model ("
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "model_cls.residuals(*data)",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ") - all data samples    with residuals smaller than the "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "residual_threshold"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " are considered as    inliers."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Save estimated model as best model if number of inlier samples is    maximal. In case the current estimated model has the same number of    inliers, it is only considered as the best model if it has less sum of    residuals."
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "These steps are performed either a maximum number of times or until one of the special stop criteria are met. The final model is estimated using all inlier samples of the previously determined best model."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Other Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    }
  },
  "_ordered_sections": [
    "Summary",
    "Extended Summary",
    "Parameters",
    "Returns",
    "Yields",
    "Receives",
    "Raises",
    "Warns",
    "Other Parameters",
    "Attributes",
    "Methods",
    "Notes",
    "Warnings"
  ],
  "item_file": "/dev/scikit-image/src/skimage/measure/fit.py",
  "item_line": 1183,
  "item_type": "function",
  "aliases": [
    "skimage.measure.ransac"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "Generate ellipse data without tilt and add noise:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "t = np.linspace(0, 2 * np.pi, 50)\nxc, yc = 20, 30\na, b = 5, 10\nx = xc + a * np.cos(t)\ny = yc + b * np.sin(t)\ndata = np.column_stack([x, y])\nrng = np.random.default_rng(203560)  # do not copy this value\ndata += rng.normal(size=data.shape)\n",
        "execution_status": "success"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nAdd some faulty data:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "data[0] = (100, 100)\ndata[1] = (110, 120)\ndata[2] = (120, 130)\ndata[3] = (140, 130)\n",
        "execution_status": "success"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nEstimate ellipse model using all available data:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "model = EllipseModel.from_estimate(data)\nnp.round(model.center)\nnp.round(model.axis_lengths)\nnp.round(model.theta)\n",
        "execution_status": "unexpected_exception"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nNext we estimate an ellipse model using RANSAC.\n\nNote that the results are not deterministic, because the RANSAC algorithm\nuses some randomness.   If you need the results to be deterministic, pass a\nseeded number generator with the ``rng`` argument to ``ransac``.\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "ransac_model, inliers = ransac(data, EllipseModel, 20, 3, max_trials=50)\nsum(inliers) > 40\n",
        "execution_status": "unexpected_exception"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nRANSAC can be used to robustly estimate a geometric\ntransformation. In this section, we also show how to use a\nproportion of the total samples, rather than an absolute number.\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "from skimage.transform import SimilarityTransform\nrng = np.random.default_rng()\nsrc = 100 * rng.random((50, 2))\nmodel0 = SimilarityTransform(scale=0.5, rotation=1,\n                             translation=(10, 20))\ndst = model0(src)\ndst[0] = (10000, 10000)\ndst[1] = (-100, 100)\ndst[2] = (50, 50)\nratio = 0.5  # use half of the samples\nmin_samples = int(ratio * len(src))\n",
        "execution_status": "success"
      }
    ],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [],
  "signature": {
    "__type": "SignatureNode",
    "__tag": 4029,
    "kind": "function",
    "parameters": [
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "data",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "model_class",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "min_samples",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "residual_threshold",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "is_data_valid",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "is_model_valid",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "max_trials",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "100"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "stop_sample_num",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "inf"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "stop_residuals_sum",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "0"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "stop_probability",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "1"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "rng",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "initial_inliers",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "model_kwargs",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      }
    ],
    "return_annotation": {
      "__type": "Empty",
      "__tag": 4031
    },
    "target_name": "ransac"
  },
  "references": [
    ".. [1] \"RANSAC\", Wikipedia, https://en.wikipedia.org/wiki/RANSAC"
  ],
  "qa": "skimage.measure.fit:ransac",
  "arbitrary": [],
  "local_refs": [
    "data",
    "initial_inliers",
    "inliers",
    "is_data_valid",
    "is_model_valid",
    "max_trials",
    "min_samples",
    "model",
    "model_class",
    "model_kwargs",
    "residual_threshold",
    "rng",
    "stop_probability",
    "stop_residuals_sum",
    "stop_sample_num"
  ]
}