%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#282828', 'primaryTextColor': '#ebdbb2', 'primaryBorderColor': '#504945', 'lineColor': '#d79921', 'secondaryColor': '#3c3836', 'tertiaryColor': '#1d2021', 'edgeLabelBackground': '#3c3836', 'clusterBkg': '#32302f', 'titleColor': '#ebdbb2' }}}%% flowchart TD subgraph E1["📜 ยุคที่ 1: รากฐาน (1600s–1800s)"] A["1654: Pascal & Fermat - วางรากฐานทฤษฎีความน่าจะเป็น"] B["1763: Thomas Bayes - เสนอ Bayes' Theorem"] C["1812: Laplace - พัฒนาสูตร Bayesian"] end subgraph E2["⚙️ ยุคที่ 2: คณิตศาสตร์เชิงสถิติ (1900s–1950s)"] D["1913: Andrey Markov - Markov Chains"] E["1950s: Claude Shannon - Information Theory"] end subgraph E3["🤖 ยุคที่ 3: AI และ ML (1980s–2000s)"] F["1985: Judea Pearl - Bayesian Networks"] G["1989: Baum-Welch Algorithm - HMM Training"] H["1990s: Naive Bayes - Spam Filtering"] end subgraph E4["🚀 ยุคที่ 4: Modern AI (2010s–ปัจจุบัน)"] I["2010s: Deep Probabilistic Models - VAE"] J["2023+: LLMs - Temperature, Top-p Sampling"] end A --> B --> C --> D --> E --> F --> G --> H --> I --> J style A fill:#458588,color:#ebdbb2 style B fill:#689d6a,color:#282828 style C fill:#689d6a,color:#282828 style D fill:#d79921,color:#282828 style E fill:#d79921,color:#282828 style F fill:#cc241d,color:#ebdbb2 style G fill:#cc241d,color:#ebdbb2 style H fill:#cc241d,color:#ebdbb2 style I fill:#b16286,color:#ebdbb2 style J fill:#b16286,color:#ebdbb2
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#282828', 'primaryTextColor': '#ebdbb2', 'primaryBorderColor': '#d79921', 'lineColor': '#b8bb26', 'secondaryColor': '#3c3836' }}}%% graph LR OB["🔍 Observation x"] PR["📊 Prior P(Cᵢ)"] LK["📈 Likelihood P(x|Cᵢ)"] PO["🎯 Posterior P(Cᵢ|x)"] LF["⚖️ Loss Function λ(αᵢ|Cⱼ)"] RI["📉 Expected Risk R(αᵢ|x)"] DE["✅ ตัดสินใจ เลือก αᵢ ที่ R ต่ำสุด"] OB --> PO PR --> PO LK --> PO PO --> RI LF --> RI RI --> DE style OB fill:#458588,color:#ebdbb2 style PR fill:#689d6a,color:#282828 style LK fill:#689d6a,color:#282828 style PO fill:#d79921,color:#282828 style LF fill:#cc241d,color:#ebdbb2 style RI fill:#b16286,color:#ebdbb2 style DE fill:#98971a,color:#ebdbb2
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#1d2021', 'primaryTextColor': '#ebdbb2', 'primaryBorderColor': '#d79921', 'lineColor': '#b8bb26', 'edgeLabelBackground': '#3c3836', 'fontFamily': 'monospace' }}}%% graph TD SMOKE["🚬 สูบบุหรี่ Smoking - P(S=T)=0.30"] POLL["🏭 มลพิษ Pollution - P(P=High)=0.40"] CANCER["🔬 มะเร็งปอด Lung Cancer - P(C|S,P)"] XRAY["📷 เอกซเรย์ X-Ray - P(X|C)"] BREATH["😮💨 หายใจลำบาก Dyspnea - P(D|C)"] SMOKE --> CANCER POLL --> CANCER CANCER --> XRAY CANCER --> BREATH style SMOKE fill:#cc241d,color:#ebdbb2 style POLL fill:#d65d0e,color:#ebdbb2 style CANCER fill:#b16286,color:#ebdbb2 style XRAY fill:#458588,color:#ebdbb2 style BREATH fill:#689d6a,color:#282828
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#282828', 'primaryTextColor': '#ebdbb2', 'primaryBorderColor': '#689d6a', 'lineColor': '#b8bb26' }}}%% stateDiagram-v2 [*] --> ฝน: เริ่มต้น ฝน --> ฝน: 0.7 ฝนต่อ ฝน --> แดด: 0.3 เปลี่ยนเป็นแดด แดด --> ฝน: 0.4 เปลี่ยนเป็นฝน แดด --> แดด: 0.6 แดดต่อ
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#282828', 'primaryTextColor': '#ebdbb2', 'primaryBorderColor': '#d79921', 'lineColor': '#fabd2f' }}}%% graph LR subgraph HIDDEN["🔒 Hidden States"] S1["☀️ แดด Sunny"] S2["🌧️ ฝน Rainy"] S3["☁️ เมฆ Cloudy"] end subgraph OBS["👁️ Observations"] O1["🚶 เดิน Walk"] O2["🛍️ ช้อป Shop"] O3["🧹 สะอาด Clean"] end S1 -->|"0.6"| S1 S1 -->|"0.3"| S2 S1 -->|"0.1"| S3 S2 -->|"0.2"| S1 S2 -->|"0.5"| S2 S2 -->|"0.3"| S3 S1 -.->|"b₁"| O1 S2 -.->|"b₂"| O2 S3 -.->|"b₃"| O3 style S1 fill:#d79921,color:#282828 style S2 fill:#458588,color:#ebdbb2 style S3 fill:#504945,color:#ebdbb2 style O1 fill:#98971a,color:#ebdbb2 style O2 fill:#b16286,color:#ebdbb2 style O3 fill:#689d6a,color:#282828
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#282828', 'primaryTextColor': '#ebdbb2', 'primaryBorderColor': '#d79921', 'lineColor': '#b8bb26' }}}%% mindmap root((HMM Applications)) Speech Recognition Hidden State = Phoneme Observation = Audio Signal Siri / Google Voice NLP POS Tagging Named Entity Recognition Machine Translation Bioinformatics Gene Finding Protein Structure DNA Sequence Finance Market Regime Detection Stock Price Modeling Computer Vision Gesture Recognition Activity Detection
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#1d2021', 'primaryTextColor': '#ebdbb2', 'primaryBorderColor': '#504945', 'lineColor': '#d79921' }}}%% graph LR subgraph CORE["🐍 Python Core"] NP["numpy - เชิงตัวเลข"] SP["scipy - สถิติขั้นสูง"] SK["scikit-learn - Naive Bayes, ML"] end subgraph BN["🕸️ Bayesian Networks"] PG["pgmpy - Probabilistic Graphical Models"] PM["pomegranate - Bayesian, HMM"] PY["PyMC - Bayesian Inference"] end subgraph HMM_T["🔄 HMM Tools"] HL["hmmlearn - Gaussian & Categorical HMM"] end subgraph VIZ["📊 Visualization"] MPL["matplotlib / seaborn"] PLT["networkx - Graph Viz"] end CORE --> BN CORE --> HMM_T CORE --> VIZ style NP fill:#458588,color:#ebdbb2 style SP fill:#458588,color:#ebdbb2 style SK fill:#458588,color:#ebdbb2 style PG fill:#689d6a,color:#282828 style PM fill:#689d6a,color:#282828 style PY fill:#689d6a,color:#282828 style HL fill:#d79921,color:#282828 style MPL fill:#b16286,color:#ebdbb2 style PLT fill:#b16286,color:#ebdbb2