Translate this page into:
Optimisation and cross-validation of an e-hailing hybrid pricing algorithm using a supervised learning classification and regression tree model: a heuristic approach
⁎Corresponding author. naeemsp@gmail.com (Mohammed Naeem Qureshi),
-
Received: ,
Accepted: ,
This article was originally published by Elsevier and was migrated to Scientific Scholar after the change of Publisher.
Abstract
Ride-hailing application price decisions are frequently considered biased and therefore are receiving more attention. Electronic (e)-hailing providers use the machine learning reinforcement model (RL) to build their dynamic pricing (DP) strategy to charge consumers. Nevertheless, the associated pricing issues in e-hailing potentially jeopardise this flourishing industry with a more significant long-term effect if left unresolved. Upon increased demand, the DP strategies assist the e-hailing systems with price surging, the unreasonable surging of price is unexpected by e-hailing users and deters them from using e-hailing services. A drawback of the existing RL DP algorithm is that does not consider surrounding factors before surging the price. Hence, this study aimed to address the underlying pricing issues through a hybrid pricing model using classification and regression tree (CART) supervised learning. A hybrid pricing algorithm was developed to demonstrate the enhanced model has edge over the existing model. The current e-hailing RL based algorithm was compared against the SL’s CART enhanced pricing algorithm with cross-validation using centrality analysis results. The test results shows that the hybrid pricing algorithm could address DP pricing issues by optimising e-hailing prices to provide its consumers with impartial pricing and remuneration. The proposed model can be a good theoretical reference for further studies which can also be applied to other industries such as Airlines, Tourism where DP is in used.
Keywords
Machine Learning
Supervised Learning
Reinforcement Learning
CART Algorithm
Dynamic Pricing Algorithm
Optimised Pricing Algorithm
1 Introduction
Rapid global development has resulted in technology and modernisation serving all major sectors to accommodate the highly demanding pace and are essential in this cyclical progression. Machine learning (ML) and its models are key drivers of technological advances. Based on the strategy and learning methods, the three ML model types used for business needs are supervised learning (SL), unsupervised learning (USL), and reinforcement learning (RL). Data scientists use methodologies determined by the knowledge type they seek to predict and act on. The programme inputs and outputs are clearly stated in terms of the business requirement results and outcomes. Considering its unique problem-solving nature, ML is widely used by real-world applications for various purposes, which include building pricing strategies (Harrou et al., 2022).
Electronic (e)-hailing services that allow customers to hail vehicles using their smartphones have become prevalent following smartphone technology advancement. In a well-regulated car market, drivers’ and passengers’ prospective acceptance of newly emerging e-hailing applications are incorporated into a spatial model. The model enables systematic assessment of the influence of widespread e-hailing application adoption on the transport industry. Globally, e-hailing service providers widely use the ML reinforcement model to build a dynamic pricing (DP) strategy (Kastius & Schlosser, 2021). Notably, the model is the most popular and extensively used model for transportation, aviation, tourism, and e-commerce industry pricing strategies (Suhud et al., 2019).
2 Materials and methods
2.1 The supervised learning
The supervised learning (SL) relies on supervision and is used to train machines using a labelled dataset, while the algorithm predicts the outcome based on the training. Thus, the machine is first trained with input and output before the outcomes are determined with the training datasets. The two types of SL are classification and regression. Classification is performed on patterns in the sample data, followed by constant calculations to predict the result. Classification aids price forecasting, such as in stock trading. Inversely, regression identifies, understands, and groups objects into pre-set classes. Spam or non-spam e-mail filtering is the ideal example. Despite the variety of SL, the three most frequently used supervised algorithms are the decision tree (DT, classification, and regression tree [CART]), naïve Bayes, and support vector machine (SVM). Specifically, DT SL is used in associated issue or problem classification and regression and is also a classification-related resolution technique. The DT is also known as a predictive model that involves decision and leaf nodes. The decision node addresses various sub-branches while the leaf node is a decision output (Johnson, 2022). The predictive method is fast or accurate and easy to build to yield better results. Thus, the method can be used to create well-defined conditions to build pricing strategies and other critical solutions.
2.2 The unsupervised learning
In unsupervised (USL), a computer is provided with an unlabelled dataset and predicts results without supervision (human intervention) (Hastie et al., 2009). The USL aims to categorise or group unsorted data according to similarities, patterns, and differences.
2.3 The reinforcement learning
The RL depends on interactions with the environment to achieve a specific objective. The RL-based agent learns from its circumstances in an iterative procedure (Horie et al., 2019). The agent obtains data from its environment until all probabilities have been examined and the agent has reached the goal state. An agent learns its behaviour via a reinforcement signal, which is a simple form of incentive feedback. Table 1 summarises the different ML models, their definitions, key information, and common usage (Ahmed et al., 2010).
Criteria
SL
USL
RL
Definition
Trains on labelled data
Trains on unlabelled data
The BOT is trained by interacting with the environment
Data type
Labelled
Unlabelled
NA
Problem type
Classification or regression
Clustering or association
Exploration
Supervision
Required
Not required
NA
Common algorithms
Bayes, CART, K-nearest neighbour (KNN) linear, logistic, naïve, SVM
Apriori, efficient data aggregation (EDAT), hierarchical model K-means
Monte Carlo, Q-learning
Aims
Predicts or calculates for accurate results
Discovers patterns to build results
Trial and error to learn and perform actions
Best usage
Weather forecasting, spam detection, calculation, data categorisation
Anomaly detection (credit card-related fraud)
Gaming, mining, and robotics tasks
2.4 Current price algorithm issues
According to Branda et al. (2020), the transportation, aviation, tourism, and e-commerce industries widely use DP policies. The pricing model (algorithm) facilitates revenue folding by allowing the same product or service to be sold at a higher price when the demand increases (Aubrey, 2022). Companies adopted DP to gain profits, such as by increasing hand sanitiser prices by 100 % to 200 % during the pandemic due to high demand.
Fig. 1 depicts surge pricing during peak hours when the booking rate is higher. The figure illustrates the method through which the DP model applies to Malaysian e-hailing products and creates unfair or discriminatory pricing, which eventually affects riders and drivers. The chronological perception of the world by the RL programme results in it not considering surrounding factors, which leads to less accurate results. For example, when demand is lower at night, drivers who provide services during these odd hours are not remunerated fairly by the algorithm. Nevertheless, this case does not apply to the traditional taxi system, where drivers gain additional night allowances in accordance with local transportation rules (SPAD, 2017). Similarly, the RL algorithm does not address other factors, such as traffic and trip duration during peak hours. Surge pricing occurs regardless of whether trip duration is standard or long. The pricing model also fails to adjust pricing based on business performance, which does not benefit any party. For example, drivers do not secure jobs, service providers do not gain commissions, and riders searching for alternate transportation options are dissatisfied (Santos et al., 2020).Current e-hailing model using RL.
2.5 Limitations
E-hailing incorporates a mutual agreement between users and service providers for travel bookings with a digital application. E-hailing considered the smoothest and easiest transportation option for users due to the associated benefits and comfort regarding vehicle booking (Jais & Marzuki, 2020). Nonetheless, pricing is the most crucial factor for all businesses, which users consider before using any service. The current e-hailing providers use RL to build DP strategies to charge their consumers (riders and drivers). Nevertheless, limitations on the current pricing model have led to customers feeling that the offered pricing is biased and manipulated. In Malaysia, the Minister of Transport Management referred to the current pricing strategy as a tactic to gain more profit (Palansamy, 2019). This statement was followed by the instruction to the top management of e-hailing service providers to clarify the factors for the unreasonable price hikes (Malaymail, 2022).
Currently, e-hailing service quality is compared to that of taxi services (which predate e-hailing), where the price is excessively high and unjustified, specifically during peak hours (Pan et al., 2020). The Common Taxi Across Malaysia (GTSM) President stated that e-hailing providers increased trip prices in Kuala Lumpur by over 40 % during peak hours. Both e-hailing riders and drivers reported issues that could further deter the transportation industry (e-hailing) growth.
The e-hailing DP strategy uses RL. The RL perceives the world as chronological, while previous data support allows the BOT to greatly increase trip prices (‘price surge’) based on a high number of requests without considering other vital factors, such as traffic conditions, trip duration, and the time of day (Vanoutrive & Zijlstra, 2018). This condition leads to unfair pricing for both drivers and riders. For example, the Malaysian land public transport agency (APAD, which was previously known as SPAD) defined a 30 %-night surge as fair pay for drivers who work at night and odd hours. Nonetheless, the RL pricing model increases the price only when demand is higher, yet demand is lower at night (SPAD, 2017). Similarly, the term ‘peak hours’ refers to when the reinforcement pricing model (algorithm) surge price creates an unfair situation for riders. Specifically, the system records a high number of demands although it does not ensure whether the trip duration remains the same due to traffic or other climatic conditions. This situation affects both riders and drivers, as riders do not make bookings when the trip price is high and drivers do not conduct business during price surges. Simultaneously, the e-hailing company also loses minimum business. Overall, RL limitations contribute to these issues as it does not consider the surrounding factors.
2.6 Statistical analysis
To build a hybrid pricing algorithm for e-hailing using the ML CART model. The researcher first performed detailed survey to which more than 500 responses received. The survey result shows 55 % Malaysians prefer e-hailing over public and private transport and most used e-hailing riders across Malaysia. Around 57 % reported unhappiness over price offerings. In next step the historical dataset of e-hailing ride was collected for three hundred trips. The collected data set which contains information rides such as popular destinations, time of the day, average trip fares (Ringgitplus., 2023). Post collection of the dataset the research involves following steps to build a hybrid pricing algorithm (Tzenios, N. 2023).
-
Collect a dataset of historical e-hailing rides.
-
Prepare the data for training.
-
Split the data into training and test sets.
-
Train the CART model.
-
Evaluate the performance of the model on the test set.
-
Deploy the model into prototype and conclude.
3 Proposed work
Cost is a vital element for every industry in the open market. Effective pricing schemes can enhance the overall income of service providers and the associated consumers. Regardless, the existing pricing algorithm e-hailing providers use does not present favourable conditions to its consumers. Therefore, an enhanced hybrid pricing algorithm is proposed in this study to address pricing issues. The suggested hybrid pricing model features newly incorporated logic, which would aid the resolution of current issues. Simultaneously, the recommended modifications would not negatively affect business performance during price optimisation. Fig. 2 depicts the new modifications and distinction between the old and new pricing algorithms. Contrary to the current pricing algorithm, the proposed pricing model uses SL CART (DT) and various parameters to match the results with a predictive model.Hybrid pricing algorithm using an SL CART model.
The novel hybrid pricing model (algorithm) includes a DT with well-defined conditions that will operate until a completely accurate result is achieved. First, the model addresses unfair pricing issues for drivers who work at night by applying a mandatory night surge regardless of higher or lower demand. This action could be executed with the aid of time-based conditions incorporated into the tree diagram. The time-based condition defined in Fig. 2 can aid the algorithm in adding a night surge, which would result in fair remuneration to drivers as reinforcement and not implement a price surge when demand is lower. Furthermore, the hybrid pricing model will examine surrounding factors, such as traffic condition and trip duration before surging the price during peak hours when the demand is higher. For example, the system will measure the overall trip duration if travelling from destination A to destination B spans 30 min during peak or non-peak hours. Furthermore, the system will not lead to a price surge if the overall trip duration remains the same with no additional traffic wait time; rather, the price surge will only be applied if the smart surge condition detects traffic (see Fig. 2).
The hybrid pricing algorithm will also optimise trip prices based on business performance. For example, the hybrid pricing algorithm will offer a discount to retain the customer if the system detects a lower number of actual bookings than booking enquiries, where customers only check trip prices. This distinctive condition will aid avoidance of the loss of business opportunities for drivers, commissions to service providers, and increased customer satisfaction.
4 Methodology
In this study, the issues faced by the e-hailing industry and drivers, or riders and their practical importance were identified. A solution was subsequently designed, with the outcome and its theoretical contribution duly validated. The methodology presented in this article combines a constructive research approach (CRA) and agile methodology, which were selected due to the nature of the study. Agile methodology was selected given that the proof of concept (POC) required software development and agile methodology is effective for S/W and project management (Larson & Chang, 2016). The prototype enhanced pricing model for testing was built with agile methodology whereas the overall research methodology used the CRA. The high-level phases to build a CRA while establishing a solution are described as follows and depicted in Fig. 3 (Pande & Bharathi, 2020):
-
Determine practical relevance of problem statements, which includes the study scope.
-
Gain comprehensive topical understanding.
-
Design a new construct.
-
Validate and prove the solution effectiveness.
-
Demonstrate theoretical and research contributions.
-
Scope for further studies and recommendations.

- The CRA framework.
5 Testing and experimental results
The efficiency of the proposed enhanced hybrid pricing algorithm was tested against that of the existing reinforcement pricing algorithm on which e-hailing providers rely. The test results were expected to be able to distinguish major differences between the RL algorithm and the proposed enhanced pricing algorithm, which used the SL CART model. The pricing algorithm was evaluated during peak and non-peak hours at night and in the early morning, afternoon, and evening.
The enhance algorithm aided the valuation of the proficiencies of all defined logics that could potentially address DP issues. The result of the proposed algorithm and every defined condition within the algorithm was monitored with a simulation. The existing and proposed algorithms were compared by randomly selecting the pick-up locations (origins) and destinations in the available service provider and prototype products to examine the price changes under specific situations. These changes were defined using a DT (CART model). All ride-booking tests using the POC were tested with Equation (1) in three scenarios (time-, traffic-, and customer behaviour-based price surges) (Wang & Lownes, 2019).
Cap = Number of vehicles per hour capacity;
Base Cap = Standard capacity for passenger vehicles per hour;
N = Number of requests;
fhv = Adjustment factor for vehicle types (economy, comfort, or premium);
OHS = Odd hours surge (night surge);
fp = Adjustment factor for traffic time (if any traffic at night as defined in Scenario 2);
fg = Price optimisation (as defined in Scenario 3).
5.1 Scenario 1: Time-based price surge
In Scenario 1, all requests were tested between 00:00 midnight and 6:59 a.m. The night charges were included in the algorithm to test the time-based price surge condition. Fig. 4 depicts the time-based price adjustment. In Scenario 1, a total of 12 requests were made for four origins and destinations (see Table 2). In all the requests, the price offered by the pricing algorithm was higher by 30 %, which was defined in the decision to address unfair wages to drivers who work during odd hours.The DT for night surge in Scenario 1.
Trip prices by POC and other providers
Origin
Destination
Booking time
POC
Provider A
Provider B
Third Avenue
UNIMY CBJ
12.15 a.m.
RM 7.03
RM 6.00
RM 6.00
Shaftsbury CB
Putrajaya Sent
12.45 a.m.
RM 9.92
RM 8.00
RM 8.00
Mirage by the Lake
Putra Mosque
01.20 a.m.
RM 14.44
RM 12.00
RM 11.00
3A CBJ
D’pulze CBJ
03.37 a.m.
RM 6.50
RM 5.00
RM 5.00
In Scenario 1, the test results indicated that RL failed to offer fair pricing to drivers when demand was low. This situation could further jeopardise driver availability and quality services following the current low remuneration offered to Malaysian e-hailing providers who work at night.
5.2 Scenario 2: Surge based on traffic conditions
In Scenario 2, testing was performed from 07:00 a.m. to 11:59p.m. to test the proposed algorithm during peak hours, where Malaysian e-hailing providers currently surge ride prices using RL DP. In this scenario, origins and destinations were selected randomly but included popular and frequently visited locations where the Malaysian urban population resided. The pricing was tested in real-time with a total of 10 origins and destinations and 30 trips from two different providers, which included the proposed prototype algorithm. Fig. 5 depicts the occurrence of the smart price surge based on traffic conditions.The DT for high and low demand surges.
Table 3 demonstrates that both providers A and B surged trip prices by 25 % to 50 % during peak hours. Contrastingly, the prices offered by the POC remained significantly lower compared to those of providers A and B. The POC trip price only increased during high-traffic conditions as compared to high-demand conditions.
Origin
Destination
Booking time
POC
Provider A
Provider B
3A Cyberjaya
Alamanda Mall
09:00 a.m.
RM 13.23
RM 21.00
RM 19.00
3A Cyberjaya
IOI Putrajaya
09:30 a.m.
RM 15.25
RM 17.00
RM 20.00
D’pulze Cyberjaya
Suria KLCC
09:15 a.m.
RM 35.25
RM 41.00
RM 45.00
Shaftsbury CBJ
P. Bukit Bintang
08:55 a.m.
RM 34.68
RM 41.00
RM 47.00
Jakel Mall Kuala Lumpur
PJ Hilton
11:45 a.m.
RM 13.70
RM 30.00
RM 22.00
Kuala Lumpur Bird Park
Hotel Sri Petaling
12:30 p.m.
RM 16.94
RM 31.00
RM 24.00
1 Utama
Traders Hotel KL
05:30 p.m.
RM 20.71
RM 25.00
RM 29.00
CBJ Lake Front
Genting Highlands
06:03 p.m.
RM 84.10
RM 160.00
RM 148.00
The Westin Kuala Lumpur
Bukit Jalil LRT
07:00 p.m.
RM 14.76
RM 21.00
RM 23.00
TREC Kuala Lumpur
Shaftsbury PJ
08:10 p.m.
RM 30.21
RM 42.00
RM 41.00
In Scenario 2, RL based algorithms failed to offer fair pricing to riders by selling similar services at a higher price upon increased demand. This classic example represents the traditional taxi system issues when drivers and riders negotiate trip prices. E-hailing services emerged promising to address security, pricing, and flexible payments (Grab, 2022).
5.3 Scenario 3: Price optimisation based on real-time customer behaviour
In Scenario 3, a unique condition was included in the hybrid pricing algorithm logic to optimise the trip price (see Fig. 6). For example, a demand higher than the RL model during Christmas or New Year would lead to surge pricing based on the number of requests. Nonetheless, the RL system does not consider whether users were making actual bookings or merely screening the trip price. Similar to Scenario 2, the algorithm progressed towards surge price in this condition without considering the fact that users reviewed trip prices frequently for a lower price before agreeing to accept the price to start their ride.Situation-based trip price optimisation.
In Scenario 3 (see Table 4), testing was performed by making bookings to four origins and destinations. Analysis of the test cases determined that the proposed algorithm reduced trip prices when customers were screening prices instead of making actual bookings. Nevertheless, provider A and B prices remained unchanged during peak or high-demand hours. This condition indicated that providers did not have a mechanism to identify whether the customer was making bookings or merely screening trip prices.
Price optimisation during peak hours based on successful vs. failed trip count
Origin
Destination
Booking time
Price
Non-peak
Peak
Optimised
Symphony CBJ
Mitsui Outlet
9:30 a.m.
RM 26.24
RM 31.49
RM 28.34
Suasana Sentral
Petronas Towers
8:50 a.m.
RM 10.41
RM 12.49
RM 11.24
Masjid Negara
3A Cyberjaya
9:15 a.m.
RM 32.24
RM 38.69
RM 60.00
Mutiara CBJ
Mid Valley
7:00 p.m.
RM 33.04
RM 40.22
RM 36.20
Cyber Lake Front
Genting H
7:20 p.m.
RM 84.10
RM 101.82
RM 91.64
Service providers A and B could not offer lower rates; instead, the system considered that demand was high based on users’ price screening, where users frequently reviewed origins and destinations. This condition increased the trip price, which is one of the main drawbacks of RL due to its perception of the world as sequential. Thus, the trend would remain due to the inability to offer optimised pricing.
6 Conclusion
This study presented a comprehensive summary of ML and its models. Malaysian e-hailing industry providers build their DP strategy using the RL model. Nonetheless, the resultant price surging or DP leads to biased or discriminatory pricing for e-hailing consumers. This study proposed an SL CART hybrid pricing algorithm to address e-hailing price difficulties. The CART model was the most appropriate model to address pricing issues, as the data input for each condition was known and structured. Thus, training could occur through SL, which has the advantages of yielding accurate results, easy development, and low maintenance.
The overall result demonstrated that the enhanced hybrid pricing algorithm could address DP issues in three scenarios (time-, traffic-, and customer behaviour-based). Although the study was limited to e-hailing pricing issues, DP also applies to other industries, such as tourism and aviation. Accordingly, the solution proposed in this article (enhanced hybrid pricing model using constructive research methodology) could serve as a good reference for theoretical knowledge and enterprises that aim to improve their pricing models. As the e-hailing industry is expected to achieve greater success in the next few years, improving customer satisfaction and generating more demand are crucial to offering fairly priced services.
Declaration of competing interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
REFERENCES
- An empirical comparison of machine learning models for time series forecasting. Econ. Rev.. 2010;29(5–6):594-621.
- [Google Scholar]
- Aubrey A (2022) Peak hours fare hike: No e-hailing, where is the metered taxi? Carlist. https://www.carlist.my/news/peak-hours-fare-hike-no-e-hailing-where-is-the-metered-taxi-89791/89791/.
- Ticket sales prediction and dynamic pricing strategies in public transport. Big Data and Cognitive Computing. 2020;4(4):36-48.
- [Google Scholar]
- Land Public Transport Commission (Suruhanjaya Pengangkutan Awam Darat [SPAD]). (2017) Useful tips on using Malaysian taxi services. Klia2.Info. Available at: https://www.klia2.info/taxis/useful-tips-on-using-malaysian-taxi-services/.
- Grab (2022) JustGrab trip fare. Available at: https://www.grab.com/my/driver/transport/justgrab/.
- Effective forecasting of key features in hospital emergency department: Hybrid deep learning-driven methods. Mach. Learn. Appl.. 2022;7:100200
- [CrossRef] [Google Scholar]
- Unsupervised learning. In: The Elements of Statistical Learning. New York, NY: Springer; 2009. p. :485-585.
- [Google Scholar]
- Multi-objective safe reinforcement learning: The relationship between multi-objective reinforcement learning and safe reinforcement learning. Artif. Life Robot.. 2019;24(3):352-359.
- [CrossRef] [Google Scholar]
- E-hailing services in Malaysia: Current practices and future outlook. J. Malays. Inst. Planners. 2020;18(3):128-141.
- [Google Scholar]
- Johnson D (2022) Supervised machine learning: What is, algorithms with examples. Available at: https://www.guru99.com/supervised-machine-learning.html.
- Dynamic pricing under competition using reinforcement learning. J. Rev. Pricing Managem.. 2021;21(1):50-63.
- [CrossRef] [Google Scholar]
- A review and future direction of agile, business intelligence, analytics and data science. Int. J. Inf. Manag.. 2016;36(5):700-710.
- [Google Scholar]
- Malaymail (2022). Transport minister: E-hailing service providers to explain alleged fare hikes. Available at: https://www.malaymail.com/news/malaysia/2022/05/22/transport-minister-e-hailing-service-providers-to-explain-alleged-fare-hikes/8236.
- Palansamy, Y (2019) No ride, price surge? Mere tactics by e-hailing companies against Putrajaya, says minister. Malaymail. Available at: https://www.malaymail.com/news/malaysia/2019/07/12/no-ride-price-surge-mere-tactics-by-e-hailing-companies-against-putrajaya-m/1770892.
- Exploring the equity of traditional and ride-hailing taxi services during peak hours. Transport. Res. Record J. Transport. Res. Board. 2020;2674(9):266-278.
- [CrossRef] [Google Scholar]
- Theoretical foundations of design thinking–A constructivism learning approach to design thinking. Think. Skills Creat.. 2020;36:100637
- [Google Scholar]
- Ringgitplus (2023). Grab Implements New E-Hailing Fares, Rides May Cost Slightly More During Peak Hours. Ringgitplus. https://ringgitplus.com/en/blog/apps/grab-implements-new-e-hailing-fares-rides-may-cost-more-during-peak-hours.html.
- Dynamic pricing and price fairness perceptions: A study of the use of the Uber app in travels (Precificação Dinâmica E Percepção De Justiça Em Preços : Um Estudo Sobre O Uso Do Aplicativo Uber Em Viagens Precios Dinámicos Y Percepción De Justicia En Preci) Turismo: Visão e Ação. 2020;21:239-264.
- [Google Scholar]
- Applying the theory of acceptance model to consumer acceptance of taxi-hailing mobile app. J. Internet e-Business Stud.. 2019;1(10)
- [CrossRef] [Google Scholar]
- Tzenios, N. (2023). Statistical Analysis in Research.
- Who has the right to travel during peak hours? On congestion pricing and ‘desirable’ travelers. Transp. Policy. 2018;63:98-107.
- [CrossRef] [Google Scholar]
- All-links-based e-hailing pricing and surcharge mechanism for transportation system performance improvement. Transp. Res. Rec.. 2019;2673(12):103-114.
- [Google Scholar]