Skip to content

Feat/improvements#9

Merged
dawidlinek merged 7 commits into
mainfrom
feat/improvements
Jan 2, 2026
Merged

Feat/improvements#9
dawidlinek merged 7 commits into
mainfrom
feat/improvements

Conversation

@dawidlinek

Copy link
Copy Markdown
Owner

@copilot write summary and review

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the StandardScaler and BaseModel classes to work with NumPy arrays instead of Pandas DataFrames, improving performance and simplifying the API. The changes also standardize the column naming convention for one-hot encoded calendar features.

  • Migrated StandardScaler from DataFrame-based to NumPy array-based implementation
  • Optimized BaseModel data slicing by pre-grouping data by hour and using boolean masks
  • Updated calendar feature column naming from specific prefixes (weekday_, hour_, month_) to a unified "is_" prefix
  • Added error handling for concurrent task execution

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
epftoolbox2/scalers/standard.py Refactored to use NumPy arrays instead of DataFrames, added static method for scalable column detection
epftoolbox2/models/base.py Optimized data slicing with pre-computed hour groups, added error handling for concurrent tasks, converted to NumPy arrays
epftoolbox2/models/ols.py Set fit_intercept=False for LinearRegression (appropriate for standardized data)
epftoolbox2/data/sources/calendar.py Changed one-hot encoding prefix from feature-specific (weekday_, hour_, month_) to unified "is_" prefix
tests/scalers/test_standard.py Updated tests to work with NumPy arrays instead of DataFrames
tests/data/sources/test_calendar.py Updated column detection logic to match new "is_" prefix naming convention
.gitignore Broadened patterns from specific files to more general patterns (main[1-9]*.py, *.jsonl)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread epftoolbox2/models/base.py
Comment thread epftoolbox2/models/base.py Outdated
Comment thread tests/data/sources/test_calendar.py
Comment thread epftoolbox2/scalers/standard.py
Comment thread tests/scalers/test_standard.py
Comment thread tests/data/sources/test_calendar.py
Comment thread tests/data/sources/test_calendar.py
Comment thread epftoolbox2/models/base.py
Comment thread epftoolbox2/models/base.py
@dawidlinek
dawidlinek merged commit f36eb44 into main Jan 2, 2026
5 checks passed
@dawidlinek
dawidlinek deleted the feat/improvements branch January 2, 2026 15:45
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.

2 participants