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

Improve cof memory management #320

Merged

Conversation

RoelBouman
Copy link
Contributor

@RoelBouman RoelBouman commented Jul 16, 2021

This PR adds functionality to COF to allow for the selection of one of two methods:
"fast" which will use the old calculation using the full pairwise distance matrix.
"memory" which will use a new method, which only calculates distances when needed, thus saving on memory at the price of speed.

This PR follows up on issue #315

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.

@coveralls
Copy link

coveralls commented Jul 16, 2021

Pull Request Test Coverage Report for Build 2063

  • 97 of 98 (98.98%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.06%) to 95.834%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pyod/models/cof.py 25 26 96.15%
Totals Coverage Status
Change from base Build 2052: 0.06%
Covered Lines: 5429
Relevant Lines: 5665

💛 - Coveralls

@yzhao062
Copy link
Owner

Hi Roel,

Could you elaborate a bit on the definition of fast and memory option? Since we need to add this to the documentation.
The example looks like:
image

Thanks for contributing!
Cheers,

Roel added 2 commits July 19, 2021 16:40
Added descriptions of the 'method' argument.
@RoelBouman
Copy link
Contributor Author

Thanks for the feedback! I've indeed forgotten to update the documentation properly. The latest commits should solve this.

@yzhao062
Copy link
Owner

Perfect. Quick eyeballing looks good to me and it also satisfies the unit tests. I will merge it for now for some local tests.
I will take care of minor things. If you like, I could add you here (https://pyod.readthedocs.io/en/latest/about.html) who makes a reasonable amount of contribution to PyOD :)

@yzhao062 yzhao062 merged commit f61b9a1 into yzhao062:development Jul 19, 2021
@RoelBouman
Copy link
Contributor Author

Great! I would certainly appreciate being added to the about page. The info for that would be:
Roel Bouman (Ph.D. Student @ Radboud University):

  • Joined in 2021
  • LinkedIn (Roel Bouman) <https://nl.linkedin.com/in/roel-bouman-18b5b9167>_

@yzhao062
Copy link
Owner

Great! Will update the documentation accordingly.

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.

3 participants