Skip to content

Commit

Permalink
Outliers: LocalOutlierFactor speedup
Browse files Browse the repository at this point in the history
  • Loading branch information
VesnaT committed Jan 16, 2020
1 parent a7efce6 commit 0ad8b3a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions Orange/widgets/data/owoutliers.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def __init__(self, parent):
def get_parameters(self):
return {"n_neighbors": self.n_neighbors,
"contamination": self.cont / 100,
"algorithm": "brute", # works faster for big datasets
"metric": self.METRICS[self.metric_index]}


Expand Down
6 changes: 3 additions & 3 deletions Orange/widgets/data/tests/test_owoutliers.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def test_data(self):
"""Check widget's data and the output with data on the input"""
self.send_signal(self.widget.Inputs.data, self.iris)
self.assertEqual(self.widget.data, self.iris)
self.assertEqual(len(self.get_output(self.widget.Outputs.inliers)), 136)
self.assertEqual(len(self.get_output(self.widget.Outputs.outliers)), 14)
self.assertEqual(len(self.get_output(self.widget.Outputs.inliers)), 135)
self.assertEqual(len(self.get_output(self.widget.Outputs.outliers)), 15)
self.assertEqual(len(self.get_output(self.widget.Outputs.data)), 150)
self.send_signal(self.widget.Inputs.data, None)
self.assertEqual(self.widget.data, None)
Expand Down Expand Up @@ -67,7 +67,7 @@ def test_in_out_summary(self):

self.send_signal(self.widget.Inputs.data, self.iris)
self.assertEqual(info._StateInfo__input_summary.brief, "150")
self.assertEqual(info._StateInfo__output_summary.brief, "136")
self.assertEqual(info._StateInfo__output_summary.brief, "135")

self.send_signal(self.widget.Inputs.data, None)
self.assertEqual(info._StateInfo__input_summary.brief, "")
Expand Down

0 comments on commit 0ad8b3a

Please sign in to comment.