Applying Newton's Law of Cooling to Transaction Scoring in DMP User Profiling
The article proposes using Newton’s law of cooling to score DMP user transactions, assigning higher weights to recent purchases that decay exponentially over time, deriving a cooling constant from boundary conditions, and normalizing the resulting heat‑based scores through log‑scaling and a sigmoid‑like mapping to a 0‑100 range.
Background: In DMP user or product profiling, a common scoring requirement is to assign a normalized score based on transactions, considering time decay.
Requirements: More recent transactions should have higher weight, with decreasing influence that slows over time; all scores must be normalized to the 0‑100 range.
Data format: Input consists of user ID, date, category ID, and order count; the output is a user ID’s purchase intention score for each category.
Implementation: The author models transaction heat using Newton’s law of cooling, where heat decays exponentially with time, analogous to a hot object cooling toward ambient temperature.
Mathematical formulation: The cooling rate is proportional to the temperature difference between the object and the ambient; after integration and applying boundary conditions (heat = 100 at the transaction day, heat = 1 after 180 days, ambient = 0), the constant α is derived.
Example: A corpse temperature scenario is used to illustrate how to estimate the constant from observed cooling data.
Normalization: Raw scores are log‑scaled if the spread is too large, then mapped via a sigmoid‑like function to the open interval (0, 1) and finally scaled to 0‑100.
Youzan Coder
Official Youzan tech channel, delivering technical insights and occasional daily updates from the Youzan tech team.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.