MCPcopy Index your code
hub / github.com/DeepLabCut/DeepLabCut / fit

Method fit

deeplabcut/core/trackingutils.py:162–173  ·  view source on GitHub ↗
(self, xy)

Source from the content-addressed store, hash-verified

160 self._coeffs = None
161
162 def fit(self, xy):
163 self.x, self.y = xy[np.isfinite(xy).all(axis=1)].T
164 if len(self.x) < 3:
165 return None
166 if self.sd:
167 self.params = self._fit_error(self.x, self.y, self.sd)
168 else:
169 self._coeffs = self._fit(self.x, self.y)
170 self.params = self.calc_parameters(self._coeffs)
171 if not np.isnan(self.params).any():
172 return Ellipse(*self.params)
173 return None
174
175 @staticmethod
176 @jit(nopython=True)

Callers 7

reconstruct_all_ellipsesFunction · 0.95
test_ellipse_fitterFunction · 0.95
trackMethod · 0.45
FitSARIMAXModelFunction · 0.45

Calls 4

_fit_errorMethod · 0.95
_fitMethod · 0.95
calc_parametersMethod · 0.95
EllipseClass · 0.85

Tested by 2

test_ellipse_fitterFunction · 0.76