Implemented data preprocessing #17
No reviewers
Labels
No labels
CI/CD
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AndreFerreira5/downtown-cab-co!17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "data_preprocessing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
High-level features of the preprocessing module:
Data cleaning handles missing values, invalid records, and outliers based on domain knowledge from the data dictionary and project requirements.
Feature engineering creates temporal features (hour, day, weekend, rush hour), spatial features (Haversine distance, Manhattan distance, bearing), and contextual features (airport trips, night trips) as recommended in the project specifications.
Reproducibility is achieved through the scikit-learn compatible BaseEstimator and TransformerMixin interface, making it pipeline-friendly and compatible with MLflow tracking.
Flexible configuration allows enabling/disabling outlier removal and feature creation for different stages (EDA vs training).
Target Variable
The module computes trip_duration in seconds from the pickup and dropoff timestamps, which is the prediction target for the MLOps project.
Data Validation
Records are filtered to remove impossible values like negative durations, zero distances, invalid passenger counts (outside 1-9), and coordinates outside valid ranges.