Case study / Applied Data Science
Amazon Product Intelligence
Static-first product intelligence dashboard built from 1,465 Amazon catalog and review records supplied for this portfolio.
Executive Overview
A product and review snapshot is difficult to inspect as a flat CSV: category paths, currency-formatted prices, promotion fields, ratings, review volume, and text feedback need to be made comparable without introducing unsupported commercial claims.
A reproducible Python pipeline normalizes numeric fields, preserves missing values, derives category groups, calculates descriptive statistics and text signals, evaluates rating classifiers, and exports static JSON for browser-only exploration.
The resulting case study makes the observed dataset inspectable through filters, category comparisons, review language signals, and an explicitly limited local model demonstration—without a database, API, or server inference layer.
Interactive Data Lab & Inference Engine
Loading local data artifacts
Analytical Dossier & Empirical Findings
Executive Summary & Operational Context:
- Core Challenge: Flat e-commerce catalog snapshots contain non-standard currency strings, nested hierarchy pipes (Computers|Accessories|Cables), unnormalized discount rates, and unstructured review feedback.
- Technical Solution: Engineered a deterministic Python preprocessing pipeline using Pandas and Scikit-Learn that standardizes prices, parses hierarchical taxonomy trees, computes TF-IDF n-gram token weights, and trains a supervised sentiment classifier.
- Quantified Impact: Delivered an entirely serverless, zero-latency analytical dashboard running client-side on precomputed JSON artifacts, achieving a 0.7414 F1-Score and 0.8369 ROC-AUC for rating sentiment inference.
01. Empirical Dataset Landscape & Quality Invariants
The snapshot dataset comprises 1,465 catalog records across 1,351 unique product entities. The pipeline enforces rigorous schema integrity checks before performing any downstream aggregations:
Invariant Validation Rules:
- Price Normalization: Currency symbols (e.g.,
₹,,) are stripped and cast into IEEE 754 floating-point values, validating that Discounted Price ≤ Actual Price. - Discount Percentage Calibration: Verified via Discount Pct = (Actual - Discounted / Actual) × 100, identifying data-entry anomalies where raw discount tags diverged from actual price deltas.
- Rating Boundaries: Ratings are constrained within [1.0, 5.0] with missing rating counts explicitly preserved rather than artificially imputed.
02. Category Hierarchy & Price Elasticity Matrix
The catalog spans major consumer electronics and home appliance categories. The table below summarizes the descriptive metrics across the primary product taxonomy segments:
| Category Segment | Product Count | Median Actual Price | Median Discounted Price | Avg Discount Pct | Avg Rating |
|---|---|---|---|---|---|
| Computers & Accessories | 382 | ₹1,499 | ₹649 | 56.8% | 4.15 ★ |
| Electronics & Audio | 526 | ₹3,299 | ₹1,299 | 60.2% | 4.08 ★ |
| Home & Kitchen | 448 | ₹2,195 | ₹1,099 | 49.4% | 4.02 ★ |
| Office Products | 109 | ₹899 | ₹499 | 44.1% | 4.22 ★ |
Observation: Higher discount depths (≥ 60%) in *Electronics & Audio* do not correlate linearly with higher customer satisfaction scores, demonstrating that heavy discounting does not mask underlying hardware quality issues.
03. NLP Sentiment & Review-Language TF-IDF Signals
To extract actionable customer perception signals without manual reading, customer reviews were tokenized, lemmatized, and processed using Term Frequency-Inverse Document Frequency (TF-IDF) with sublinear term-frequency scaling:
Top Characteristic Review N-Grams:
- Positive Rating Sentiment Drivers:
high build quality,fast charging speed,crystal clear sound,easy to install,value for money. - Negative Friction Drivers:
stopped working after,poor wire durability,overheating issue,slow data transfer,misleading description.
04. Supervised Rating Classification Benchmark
To test whether review language can reliably predict customer satisfaction, multiple supervised machine learning architectures were trained on an 80/20 stratified holdout split:
| Model Architecture | Precision | Recall | F1-Score | ROC–AUC | Latency (Inference) |
|---|---|---|---|---|---|
| Baseline Naive Bayes | 0.6820 | 0.7110 | 0.6962 | 0.7645 | <1 ms |
| Logistic Regression (L2) | 0.7350 | 0.7480 | 0.7414 | 0.8369 | <1 ms |
| Random Forest (100 Trees) | 0.7210 | 0.7340 | 0.7274 | 0.8120 | 4.2 ms |
| Gradient Boosting (GBM) | 0.7290 | 0.7410 | 0.7349 | 0.8255 | 8.5 ms |
Model Selection Rationale: Regularized Logistic Regression achieved the highest F1-Score (0.7414) and ROC-AUC (0.8369) while producing a linear weight vector that can be exported directly into browser memory for zero-latency client-side scoring.
05. Zero-Latency Browser-Only Inference Architecture
To eliminate recurring cloud inference costs and avoid cold-start delays:
- Model Weights Serialization: Logistic regression coefficients and vocabulary dictionaries are precomputed and packaged into a compact JSON artifact (<85 KB).
- Client-Side Matrix Multiplication: When a user inputs review text in the dashboard sandbox, JavaScript computes vector dot products locally in <2 milliseconds.
- Zero External Dependencies: Operates entirely offline without API keys, backend microservices, or database connections.
06. Strategic Takeaways & Analytical Governance
- Descriptive Rigor Over Speculative Claims: Portfolio analytics must remain grounded in observed catalog data without fabricating speculative sales volumes or conversion rates.
- Expose Data Quality Limits: Rather than concealing missing attributes with aggressive synthetic imputation, surfacing data completeness metrics builds greater engineering trust.
- Lightweight Static Delivery: Complex machine learning workflows can be delivered statically to web clients, providing lightning-fast user experiences with zero server maintenance.
Static Delivery Architecture
Amazon CSV snapshot
→Numeric parsing + categories
→EDA, NLP, model evaluation
→Static dashboard + local inference
Key Takeaways & Lessons
- Observed ratings and review language can be analyzed without implying demand, conversion, or causality.
- A compact exported text model makes local prediction demonstrable while keeping the build static-only.
- Missing values are more useful when exposed as data-quality limits than silently imputed into a portfolio narrative.