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

Feature/week3 #3

Merged
merged 11 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
default_stages:
- pre-commit

exclude: ^tests/resources/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ week 2
- In example code, the features generated at runtime were not used in the fe model
> **Workaround**
- Ran the feature engineering notebook from Databricks workspace, this resolved permissions issues
- Feature Engineering package limitations [documentation](https://docs.databricks.com/en/machine-learning/feature-store/python-api.html#limitations)
- Ran the feature engineering feature function on the training and testing set and included the new features in the fe model
- ```python
testing_set = fe.create_training_set(
Expand Down
7 changes: 7 additions & 0 deletions configs/project_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ hyperparameters:
n_estimators: 1000
max_depth: 6

ab_test_hyperparameters:
learning_rate_a: 0.02
learning_rate_b: 0.02
n_estimators: 1000
max_depth_a: 6
max_depth_b: 10

processed_features:
num_features:
- Temperature
Expand Down
49 changes: 0 additions & 49 deletions main.py

This file was deleted.

Binary file modified notebooks/power_consumption-0.0.1-py3-none-any.whl
Binary file not shown.
7 changes: 7 additions & 0 deletions notebooks/week2/01_prepare_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@
# COMMAND ----------
train_set.reset_index(inplace=True)
test_set.reset_index(inplace=True)
# Convert DateTime to Unix timestamp (milliseconds) and create ID column
train_set['id'] = train_set['DateTime'].astype('int64') // 10**9
test_set['id'] = test_set['DateTime'].astype('int64') // 10**9

# Convert to string
train_set['id'] = train_set['id'].astype(str)
test_set['id'] = test_set['id'].astype(str)
# COMMAND ----------
data_processor.save_to_catalog(train_set=train_set, test_set=test_set, spark=spark)
# COMMAND ----------
Loading