-
-
Notifications
You must be signed in to change notification settings - Fork 25.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MRG] Fix LocalOutlierFactor's output for data with duplicated samples #28773
[MRG] Fix LocalOutlierFactor's output for data with duplicated samples #28773
Commits on Apr 5, 2024
-
Fix scikit-learn#27839: Adjust LocalOutlierFactor for data with dupli…
…cated samples Previously, when the dataset had values repeat more times than the algorithm's number of neighbors, it miscalculates the outliers. Because the distance between the duplicated samples is 0, the local reachability density is equal to 1e10. This leads to values that are close to the duplicated values having a really low negative outlier factor (under -1e7), labeling them as outliers. This fix checks if the minimum negative outlier factor is under -1e7 and, if so, raises the number of neighbors to the number of occurrences of the most frequent value + 1, also raising a warning. Notes: Added a handle_duplicates variable, which allows developers to manually handle the duplicate values, if desired. Also added a memory_limit variable to avoid creating memory errors for really large datasets, which can also be changed manually by developers.
Configuration menu - View commit details
-
Copy full SHA for e754830 - Browse repository at this point
Copy the full SHA e754830View commit details
Commits on Apr 8, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 19cb411 - Browse repository at this point
Copy the full SHA 19cb411View commit details -
Configuration menu - View commit details
-
Copy full SHA for bc069b6 - Browse repository at this point
Copy the full SHA bc069b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for c6470c6 - Browse repository at this point
Copy the full SHA c6470c6View commit details
Commits on Apr 10, 2024
-
Fix: Changed approach according to review
Removed automatic change to neighbors number and changed the warning Also changed the associated test, to catch the warning.
Configuration menu - View commit details
-
Copy full SHA for 909b25c - Browse repository at this point
Copy the full SHA 909b25cView commit details
Commits on Apr 22, 2024
-
Update sklearn/neighbors/_lof.py
Changed comment according to review Co-authored-by: Tim Head <betatim@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for de442f0 - Browse repository at this point
Copy the full SHA de442f0View commit details
Commits on May 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 50eb839 - Browse repository at this point
Copy the full SHA 50eb839View commit details
Commits on May 27, 2024
-
Configuration menu - View commit details
-
Copy full SHA for b2f79c5 - Browse repository at this point
Copy the full SHA b2f79c5View commit details
Commits on May 29, 2024
-
Update sklearn/neighbors/tests/test_lof.py
Changed test description according to review Co-authored-by: Omar Salman <omar.salman@arbisoft.com>
Configuration menu - View commit details
-
Copy full SHA for 68be703 - Browse repository at this point
Copy the full SHA 68be703View commit details -
Configuration menu - View commit details
-
Copy full SHA for ec49d7b - Browse repository at this point
Copy the full SHA ec49d7bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1c9be74 - Browse repository at this point
Copy the full SHA 1c9be74View commit details
Commits on May 30, 2024
-
Configuration menu - View commit details
-
Copy full SHA for d363364 - Browse repository at this point
Copy the full SHA d363364View commit details -
Co-authored-by: Omar Salman <omar.salman@arbisoft.com>
Configuration menu - View commit details
-
Copy full SHA for 813378c - Browse repository at this point
Copy the full SHA 813378cView commit details -
Update sklearn/neighbors/tests/test_lof.py
Co-authored-by: Omar Salman <omar.salman@arbisoft.com>
Configuration menu - View commit details
-
Copy full SHA for 87f0fc0 - Browse repository at this point
Copy the full SHA 87f0fc0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8267f67 - Browse repository at this point
Copy the full SHA 8267f67View commit details -
Configuration menu - View commit details
-
Copy full SHA for 984accf - Browse repository at this point
Copy the full SHA 984accfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ad1958 - Browse repository at this point
Copy the full SHA 4ad1958View commit details -
Configuration menu - View commit details
-
Copy full SHA for 35a6519 - Browse repository at this point
Copy the full SHA 35a6519View commit details