# ์ ๋ผ์ข์๊ตฐ ๊ฒฌ๋ฆฌ์ฌ์ ๊ตฐ๋ น
## Paper Generation System for PhD Thesis
> ๊ฒฌ๋ฆฌ์ฌ์ (่ฆๅฉๆ็พฉ): ์ด์ต์ ๋ณด๋ฉด ์๋ก์์ ์๊ฐํ๋ผ
> ํ์ฌ์ฆ์ (ๅฟ
ๆญปๅฝ็): ์ฃฝ์ผ๋ ค ํ๋ฉด ์ด ๊ฒ์ด์, ์ด๋ ค ํ๋ฉด ์ฃฝ์ ๊ฒ์ด๋ค
---
## Directory Structure
```
paper_generation/
โโโ README.md # This file
โโโ __init__.py # Module initialization
โโโ generate_all_chapters.py # Main entry point
โโโ paper_magnet.py # Paper search system
โโโ chap1_introduction.py # ่ตท ์ ์ด
โโโ chap2_theory.py # ๆฟ ๊ถ์ค
โโโ chap3_empirics.py # ่ฝ ๊น์ + ๋๋์ฉ
โโโ chap4_discussion.py # ็ต ์ด์๋ด
โ
โโโ P1_vagueness/ # P1: U-Shape Analysis
โ โโโ theory.md # ๊ถ์ค์ ์ด๋ก ์ ๋ฆฌ
โ โโโ empirics.py # OLS/Logit ๋ถ์ ์ฝ๋
โ โโโ figures.py # Figure ์์ฑ ์ฝ๋
โ โโโ output/ # ์์ฑ๋ Figure (.png)
โ
โโโ P2_trap/ # P2: Competency Trap
โ โโโ theory.md # ๊ถ์ค์ ์ด๋ก ์ ๋ฆฌ
โ โโโ simulation.py # Bayesian ์๋ฎฌ๋ ์ด์
์ฝ๋
โ โโโ figures.py # Figure ์์ฑ ์ฝ๋
โ โโโ output/ # ์์ฑ๋ Figure (.png)
โ
โโโ P3_newsvendor/ # P3: Newsvendor Optimization
โ โโโ theory.md # ๊ถ์ค์ ์ด๋ก ์ ๋ฆฌ
โ โโโ model.py # Newsvendor ๋ชจ๋ธ ์ฝ๋
โ โโโ figures.py # Figure ์์ฑ ์ฝ๋
โ โโโ output/ # ์์ฑ๋ Figure (.png)
โ
โโโ output/ # Generated markdown files
โโโ chap1_introduction.md
โโโ chap2_theory.md
โโโ chap3_empirics.md
โโโ chap4_discussion.md
```
---
## Quick Start
```bash
# Generate all chapters
python generate_all_chapters.py
# Check status
python generate_all_chapters.py --status
# Generate specific chapter
python generate_all_chapters.py --chapter 1
# View expectation management
python generate_all_chapters.py --expect
# Search for relevant papers
python paper_magnet.py --paper P2
```
---
## The Fleet (์ ๋ผ์ข์๊ตฐ)
| Chapter | ํ์ | Commander | Virtue | Bayesian Role |
|---------|------|-----------|--------|---------------|
| **1. Introduction** | ่ตท | ์ ์ด ๐ข | ๅฉ (Speed) | Prior ฯ(ฮธ) |
| **2. Theory** | ๆฟ | ๊ถ์ค ๐
| ๆ (Structure) | Likelihood ฯ(y\|ฮธ) |
| **3. Empirics** | ่ฝ | ๊น์ ๐ + ๋๋์ฉ ๐
| ็พฉ (Criticism) | Calibration |
| **4. Discussion** | ็ต | ์ด์๋ด ๐พ | ่ฆ (Observation) | Generator |
---
## Three Papers (P1/P2/P3)
Each chapter generates content for three papers simultaneously:
| Paper | Emoji | Title | Domain Focus |
|-------|-------|-------|--------------|
| **P1** | โ๏ธ | U-Shape: When Vagueness Pays | Technology |
| **P2** | ๐ฆพ | Competency Trap: When Success Kills Options | Organization |
| **P3** | ๐คน | Execution Gap: Optimal Number of Options | Competition |
---
## Paper Magnet (๋
ผ๋ฌธ ์์)
Search for theoretically resonant papers from `/Users/hyunjimoon/tolzul/Space/Library/1๋
ผ๋ฌธ์ฉ/`:
```bash
# Top resonant papers
python paper_magnet.py
# Papers for specific theory
python paper_magnet.py --paper P1 # U-Shape
python paper_magnet.py --paper P2 # Competency Trap
python paper_magnet.py --paper P3 # Execution Gap
# Scott-Charlie tension papers
python paper_magnet.py --tension
# Keyword search
python paper_magnet.py --keyword "real option"
```
---
## Workflow (๊ฒฌ๋ฆฌ์ฌ์ ์ํ)
```
ๅฉ โ ๆ โ ็พฉ โ ่ฆ โ ๅฉ
โ
์ ์ด(Draft) โ ๊ถ์ค(Structure) โ ๊น์(Verify) โ ์ด์๋ด(Record)
โ โ
โโโโโโโโโโโโโ Generator (๋ค์ Prior) โโโโโโโโโโโ
```
---
## Output Format
Each generated markdown file contains:
- P1 section (U-Shape)
- P2 section (Competency Trap)
- P3 section (Execution Gap)
- Cross-Synthesis section
---
## Legacy Code
Old code has been archived to:
`/Users/hyunjimoon/tolzul/Front/On/love(cs)/strategic_ambiguity/empirics/docs_archive/legacy_paper_generation/`
---
## P1/P2/P3 Empirics & Figures (๋๋์ฉ ์๋ฌด)
### Quick Start: Generate All Figures
```bash
# P1: U-Shape Analysis
cd P1_vagueness
python empirics.py # Run OLS/Logit analysis
python figures.py # Generate figures
# P2: Competency Trap
cd P2_trap
python simulation.py # Run Bayesian simulation
python figures.py # Generate figures
# P3: Newsvendor
cd P3_newsvendor
python model.py # Run newsvendor optimization
python figures.py # Generate figures
```
### P1: U-Shape - When Vagueness Pays
**Variables:**
- `vagueness_score (V)`: 0.6 * S_cat + 0.4 * S_concdef
- `survival`: Binary (survived 3+ years)
- `funding`: Log(total funding amount)
- `exercisability`: Hardware/Software classification
**Models:**
- H1: OLS regression `log(Funding) = ฮฒโ + ฮฒโV + ฮฒโVยฒ + controls`
- H2: Logit with interaction `Pr(Survival) = ฮ(ฮฒโ + ฮฒโV + ฮฒโH + ฮฒโ(VรH) + ...)`
**Output Figures:**
- `P1_u_shape_survival.png`: U-shape survival vs vagueness
- `P1_hw_sw_comparison.png`: Hardware vs Software interaction
- `P1_coefficient_table.png`: Coefficient table visualization
### P2: Competency Trap - When Success Kills Options
**Variables:**
- `prior (ฮผโ, ฯโ)`: Initial beliefs about current path
- `evidence_strength`: Strength of disconfirming signal
- `believer_ratio`: Proportion of like-minded investors
- `switching_threshold (ฯ)`: Evidence threshold for pivot
**Model:** Bayesian update simulation
```
ฮผ_post = (ฯ_eยฒ * ฮผโ + ฯโยฒ * y) / (ฯโยฒ + ฯ_eยฒ)
ฯ = f(ฯโ, believer_ratio)
```
**Output Figures:**
- `P2_belief_lockin_diagram.png`: ฮผ,ฯ โ threshold heatmap
- `P2_pivot_threshold_curve.png`: Pivot threshold vs ฯ curve
- `P2_case_comparison.png`: Waymo vs Comma.ai case study
### P3: Newsvendor - Optimal Number of Options
**Variables:**
- `D`: Demand ~ Poisson(ฮป) or Normal(ฮผ,ฯยฒ)
- `C`: Commitment cost
- `F`: Flexibility cost
- `CR`: Commitment ratio = C / (C + F)
**Model:** Newsvendor optimization
```
k* = ฮผ_D + ฯ_D * ฮฆโปยน(CR)
```
**Output Figures:**
- `P3_cr_kstar_curve.png`: CR vs k* policy curve
- `P3_sensitivity_heatmap.png`: Sensitivity to ฯ(D)
- `P3_industry_calibration.png`: Industry-specific CR calibration
- `P3_unified_framework.png`: P1/P2/P3 unified on CR-k* plane
---
## Requirements
```bash
pip install numpy pandas scipy statsmodels matplotlib
```
## Reproducibility
- All scripts use `SEED = 42` for reproducibility
- Dummy data generated internally (no external data required)
- Relative paths used for output
---
*ํต์ ์ฌ: ์ด์์ ๋ฌธํ์ง (Moon)*
*๊ณต๋ณ๋์ฅ: ๋๋์ฉ (Builder)*