LocalOutlierFactor exposes methods that it shouldn't
See original GitHub issueDescribe the issue linked to the documentation
The LocalOutlierFactor class (and hence documentation) exposes methods that it probably shouldn’t:
https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.LocalOutlierFactor.html#sklearn.neighbors.LocalOutlierFactor.kneighbors https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.LocalOutlierFactor.html#sklearn.neighbors.LocalOutlierFactor.kneighbors_graph
these appear to be inherited from the parent class, and should not be exposed.
Suggest a potential alternative/fix
Rather than using KNeighborsMixin
and NeighborsBase
, the implementation should probably just use an instance of a nearest neighbor search internally, and not expose this as part of the local outlier factor API.
Issue Analytics
- State:
- Created 2 years ago
- Comments:17 (16 by maintainers)
Top Results From Across the Web
Local Outlier Factor only calculated for some points ...
normalising the data will help you in making more visible graphs and as per your code you have taken multipier of radius as...
Read more >Choosing a k-value for Local Outlier Factor (LOF) detection ...
... outlier factor algorithm, "LOF: Identifying Density-Based Local Outliers" (Breunig et al), recommends a method of choosing a k-value.
Read more >Outlier detection with Local Outlier Factor (LOF)
The Local Outlier Factor (LOF) algorithm is an unsupervised anomaly detection method which computes the local density deviation of a given data point...
Read more >Local Outlier Factor | Haroon Rashid Lone - WordPress.com
Local outlier Factor (LoF) is another density based approach to identify outliers in ... The above figure shows two different distributions, ...
Read more >Outlier Detection Method - an overview
Unsupervised methods cannot detect such outliers effectively. ... The local outlier factor[23] is a stabilized variant of the density estimation approach ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hiding them in the documentation is a hack, not a solution: The methods will still show up in tab completion in IDEs, and still pollute the API.
@oswinoswin The most acceptable solution is the one suggested in https://github.com/scikit-learn/scikit-learn/issues/21876#issuecomment-1243375277. I do not think it is a simple task for someone new. I recommend https://github.com/scikit-learn/scikit-learn/issues/24862 as a good first issue.