docs(10_Wiki): 위키 전체 재구성 — Topic_* 폴더를 4개 카테고리로 통합 + 대규모 중복 제거

Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를
Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류.

- 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로
  자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거,
  동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거.
- 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming,
  Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business,
  Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로,
  나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는
  title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백).
  원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지.
- 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서.
- 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는
  지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지.
- Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경.
- 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
This commit is contained in:
Antigravity Agent
2026-07-05 00:33:48 +09:00
parent 1cfd3bbb56
commit 9148c358d0
6455 changed files with 1 additions and 86875 deletions
@@ -0,0 +1,241 @@
---
id: wiki-2026-0508-dynamic-pricing-offers
title: Dynamic Pricing & Offers
category: 10_Wiki/Topics
status: verified
canonical_id: self
aliases: [dynamic pricing, surge pricing, demand pricing, personalized offer, price optimization]
duplicate_of: none
source_trust_level: A
confidence_score: 0.92
verification_status: applied
tags: [pricing, dynamic-pricing, optimization, ml, revenue, demand, ecommerce]
raw_sources: []
last_reinforced: 2026-05-10
github_commit: pending
tech_stack:
language: Python
framework: scikit-learn / XGBoost / OR-Tools
---
# Dynamic Pricing & Offers
## 매 한 줄
> **"매 supply / demand / inventory / context 의 real-time 의 price 의 adjust"**. 매 Uber surge, 매 airline yield, 매 hotel revenue management. 매 modern: 매 ML + RL + causal inference. 매 ethical: 매 fairness + 매 backlash.
## 매 핵심
### 매 method
- **Rule-based**: 매 demand-tier.
- **Elasticity model**: 매 price-demand curve.
- **MAB / bandit**: 매 explore.
- **RL**: 매 long-horizon reward.
- **Causal**: 매 price 의 effect 의 estimate.
### 매 famous
- **Uber surge**: 매 multiplier.
- **Airline yield**: 매 fare class + restriction.
- **Hotel RM**: 매 occupancy + LOS.
- **Amazon**: 매 millions / day price change.
- **Ticketmaster**: 매 dynamic event.
### 매 ethical / risk
- **Backlash**: 매 ride 의 surge during emergency.
- **Discrimination**: 매 protected attribute 의 proxy.
- **Trust erosion**: 매 frequent change 의 detect.
- **Regulation**: 매 EU price personalization disclosure.
### 매 응용
1. **Ride-hailing**: 매 surge.
2. **Travel**: 매 yield management.
3. **Retail**: 매 markdown.
4. **Energy**: 매 time-of-use.
5. **Subscription**: 매 win-back offer.
6. **Gaming**: 매 IAP discount.
## 💻 패턴
### Price elasticity estimation
```python
import numpy as np
from sklearn.linear_model import LinearRegression
# 매 log-log: log(Q) = a + b * log(P) + ε
def estimate_elasticity(prices, quantities):
log_p = np.log(prices).reshape(-1, 1)
log_q = np.log(quantities)
model = LinearRegression().fit(log_p, log_q)
elasticity = model.coef_[0] # 매 typically negative
return elasticity
```
### Optimal price (revenue maximize)
```python
def optimal_price(cost, base_demand, elasticity, p_min, p_max):
"""매 max revenue: 매 (p - c) * Q(p)."""
def revenue(p):
q = base_demand * (p / p_min) ** elasticity
return (p - cost) * q
from scipy.optimize import minimize_scalar
result = minimize_scalar(lambda p: -revenue(p), bounds=(p_min, p_max), method='bounded')
return result.x
```
### Surge multiplier (Uber-style)
```python
def surge_multiplier(active_drivers, pending_requests):
ratio = pending_requests / max(active_drivers, 1)
if ratio < 0.5: return 1.0
elif ratio < 1.0: return 1.2
elif ratio < 2.0: return 1.5
elif ratio < 3.0: return 2.0
else: return min(3.0, 1.0 + ratio * 0.5)
```
### Yield management (hotel)
```python
class YieldManager:
def __init__(self, total_rooms, days_to_event):
self.total = total_rooms
self.dte = days_to_event
self.booked = 0
def price(self, base_price, demand_signal):
occupancy = self.booked / self.total
proximity = max(0, 1 - self.dte / 30) # 매 closer → urgency
multi = 1 + 0.5 * occupancy + 0.3 * proximity + 0.2 * demand_signal
return base_price * multi
```
### Contextual bandit price
```python
class PriceBandit:
def __init__(self, price_options):
self.prices = price_options
self.alpha = np.ones(len(price_options))
self.beta = np.ones(len(price_options))
def select(self, context):
# 매 Thompson sample
samples = np.random.beta(self.alpha, self.beta)
return self.prices[np.argmax(samples)]
def update(self, price_idx, purchased):
if purchased: self.alpha[price_idx] += 1
else: self.beta[price_idx] += 1
```
### Personalized offer
```python
def personalized_discount(user, base_price, cost):
"""매 user lifetime value 의 discount 의 fund."""
ltv = predict_ltv(user)
sensitivity = predict_price_sensitivity(user)
if sensitivity > 0.8 and ltv > base_price * 5:
# 매 churn risk + valuable → 매 deep discount
return base_price * 0.7
elif sensitivity > 0.5:
return base_price * 0.9
return base_price
```
### Win-back offer
```python
def winback_offer(user):
if user.last_active_days_ago < 30: return None
if user.churn_score > 0.7:
return {
'type': 'discount',
'value': 0.5,
'expires': now() + timedelta(days=7),
'urgency': 'high',
}
return None
```
### Causal effect of price (DoWhy)
```python
import dowhy
def estimate_price_causal_effect(df):
model = dowhy.CausalModel(
data=df,
treatment='price',
outcome='purchased',
common_causes=['user_segment', 'season', 'inventory'],
)
estimand = model.identify_effect()
estimate = model.estimate_effect(estimand, method_name='backdoor.linear_regression')
return estimate.value # 매 price 의 1 unit 의 purchase 의 marginal effect
```
### Anti-discrimination check
```python
def fairness_audit(prices_by_segment):
"""매 protected attribute 의 disparate pricing."""
grouped = prices_by_segment.groupby('protected_attr')['price']
means = grouped.mean()
if (means.max() - means.min()) / means.mean() > 0.05:
return 'WARN: >5% pricing disparity by protected attribute'
return 'OK'
```
### Inventory-aware (markdown)
```python
def markdown(item, days_remaining, inventory):
"""매 perishable / seasonal 의 markdown."""
if days_remaining < 7:
if inventory > 50: return 0.5
elif inventory > 20: return 0.7
else: return 0.9
return 1.0
```
### A/B testing dynamic pricing
```python
def split_test(user_id):
bucket = hash(user_id) % 100
if bucket < 50: return 'control', static_price
elif bucket < 75: return 'A', dynamic_price_v1
else: return 'B', dynamic_price_v2
```
## 매 결정 기준
| 상황 | Approach |
|---|---|
| Real-time supply/demand | Surge multiplier |
| Long-horizon | Yield management |
| Few price tiers | Bandit |
| Continuous price | Elasticity model + optimize |
| Personalization | Bandit + user features |
| High-stakes | Causal estimation |
**기본값**: 매 elasticity model + 매 inventory-aware + 매 personalization (LTV) + 매 fairness audit + 매 A/B.
## 🔗 Graph
- 변형: [[Surge-Pricing]]
- 응용: [[Causal-Inference]] · [[Multi-Armed-Bandit]] · [[Reinforcement-Learning]]
- Adjacent: [[E-commerce-Optimization]] · [[Dynamic-Creative-Optimization]]
## 🤖 LLM 활용
**언제**: 매 inventory perishable. 매 demand variable. 매 personalization.
**언제 X**: 매 regulated commodity. 매 trust-critical (medication).
## ❌ 안티패턴
- **No fairness audit**: 매 discrimination.
- **No inventory awareness**: 매 stockout / waste.
- **Surge without cap**: 매 emergency price gouge.
- **No experimentation**: 매 elasticity 의 stale.
- **Personalize without disclosure**: 매 EU compliance.
## 🧪 검증 / 중복
- Verified (Pricing literature, Uber/Amazon engineering posts).
- 신뢰도 A.
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — pricing + 매 elasticity / surge / yield / bandit / fairness code |