Interview Prep
Interview questions, roadmaps and practice sets
Tutorials
Free tutorials on 30+ topics
Blog
Career guides, skills and interview tips
Free PDFs
Notes, cheat sheets and question banks
Certificates
Free skill tests and course certificates
Tools & Whiteboard
Free tools you can use right in the browser
Practice Tests
Mock tests, MCQs and quick Q&A
Free LMS
Learn on the Uncodemy LMS
Choose the best training program according to your career.
Improve the performance of your business with our innovative Industrial Training Program.
Read More →
Our instructor-led training classes are designed to make you an expert.
Read More →
Real-life case studies are a great way to demonstrate your practical knowledge.
Read More →
Explore blogs, latest technologies and industry updates with practical examples.
Read More →Browse all available training programs and choose the right one for your career.
Read More →Know more about who we are and what we stand for.
Discover our mission to equip individuals with essential IT skills and industry expertise.
Read More →
Free tutorials, interview questions, tools and calculators to help you learn.
Explore →Learn, practice and plan your career — bilkul free.
Book a free video counselling session and pick the right course for you.
Read More →Open a shopping app in Pune and search for "running shoes". The order of results, the "you may also like" row, the delivery date and even the discount you see are each the output of a model trained on past shoppers' behaviour. That is data science in e-commerce: recommendations, search ranking, segmentation, demand forecasting, pricing, fraud and return-risk checks, delivery estimates and A/B tests.
Almost every model below is built from four kinds of records:
Data engineers move these into a warehouse; data scientists and analysts build features (for example "number of views of this product in the last 7 days") and train models on them.
"Customers who bought this also bought" and "Recommended for you" rows are the best-known use. Three families of methods are common:
Recommendations are judged by offline metrics such as precision@k, then by an A/B test on the live site measuring clicks, add-to-carts and revenue per visitor. For a deeper look at the methods, see what recommender systems are and how they work, or build one yourself with this collaborative filtering project.
When a shopper types "running shoes men", the site first retrieves hundreds of matching products, then a ranking model orders them. Features include text match, past click-through rate for that query, price, ratings, stock and delivery speed to the user's pin code. This is called learning to rank. Search also needs spelling correction and synonyms ("tee" = "t-shirt"), and in India it has to handle Hinglish and transliterated queries.
Marketing teams group customers so that each group gets a different message. A simple, widely used method is RFM: Recency (days since last order), Frequency (number of orders) and Monetary value (total spend). Here is a small worked example in plain Python:
from datetime import date
orders = [
("A", date(2026, 10, 1), 1200), ("A", date(2026, 10, 20), 800),
("B", date(2026, 6, 15), 300),
("C", date(2026, 10, 25), 2500), ("C", date(2026, 9, 10), 1500), ("C", date(2026, 8, 5), 1000),
("D", date(2026, 9, 30), 450), ("D", date(2026, 10, 28), 650),
]
today = date(2026, 11, 1)
rfm = {}
for cust, day, amount in orders:
r = rfm.setdefault(cust, {"last": day, "orders": 0, "spend": 0})
r["last"] = max(r["last"], day)
r["orders"] += 1
r["spend"] += amount
def segment(recency, frequency):
if recency <= 14 and frequency >= 3:
return "loyal"
if recency <= 14:
return "active"
if recency > 90:
return "at risk"
return "cooling"
print("cust recency freq spend segment")
for cust, r in sorted(rfm.items()):
recency = (today - r["last"]).days
print(f"{cust:<4} {recency:>7} {r['orders']:>4} {r['spend']:>5} {segment(recency, r['orders'])}")
Output:
cust recency freq spend segment
A 12 2 2000 active
B 139 1 300 at risk
C 7 3 5000 loyal
D 4 2 1100 active
Customer B has not ordered for 139 days and would get a win-back offer; C would get early access to a sale rather than a discount. Real teams use quantile scores or clustering (k-means) instead of fixed thresholds, but the logic is the same. The same table is the starting point for churn prediction: label who did not return within, say, 90 days and train a classifier on their earlier behaviour.
Warehouses need to know how many units of each product to stock in each region next week. Forecasting models use past sales, seasonality (festive sales, weekends, month-end salary days), price changes, promotions and stock-outs. Common tools range from classic time-series methods (exponential smoothing, ARIMA) to gradient-boosted trees with calendar and promotion features. A forecast that is too low means lost sales; too high means stock that ties up cash or must be discounted, so the error is measured in units and money, not just a percentage.
Pricing teams estimate price elasticity: how much demand changes when price changes. With that, they test whether a 10% discount on a product brings enough extra orders to make up for the lower margin. Platforms also monitor competitor prices and adjust within rules set by the business. Coupon targeting is a related problem: give the coupon to people who would not have bought without it, not to people who would have bought anyway (this is called uplift modelling).
The "Delivery by Thursday" line on a product page is a prediction. Models combine warehouse location, courier performance by pin code, cut-off times and holidays. Route optimisation and warehouse slotting (placing fast-selling items near packing stations) are operations-research problems that sit next to data science.
Every change above, from a new ranking model to a different checkout button, is usually tested on a random share of users before full rollout. Data scientists choose the metric, calculate the sample size, check that groups are balanced and decide whether the difference is real or noise. This is where statistics matters most in day-to-day e-commerce work.
| Role | Typical e-commerce work | Core skills |
|---|---|---|
| Data analyst | Sales dashboards, funnel and cohort analysis, campaign reports | SQL, Excel, Power BI or Tableau, basic statistics |
| Data scientist | Segmentation, forecasting, churn, pricing, experiment analysis | Python (pandas, scikit-learn), statistics, A/B testing |
| ML engineer | Recommendation and search models in production | Python, model serving, feature stores, cloud |
| Data engineer | Event pipelines and the warehouse | SQL, Spark, Airflow, cloud data tools |
More on how these jobs divide up is in data roles in the e-commerce industry. If you want a portfolio piece in this area, an RFM segmentation plus a revenue dashboard on a public e-commerce dataset is a good start; the e-commerce revenue analytics project walks through one.
Uncodemy's data science course covers the Python, SQL, statistics and machine learning used in these projects, with Dedicated Placement Support for learners who complete it.