Home How It Works Dashboard API Docs ↗
Live ML API · DSC × Ureeka Workshop

Predict Online Shopper Purchase Intent

with AI

Transform raw browsing behavior into real-time purchase predictions using a deployed machine learning API — from notebook to production.

17
Input Features
ML
Powered Model
REST
FastAPI Backend
Live
Public Endpoint
Scroll
How It Works

Three steps to
smarter commerce.

Our AI analyzes visitor behavior signals and returns a probability-based prediction in milliseconds.

🔍

Analyze Visitor Behavior

Capture metrics like page views, session duration, bounce rates, and traffic source — the raw signals of purchase intent.

⚡

Send Data to ML API

Serialize session data as JSON and POST it to the deployed FastAPI endpoint hosted on Hugging Face Spaces.

🎯

Get Purchase Prediction

Receive a prediction label, probability score, and threshold comparison — powering smarter marketing decisions instantly.

ML Pipeline

From Data to Deployment

The complete journey of an ML model — from raw dataset to public AI service.

📊
Dataset
→
🧠
Train Model
→
💾
Save Model
→
🔧
Build API
→
🚀
Deploy
→
🌐
Public AI Service

From notebook experiment to real-world AI application.

This project demonstrates the full ML lifecycle — from exploratory data analysis in Jupyter, through model training and serialization, to packaging as a production-ready REST API. It bridges the gap between data science and software engineering.

Open Dashboard
# Load and preprocess data
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
 
df = pd.read_csv("online_shoppers.csv")
model = RandomForestClassifier(n_estimators=100)
model.fit(X_train, y_train)
 
# Serialize the model
import joblib
joblib.dump(model, "model.pkl")
 
# Serve via FastAPI
@app.post("/predict")
async def predict(data: ShopperInput):
    return model.predict_proba(features)
Key Signals

Understanding the prediction signals.

These behavioral metrics are the strongest predictors of purchase intent in an online shopping session.

💰

Page Values

Average value of pages visited before completing a transaction. The single strongest predictor — higher values indicate strong purchase intent.

High Impact
🛍️

Product Related

Number of product pages visited during the session. More product views directly correlate with stronger buying intention signals.

Behavioral
↩️

Bounce Rates

Percentage of visitors entering and leaving from the same page. Lower bounce rates suggest deeper engagement and higher conversion potential.

Engagement
🚪

Exit Rates

Percentage of page sessions ending there. High exit rates on product pages are a strong signal of potential abandonment.

Conversion
Prediction Dashboard

Online Shopper Prediction Dashboard

Fill in the session data below and click Predict to get an AI-powered purchase intent score.

1 Session Pages
2 Engagement Metrics
3 Session Context
4 Technical Info
Please fill in all required fields.