• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

yzhao062 / pyod / 23972073553 / 5
93%
master: 93%

Build:
Build:
LAST BUILD BRANCH: development
DEFAULT BRANCH: master
Ran 04 Apr 2026 05:44AM UTC
Files 116
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 Apr 2026 05:15AM UTC coverage: 93.926% (+0.02%) from 93.904%
23972073553.5

push

github

yzhao062
Fix CD detector train-test split: reuse fitted models at prediction time (#624)

decision_function() previously re-fitted the regression model on test
data instead of using models trained during fit(). This patch stores
per-feature fitted models and reuses them at prediction time.

Additional fixes:
- Fix broken NaN check: (mse != 0) or (mse != np.nan) was always True;
  replaced with (mse != 0) and not np.isnan(mse)
- Use sklearn.base.clone instead of deepcopy for model copying
- Fix mutable default argument model=LinearRegression() in __init__
- Add check_is_fitted guard for _models attribute
- Update docstrings to reflect sklearn clone contract

Tests added:
- Sentinel-based test proving decision_function does not refit
- sklearn.base.clone compatibility test with non-picklable estimator

Based on the idea from PR #624 by Daniel Kulik (@KulikDM), with
corrections applied during code review.

10779 of 11476 relevant lines covered (93.93%)

0.94 hits per line

Source Files on job 23972073553.5
  • Tree
  • List 116
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 23972073553
  • 27d69cb8 on github
  • Prev Job for on development (#23970986130.1)
  • Next Job for on development (#23973126519.3)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc