Skip to content
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

Cooks distance unsupervised #491

Merged
merged 4 commits into from
Jun 23, 2023

Conversation

KulikDM
Copy link
Contributor

@KulikDM KulikDM commented Mar 25, 2023

All Submissions Basics:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you checked all Issues to tie the PR to a specific one?

All Submissions Cores:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?
  • Does your submission pass tests, including CircleCI, Travis CI, and AppVeyor?
  • Does your submission have appropriate code coverage? The cutoff threshold is 95% by Coversall.

New Model Submissions:

  • Have you created a .py in ~/pyod/models/?
  • Have you created a _example.py in ~/examples/?
  • Have you created a test_.py in ~/pyod/test/?
  • Have you lint your code locally prior to submission?

I originally authored the Cook's distance outlier detection method on PyOD. But upon review, I realized that the method is not consistent with the rest of this library as the method is currently a supervised one. The changes made now have updated this method to be in line with the rest of the library by making it an unsupervised method.

The most significant change is that instead of evaluating the model predictions against the response variable (y) the model now evaluates each variable in X against the rest of the variables in X and then computes the mean Cook's distance for each datapoint.

@coveralls
Copy link

coveralls commented Mar 25, 2023

Pull Request Test Coverage Report for Build 4518347268

  • 35 of 36 (97.22%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 93.602%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pyod/models/cd.py 27 28 96.43%
Totals Coverage Status
Change from base Build 4463703550: 0.05%
Covered Lines: 8705
Relevant Lines: 9300

💛 - Coveralls

@yzhao062 yzhao062 merged commit 4cfa581 into yzhao062:development Jun 23, 2023
@KulikDM KulikDM deleted the Cooks-Distance-Unsupervised branch June 25, 2023 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants