This commit is contained in:
CC
2026-10-17 21:55:49 +01:00
parent e61012914a
commit 64b65b9793
136 changed files with 2427796 additions and 0 deletions

43
claude/business_model.md Normal file
View File

@@ -0,0 +1,43 @@
Yes. Most business questions map to a model family once you work out the unit of analysis (who or what is being counted) and the type of outcome. Here's the mapping using your Trakt and Spotify examples.
**Who**
- *Questions:* Who are my heavy skippers? Who is most like whom?
- *Frameworks:* clustering (K-means) for segments, logistic models for propensity (e.g. who completes shows), similarity scores (Jaccard, cosine) for how alike two users are.
- *Example:* Spotify user A vs. B overlap, or the viewing-day personas from K-means.
**What**
- *Questions:* What should we recommend? What drives completion?
- *Frameworks:* recommenders (item-item, Word2Vec), association rules (FP-growth), and GLM coefficients that rank drivers.
- *Example:* tracks B plays that A hasn't heard, or runtime's effect on finishing a show.
**When**
- *Questions:* When will demand peak? How long until someone abandons a show? When did habits change?
- *Frameworks:* time series (ETS, Prophet) for forecasts, survival analysis for time-to-event, Poisson with seasonality terms, change-point detection.
- *Example:* predicted days until a 50% chance of abandoning a series.
**Where**
- *Questions:* Which region, device or channel?
- *Frameworks:* group-level GLMs with country or platform terms, hierarchical models to shrink small-sample regions toward the average.
- *Example:* Spotify's country and platform fields. Trakt has almost no "where", so there it's mostly a time-zone question.
**How many / how much**
- *Frameworks:* Poisson or negative binomial for counts, gamma for skewed amounts, with an offset for exposure.
- *Example:* plays per day on weekends vs. weekdays.
**Why**
- *Frameworks:* GLM coefficients show association. Causal designs (A/B tests, difference-in-differences) show effect.
- *Example:* "Did B hearing it first cause A's plays?" needs more than a coefficient.
**The shortcut:** ask what the outcome looks like.
- A count → Poisson
- Yes/no → logistic
- Time until something → survival
- A skewed amount → gamma
- Groups of similar things → clustering
- Next best item → recommender
**Two cautions**
- Plain SQL answers many who/what/when/where questions descriptively (top artists, busiest days). Reach for a model when you need prediction, comparison with uncertainty, or an effect size.
- Models give probabilities and rates, not certainties, and sparse data (one or two users) limits which ones are valid.
Want to take one real business question from your data and walk it through question → outcome type → model → features?