def do_suspiciousness(database, top_left, bottom_right): p_nondeceptive, p_deceptive = exposure.probability_in_region(database, top_left, bottom_right) s_nondeceptive, s_deceptive = probability_speed_and_heading(database, top_left, bottom_right) x, y = t[0], t[1] return k1 / (k1 + probability_in_region(x, y) * probability_speed_and_heading(t))
def calculate(self, top_left, bottom_right): """Noticeability of non-deceptive and deceptive agents in region. """ def calculate_noticeability(k3, p_agent): if p_agent == globals.NOT_APPLICABLE: return p_agent elif p_agent == 0: return 0 return round(k3 / (k3 + p_agent), 4) p_nondeceptive, p_deceptive = exposure.probability_in_region(self._database, top_left, bottom_right) return [calculate_noticeability(self._k3, p_nondeceptive), calculate_noticeability(self._k3, p_deceptive)]