Icon

GoGoX_​Cancellation_​Prediction (FINAL)

Data Ingestion, Understanding and Cleaning

Temporal Feature Engineering

Route and Pricing Feature Engineering

EXPLATORY DATA ANALYSIS

Geographic Feature Engineering

High Risk Order Identification and Prioritisation

Examines data quality through numerical ranges, variability, record counts and missing values.
  • Min/Max: Checked for invalid values, such as negative monetary amounts

  • Standard deviation: Assesses variability in numerical fields

  • Record counts: Verify data completeness

  • Missing values: Identifies fields requiring investigation

Order Price and Commission values were retained despite wide distributions, as charges vary with vehicle and service requirements. 

Missing Driver Tip and Company Bonus values were also retained, as these are optional, event-based amounts.


Derives booking lead time, urgency categories and request/pickup timing features to capture temporal patterns potentially associated with driver-matching outcomes.

Extracts route-related information and derives pricing features to capture delivery requirements and potential factors influencing driver-matching outcomes.

Enriches delivery-location data with external URA defined geographical regions to capture spatial differences in driver-matching conditions and support more comprehensive risk predictions.

DATA TRANSFORMATION

FEATURE ENGINEERING

MACHINE LEARNING: RANDOM FOREST

Historical Gap Contribution Analysis

Orders are grouped by vehicle type and booking lead time to calculate:

  • Unmatched Rate: % of orders within each profile that failed to secure a driver.

  • Gap Contribution: % of all historical unmatched orders attributable to each profile.

Profiles are ranked by Gap Contribution rather than Unmatched Rate alone, as high-volume profiles may account for more matching failures despite having lower failure rates.

The six highest-contributing profiles are selected for prioritisation.

Risk-Based Order Prioritisation

The framework combines two dimensions:

  • Predicted Risk: Random Forest identifies individual orders at risk of failing to secure a driver.

  • Operational Impact: Historical Gap Contribution identifies profiles responsible for substantial matching failures.

Orders meeting both criteria are prioritised and ranked by predicted risk with Priority A being the highest (>20%) and Priority C being the lowest (<5%). This further distinguish the historical impact of their profiles.

Actual matching outcomes are used only to evaluate the effectiveness of the prioritisation strategy.

EDA 1: Distribution of Driver Matching Outcomes

Examines the distribution of the machine-learning target variable (secured_driver) while understanding GoGoX’s historical fulfillment performance.

Unmatched orders account for 35.94%, revealing a substantial fulfilment gap and sufficient examples for model training. The moderate class imbalance supports using stratified sampling to preserve the outcome proportions across training, validation and testing datasets.


EDA 2: Matching Difficulty and Demand by Vehicle Type

Examines whether requested vehicle type is associated with driver-matching outcomes by comparing unmatched rate (severity) and demand share (scale) across vehicle categories.

Lorry24 records the highest unmatched rate (83.85%) but minimal demand (0.53%), while Van dominates demand (59.62%) despite having the lowest unmatched rate (21.76%).

These substantial differences suggest that requested vehicle type is a potentially informative predictor of matching failures. Furthermore, the contrast between severity and scale supports prioritising order profiles by their contribution to the overall fulfilment gap, rather than unmatched rate alone.



EDA 3: Driver Matching Outcome by Booking Lead Time

Examines the relationship between booking lead time and driver-matching outcomes by comparing matched and unmatched rates across lead-time bands.

As booking lead time increases, the unmatched rate consistently decreases, suggesting that advance bookings are associated with fewer matching difficulties.

This supports including booking lead time as a potential predictor in Random Forest, while using lead-time bands to identify historically high-risk order profiles for subsequent prioritisation.

EDA 4: Unmatched Rate by Pickup Day and Period

Examines how pickup day and period jointly relate to driver-matching difficulty, with darker cells indicating higher Unmatched rates.

Overnight pickups consistently record the highest unmatched rates (58.72% to 72.71%). This suggests that matching difficulties vary substantially across pickup periods, with additional differences between days.

These findings support including pickup day and period as potential Random Forest predictors, allowing the model to capture temporal interactions associated with matching risk.

EDA 5: Pickup Zone Demand vs Unmatched Rate

Examines the relationship between pickup-zone demand and unmatched rates to identify geographical variations in driver-matching difficulty.

Only zones with ≥30 orders were included to reduce volatility from very small sample sizes and improve the reliability of comparisons. Unmatched rates vary considerably across zones, with no consistent increase as demand rises. 

This suggests that demand volume alone may not explain geographical matching difficulties, supporting the inclusion of regional features in Random Forest alongside other order characteristics.


EDA 7: Unmatched Rate by Waypoint Count

Examines whether delivery complexity, represented by waypoint count, is associated with driver-matching difficulty.

Unmatched rates fluctuate between 29.89% and 36.18% across waypoint bands, without a consistent trend. This suggests that additional waypoints are not systematically associated with greater matching difficulty.

Given the limited descriptive evidence of a clear relationship, waypoint count was not selected as a Random Forest predictor, allowing the model to focus on other relevant order characteristics.

EDA 6: Dropoff Zone Demand vs Unmatched Rate

Examines the relationship between dropoff-zone demand and unmatched rates to identify geographical differences in driver-matching difficulty.

Unmatched rates vary considerably among lower-demand zones, while higher-demand zones do not consistently experience greater matching difficulties. This suggests that demand volume alone may not explain destination-related fulfilment gaps.

These findings support including dropoff region as a potential Random Forest predictor, allowing the model to examine geographical patterns alongside booking urgency, vehicle requirements and pickup characteristics.


Model Test and Training

Model Development and Data Partitioning

The dataset was divided into 60% training, 20% validation and 20% testing using two Table Partitioners.

  • Training (60%): Trains the Random Forest using 200 Gini-based decision trees to identify matching-risk patterns.

  • Validation (20%): Evaluates predictions and compares classification thresholds to select a suitable balance of Recall and Precision.

  • Testing (20%): Independently evaluates the selected model and threshold on unseen orders.

Stratified sampling preserves the proportion of Matched and Unmatched orders, while fixed random seeds ensure reproducibility.

Classification Threshold Selection

The default threshold achieved low unmatched recall (40.8%) and F1-score (51.8%), indicating that many actual driver-matching failures were not detected.

Hence, alternative thresholds were manually evaluated to balance failure detection (recall) and unnecessary interventions (precision).

Threshold 0.21 was selected, achieving 63.3% recall, 62.1% precision and 62.7% F1-score. This allowed for a better balance failure detection against false alarms for GoGoX.

ROC-AUC was assessed separately to evaluate the model's overall ability to distinguish matched from unmatched orders, independent of the selected classification threshold.

Standardises aggregated counts title for further calculations
Column Renamer
Converted unmatched rates by vehicle type into percentages
Math Formula
Assigns consistent coloursto matching outcome
Color Palette Designer
Assigns distinct colours to vehicle categories
Color Palette Designer
Calculates each vehicle type's share of total demand in percentage
Math Formula
Retains relevant standard orders for lead-time analysis
Rule-based Row Filter
Aggregates matching outcomes by booking lead-time band
GroupBy
Standardises aggregated columns for rate calculations
Column Renamer
Standardised lead-time bands
Rule Engine
Basket Analysis: Selects the top 6 profiles responsible for over 80% of unmatched orders
Row Filter
Ranks profiles by their historical gap contribution
Sorter
Retains orders predicted as Unmatched within the selected profiles
Row Filter
Combines test-order risk scores with high-impact historical profiles
Joiner
Counts prioritised orders that were actually matched/unmatched
GroupBy
Ranks high-risk orders by descending predicted risk score
Sorter
Final evaluation
Table Creator
Creates a ranked list of high-risk orders for GoGoX to prioritise
Column Filter
Retained essential order characteristics, risk scores and final predictions
Column Filter
Classifies scheduled pickups into weekdays and weekends
Rule Engine
Calculates matched rates across lead-time band
Math Formula
Applies rules to organise lead-time categories in ascending order
Rule Engine
Calculates unmatched ratesacross lead-time band
Math Formula
Retains relevant lead-time and matching-rate columns
Column Filter
Arranges lead-time bands from shortest to longest (1 to 6)
Sorter
Assigns consistent colours to matching outcomes
Color Palette Designer
Presents a concise order-level prediction table
Table View
Assigns priority levels based on each profile's historical gap contribution
Rule Engine
Compares matching outcomes across booking lead times
Bar Chart
Displays the final model evaluation results
Table View
AUC = 0.731
ROC Curve
Renamed math formulas for easier visualisation
Column Renamer
Addresses reproducibility while preventing data leakage
Sorter
Sorts order priority fromhighest to lowest
Sorter
Imported original GoGoX dataset into the workflow
Excel Reader
Addresses reproducibility while preventing data leakage
Sorter
Displays raw dataset to inspect structure and verify data types
Table View
Examines data distributions, numerical ranges and missing values for future cleaning
Statistics
Handles missing data according to business context
Missing Value
Examines distribution of order outcomes
Value Counter
Identifies demand across vehicle types
Value Counter
Examines distribution of customer booking platforms
Value Counter
Compares matching difficulty and demand across GoGoX's vehicle types
Bar Chart
Arranges waypoint bands in ascending order
Sorter
Assigns distinct colours to waypoint categories
Color Palette Designer
Compares unmatched rates across waypoint bands
Bar Chart
Standardised name for region-level identification
Column Renamer
Filter pickup zone
Column Filter
Standardised name for region-level identification
Column Renamer
Filter drop off zone
Column Filter
Removed repeated location before geocoding
Duplicate Row Filter
Combined pickup and dropoff into one table
Concatenate
Standardised location names for geocoding compatibility
String Manipulation
Calculates total orders and unmatched counts by vehicle and lead time
GroupBy
Identifies unmatched orders using a binary indicator (1/0)
Rule Engine
Visualises matching difficulty across pickup days and periodsDarker: higher unmatched rates
Heatmap
Calculates historical Unmatched rates for each vehicle-lead time order profile
Math Formula
Standardises profile-level column names
Column Renamer
Enables calculation of each profile's contribution to GoGoX's overall fulfilment gap
Cross Joiner
Visualises the proportion of matched and unmatched orders
Pie Chart
Calculates total historical orders and matching failures
GroupBy
Identifies all payment methods used by customers
Value Counter
Counts the total number of matched and unmatched orders
GroupBy
Applied additional location-name formatting rules
Rule Engine
Calculates each profile's contribution to GoGoX'soverall fulfilment gap
Math Formula
Renames order_id for clearer interpretation
Column Renamer
Converted location information into geographical coordinates
Geocoding
Standardise order and unmatched totals name
Column Renamer
Compares pickup zone demand against matching difficulty
Scatter Plot
Imported external geographical boundary data(URA Subzone Boundary)
GeoFile Reader
Compares dropoff zone demand against matching difficulty
Scatter Plot
Checked for any missing data
Statistics
Checked the distribution of assigned geographical regions
Value Counter
Matches geographical coordinates to their corresponding regions
Spatial Join
Aggregates total and unmatched orders by vehicle type
GroupBy
Retained relevant regional information for integration
Column Filter
Checked for missing geographical information
Row Filter
Added geographical region information to pickup locations
Joiner
Standardised geographical column names
Column Renamer
Excluded active orders
Rule-based Row Filter
Created model target (matched/unmatched)
Rule Engine
Added geographical region information to dropoff locations
Joiner
Classified lead-time into categories (ASAP/Same Day/Advance)
Rule Engine
Named the assigned dropoff region consistently
Column Renamer
Extracted hour the order was requested
Date&Time Part Extractor
Named the assigned pickup region consistently
Column Renamer
Calculated interval between order request and scheduled pickup
Date&Time Difference
Excludes fixed-arrangement orders
Rule-based Row Filter
Booking context: standard order/fixed arrangement
Rule Engine
Extracted hour of scheduled pickup
Date&Time Part Extractor
Extracted day for scheduled pickup
Date&Time Part Extractor
Retains relevant predictors and target variable (secured_driver)
Column Filter
Grouped requested hours into meaningful categories (Morning to Overnight)
Rule Engine
Extracted day order was requested
Date&Time Part Extractor
Extracted pickup zone(first waypoint)
String Manipulation
Extracted drop off zone(last waypoint)
String Manipulation
Grouped pickup hours into meaningful categories (Morning to Overnight)
Rule Engine
Removes unnecessary or unsuitable fields before machine learning
Column Filter
Checked for numerical distributions and missing values after feature engineering
Statistics
Derives the number of waypoints associated with each order
String Manipulation
80:20 splitCreates development and test sets
Table Partitioner
Calculates the base order price (no bonus or tip)
Math Formula
Binary classification of unmatched (1) and matched (0) orders
Rule Engine
Training (60%)Trains 200 decision trees using Gini criterion to predict driver-matching outcomes
Random Forest Learner
75:25 splitDivides development data into training and validation sets
Table Partitioner
Lead-time node formachine-learning
Rule Engine
AUC = 0.741Evaluates the model's ability to distinguish matching outcomes
ROC Curve
Removed fixed arrangement orders
Rule-based Row Filter
Validation (20%)Generates matching predictions and risk scores for validation orders
Random Forest Predictor
Prepares pickup-time categories for heatmap presentation (1 to 7)
Rule Engine
Organises pickup-time categories for consistent display(1 to 4)
Rule Engine
Calculates unmatched rates for pickup day period combinations
Math Formula
Standardises aggregated counts for rate calculations
Column Renamer
Measures validation performance using the model's default predictions
Scorer
Calculates unmatched rate for each pickup zone
Math Formula
Arranges pickup days and periods in chronological order
Sorter
Determine 0.21 is the best-fit threshold for a balance of accuracy and precision
Scorer
Aggregates total and unmatched orders by pickup zone
GroupBy
Trial and error for best-fit risk threshold (0.21)
Rule Engine
Testing (20%)Generates matching-risk predictions for unseen test orders.
Random Forest Predictor
AUC = 0.741
ROC Curve
Assigns unique row identifiers for zone-level observations
RowID
Applies the validation-selected 0.21 threshold to unseen test orders
Rule Engine
Retains zones with≥30 orders
Rule-based Row Filter
AUC = 0.731Evaluates predictive discrimination on the test dataset
ROC Curve
Measured final test Recall, Precision and F1
Scorer
Retains zones with≥30 orders
Rule-based Row Filter
Calculates the unmatched rate for each dropoff zone
Math Formula
Assigns unique identifiers to zone-level observations
RowID
Aggregates total and unmatched orders by dropoff zone
GroupBy
Standardises aggregated counts for rate calculations
Column Renamer
Standardises aggregated counts for rate calculations
Column Renamer
Standardised column names for consistent processing
Column Renamer
Calculates the Unmatched rate for each waypoint band
Math Formula
Categorises orders based on their number of waypoints
Rule Engine
Aggregates total and unmatched orders by waypoint band
GroupBy
Removed duplicated order records
Duplicate Row Filter
Specific order match status
Rule Engine
Assigns ordering values to waypoint categories (1 to 4)
Rule Engine
Verified exclusion
Value Counter
Converted identifiers from number to text
Number to String
Standardised timestamps into usable formats
String to Date&Time

Nodes

Extensions

Links