Skip to content

Treat datetime formula predictors as continuous#1007

Open
drbenvincent wants to merge 1 commit into
mainfrom
cursor/dbf2f2c8
Open

Treat datetime formula predictors as continuous#1007
drbenvincent wants to merge 1 commit into
mainfrom
cursor/dbf2f2c8

Conversation

@drbenvincent

Copy link
Copy Markdown
Collaborator

Summary

  • Encode bare datetime formula predictors as continuous elapsed days across Patsy-based experiments.
  • Preserve C(date) for explicit categorical date effects and retain datetime-aware step() / ramp() behavior.
  • Add regression coverage for datetime encoding and ITS post-treatment prediction.

Fixes #1002

Testing

  • prek run --all-files
  • make test-patch-cov

Made with Cursor

@github-actions github-actions Bot added the bug Something isn't working label Jul 11, 2026
@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.54%. Comparing base (a84d4d6) to head (8c023a7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1007      +/-   ##
==========================================
+ Coverage   95.51%   95.54%   +0.02%     
==========================================
  Files          98      100       +2     
  Lines       15868    15969     +101     
  Branches      931      934       +3     
==========================================
+ Hits        15157    15258     +101     
  Misses        504      504              
  Partials      207      207              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Encode bare datetime factors as elapsed days while preserving explicit categorical factors and out-of-sample design compatibility.

Co-authored-by: Cursor <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Treat bare datetime predictors as continuous in Patsy formulas

1 participant