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

Method calc_link_probability

deeplabcut/core/inferenceutils.py:401–411  ·  view source on GitHub ↗
(self, link)

Source from the content-addressed store, hash-verified

399 return mahal
400
401 def calc_link_probability(self, link):
402 if self._kde is None:
403 raise ValueError("Assembler should be calibrated first with training data.")
404
405 i = link.j1.label
406 j = link.j2.label
407 ind = _conv_square_to_condensed_indices(i, j, self.n_multibodyparts)
408 mu = self._kde.mean[ind]
409 sigma = self._kde.covariance[ind, ind]
410 z = (link.length**2 - mu) / sigma
411 return 2 * (1 - 0.5 * (1 + erf(abs(z) / sqrt(2))))
412
413 @staticmethod
414 def _flatten_detections(data_dict):

Callers 2

_assembleMethod · 0.95

Calls 1

Tested by 1