Skip to content

Conversation

@KulikDM
Copy link
Contributor

@KulikDM KulikDM commented Jan 30, 2025

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.

Hi, this commit aligns PyOD with PyThresh V1, making it a standard that aligns better with the Sklearn and PyOD API having fit and predict functions. Documentation has been updated and two new thresholders have been made available.

Note, that the minimum requirement for using PyThresh in PyOD is now V1 but the benefits (able to threshold on test data correctly with respect to train data) outweighs the downsides. Older versions of PyOD will still work with the new PyThresh but not vice versus.

Hope you are happy with this commit and that it makes PyOD even better than it already is!

@coveralls
Copy link

coveralls commented Jan 30, 2025

Pull Request Test Coverage Report for Build 13059640949

Details

  • 11 of 11 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.003%) to 95.364%

Totals Coverage Status
Change from base Build 12743748830: 0.003%
Covered Lines: 10368
Relevant Lines: 10872

💛 - Coveralls

@KulikDM
Copy link
Contributor Author

KulikDM commented Apr 28, 2025

Hi @yzhao062

I just wanted to find out if there has been any progress on this and the other PR that I submitted?

@yzhao062
Copy link
Owner

Of course! I am a bit more cautious for anything in the base.py

    # if this is a PyThresh object
    else:
        prediction = self.contamination.predict(pred_score)
        
       I am wondering if .predict is a new function to replace eval...

@KulikDM
Copy link
Contributor Author

KulikDM commented Apr 29, 2025

Hi @yzhao062

I totally understand the caution, and you are 100% correct. eval has been replaced with fit and predict which is one of the new features in PyThresh V1. It aligns better with the Sklearn and PyOD API. eval didn't really consider the separation between train and test/evaluation datasets, and was a limiting factor. V1 has fixed this and the changes to base.py allow for these new updates.

Note a similar issue was found (issue with fit predict between train and test data) and a PR to address it was submitted in #624

Let me know if you feel there are any changes still necessary or any suggestions.

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