How Windsketch Designed an Agnostic Pricing Model for a Fragmented Market

  • Home
  • How Windsketch Designed an Agnostic Pricing Model for a Fragmented Market
shapeshape
How Windsketch Designed an Agnostic Pricing Model for a Fragmented Market

Asniel Rodriguez Ruiz

October 3, 2025

How Windsketch Designed an Agnostic Pricing Model for a Fragmented Market

At Windsketch, our development team faced one of the biggest technical challenges: creating an agnostic pricing calculation model capable of adapting to a market where each manufacturer follows its own logic—often unpredictable and even contradictory.

The Problem: A Patternless Puzzle

Pricing calculation in this industry is far from uniform:

  • Some manufacturers place more weight on a single axis (height or width) rather than the total area.
  • Others apply percentage increases over a base measurement and then adjust for additional features.
  • In some cases, pricing is based on square inches; in others, on square feet.
  • And the most challenging aspect: pricing is not always linear. Sometimes, larger units ended up being cheaper than smaller ones, following irregular price curves that were difficult to anticipate.

It was an environment with no common rule, where traditional methods failed to generalize effectively.

The First Attempts: Standard Models

To tackle the problem, the team began by designing several static calculation models, which allowed us to cover a large portion of manufacturers with more regular pricing patterns:

  • Formulas based on total area.
  • Models using square inches or square feet.
  • “Slot” schemes, with predefined price ranges based on measurements.
  • Hybrid variations combining percentages and dimensions.

These approaches successfully addressed many cases. However, there remained manufacturers with highly irregular and non-linear price curves that didn’t fit into any standard rule.

Exploring AI: What Worked and What Didn’t

Our team also experimented with various artificial intelligence approaches and mathematical models:

  • Deep neural networks, which tended to overfit the data and were expensive to maintain.
  • Simple linear and polynomial regressions, which failed to capture curve complexity.
  • Spline interpolations, which introduced undesirable oscillations.
  • “Elbow” segmentation within the dataset, where we tried splitting data into small, high-variance groups to train local regressions. The idea had potential but was too complex to sustain in production.

Each attempt provided valuable insights, but none achieved the balance between accuracy, simplicity, and performance that we needed.

The Final Solution: A Hybrid, Adaptive, Segment-Based Precision Model

The turning point came when we accepted an uncomfortable truth: there is no single function that can represent the behavior of the entire market. The diversity of manufacturers, materials, and internal pricing rules made a purely global approach unfeasible.

This led to our definitive solution: a hybrid model, based on adaptive (piecewise) segmentation, combined with local polynomial regressions and error control mechanisms.

Behavioral Segmentation and Error Control

Instead of searching for a single curve to generalize all behaviors, the system began analyzing price variations within measurement sets, identifying sharp changes or inconsistencies. These inflection points acted as natural interval boundaries, within which a polynomial function could be fitted with higher accuracy.

Each segment or interval is evaluated with:

  • A flexible-order polynomial regression (typically second order).
  • An acceptable error bound (mean squared error).

If the error exceeds the defined threshold, the system:

  • Automatically subdivides the measurement set into smaller intervals.
  • Fits a new, specific function for that subgroup.
  • Associates that model with the corresponding range.

Image

This allows the pricing engine to precisely detect and isolate areas where manufacturer rules change or behave non-linearly, without contaminating adjacent intervals. As a result, the system remains accurate and stable, even when faced with catalogs that have abrupt, step-like, or inverted price curves.

A Model That Adapts to Any Pricing Dimension

The core of our engine is not limited to working with area or flat dimensions. At Windsketch, we combine multiple calculation approaches, all coexisting in a modular and transparent way:

  • Area-based pricing.
  • Slot-based pricing using predefined measurement intervals.
  • Element-based pricing (e.g., glass type, frames, colors, tinting, tempering, grids, etc.).
  • Fixed prices and percentage-based formulas where applicable.
  • Piecewise functions with polynomial regressions per segment, for manufacturers with non-linear or irregular logic.

This combination of rules, supported by a mathematical model that evolves and self-corrects on the fly, allows Windsketch to operate a pricing engine that can adapt to:

  • Any manufacturer, regardless of how idiosyncratic their structure is.
  • Any product within the windows and doors ecosystem.
  • Any material or component affecting pricing logic (glass, aluminum, accessories, special treatments, etc.).

A Living, Interpretable, and Expandable System

Beyond accuracy, the model was designed to be:

  • Interpretable: Each range has its own function and can be easily audited.
  • Self-adjusting: If new data breaks the pattern, a new function is calculated without human intervention.
  • Scalable: The architecture allows storing each set of coefficients, associating them with manufacturers, materials, or products, and performing real-time calculations without performance penalties.

The Challenge of Django Integration

Solving the mathematical aspect was only half the battle. The team also had to integrate this logic into a production system, facing challenges such as:

  • Serializing and securely storing mathematical coefficients.
  • Running real-time calculations without sacrificing performance.
  • Designing a flexible and extensible data model to support any manufacturer’s pricing logic.

This was a challenge involving both data science and software engineering.

What We Learned

The result was a robust pricing engine that combines standard models for manufacturers with traditional rules and an advanced mathematical model for those with irregular patterns. This solution allowed Windsketch to build a truly agnostic system, capable of adapting to a fragmented and complex market.

The most valuable lesson for our team: you don’t always have to choose between artificial intelligence and classical mathematics. Sometimes, the best solution comes from hybridizing approaches and applying pragmatic engineering, achieving a balance between accuracy, simplicity, and scalability.

Asniel Rodriguez Ruiz

About Asniel Rodriguez Ruiz

Asniel Rodríguez Ruiz is the Lead Tech and Product Lead at Windsketch, where he has spearheaded the platform’s development from the ground up — overseeing everything from technical architecture to the implementation of core features such as real-time estimation, third-party integrations, and the adaptive pricing engine for manufacturers.

Before Windsketch, Asniel co-founded Boukker, a social network for readers and writers designed to connect emerging authors with new audiences and foster vibrant literary communities online.

He combines his entrepreneurial vision with strong expertise in software engineering and artificial intelligence, leading teams to transform traditional industries through innovative technology.

Fill out the form to be contacted by a Product Specialist.

Share