# ์ „๋ผ์ขŒ์ˆ˜๊ตฐ ๊ฒฌ๋ฆฌ์‚ฌ์˜ ๊ตฐ๋ น ## 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)*