Calculator Inputs
Formula Used
Poincare disk: d(u,v) = arcosh(1 + 2c||u-v||² / ((1-c||u||²)(1-c||v||²))) / sqrt(c).
Upper half-plane: d(u,v) = arcosh(1 + ((x1-x2)² + (y1-y2)²) / (2y1y2)) / sqrt(c).
Commerce adjustment: adjusted distance = raw distance × scale × business modifier.
Business modifier = 1 + price effect + margin effect + category mismatch penalty.
Similarity value = exp(-temperature × adjusted distance). Recommendation score = 100 × exp(-adjusted distance / maximum useful distance).
How to Use This Calculator
- Select the geometry model used by your product embedding space.
- Enter the two product coordinates from the same trained model.
- Set curvature. Use the same value used during embedding training.
- Add ecommerce factors, such as price gap and category mismatch.
- Press the calculate button. The result appears above the form.
- Use CSV or PDF buttons to download the current calculation.
Example Data Table
| Use Case | Model | Point A | Point B | Curvature | Expected Reading |
|---|---|---|---|---|---|
| Variant recommendation | Poincare disk | (0.15, 0.20) | (0.32, 0.41) | 1.00 | Close product relationship |
| Cross-sell discovery | Poincare disk | (0.10, 0.18) | (0.55, 0.30) | 1.00 | Moderate catalog distance |
| Hierarchy audit | Upper half-plane | (1.20, 0.90) | (2.40, 1.80) | 0.75 | Review category placement |
Hyperbolic Distance for Ecommerce Catalogs
Why Hyperbolic Distance Helps Ecommerce
Large ecommerce catalogs are not flat. Products often form trees. A department contains categories. A category contains subcategories. Each subcategory contains brands, styles, sizes, and price bands. Hyperbolic geometry models this hierarchy with less distortion than ordinary Euclidean space. It gives more room near the edge. That makes it useful for product embeddings, recommendation systems, and navigation analysis.
This calculator estimates the distance between two catalog points. A small distance means two items sit close in the chosen hyperbolic space. They may be substitutes, variants, or close browsing options. A large distance suggests weaker similarity. It may show a category jump, a pricing gap, or an exploratory recommendation.
Business Value
Ecommerce teams can use the result during merchandising work. Analysts can compare a viewed product against suggested products. Search teams can test whether ranking outputs stay near the user intent. Marketplace teams can review cross-sell paths. The business overlay helps translate geometry into action. Price gap, margin gap, and category mismatch can raise the final commerce distance.
The Poincare disk option is useful when embeddings are stored inside a unit disk. Points must remain inside the valid radius. The half-plane option is useful for another common model. Its vertical coordinate must stay positive. Curvature changes the scale of the space. Higher curvature can separate hierarchy levels more sharply.
Reading the Output
Use the raw distance for mathematical comparison. Use the adjusted distance for business decisions. The similarity value works well for ranking tests. The recommendation score gives a quick percentage style summary. Thresholds convert the number into a practical tier.
Good inputs matter. Use normalized coordinates from the same embedding model. Do not compare points produced by different training runs without alignment. Keep curvature consistent across experiments. Review outliers carefully. Very distant items can still be useful for discovery. Yet they may not be ideal as primary recommendations.
This tool does not replace user testing. It supports faster inspection. It can explain why two products feel close or far. It also helps teams document recommendation logic. Clear distance checks can improve catalog quality, search relevance, and shopper journeys. When repeated weekly, these checks reveal drift in embeddings, category structure, and merchandising rules before shoppers notice weaker recommendation quality across pages.
FAQs
What is hyperbolic distance?
It is distance measured in curved space. It is useful when data forms hierarchies, such as departments, categories, subcategories, and products.
Why use it for ecommerce?
Ecommerce catalogs are hierarchical. Hyperbolic distance can represent category depth and product similarity with less distortion than flat distance.
What does a low distance mean?
A low distance suggests two products are close in the embedding space. They may be good substitutes, variants, or related recommendations.
What does a high distance mean?
A high distance suggests weak similarity. It may indicate a category jump, a wide price gap, or a recommendation needing review.
Which model should I choose?
Choose the model that matches your embeddings. Use Poincare disk for disk coordinates. Use half-plane for positive vertical coordinates.
What is curvature?
Curvature controls how sharply the space bends. Higher values can separate hierarchy levels more strongly in the final distance.
What is the business modifier?
It adjusts the pure geometric distance using price gap, margin gap, and category mismatch. It helps connect math with merchandising decisions.
Can I download the result?
Yes. Submit the same form with the CSV or PDF button. The file uses the current input values and calculation output.