%%{init: {'theme': 'base', 'themeVariables': {'lineColor': '#2f2f2f', 'textColor': '#111111', 'primaryBorderColor': '#2f2f2f', 'fontSize': '18px'}}}%%
flowchart LR
X["$$x \\in \\mathbb{R}^3$$"]
subgraph A["OvR (K=3 sigmoids)"]
direction LR
O1["$$z_k = w_k^\\top x + b_k,\\ k\\in\\{1,2,3\\}$$"] --> O2["$$\\hat{p}_k = \\sigma(z_k)$$"] --> O3["$$\\hat{y} = \\arg\\max_k \\hat{p}_k$$"]
end
subgraph B["Softmax (shared norm.)"]
direction LR
S1["$$z_k = w_k^\\top x + b_k,\\ k\\in\\{1,2,3\\}$$"] --> S2["$$\\hat{p}_k = \\dfrac{e^{z_k}}{\\sum_{j=1}^{3} e^{z_j}}$$"] --> S3["$$\\hat{y} = \\arg\\max_k \\hat{p}_k$$"]
end
X --> O1
X --> S1
classDef ovr fill:#e9f2ff,stroke:#1f4e79,stroke-width:1.2px,color:#0b1f33;
classDef soft fill:#fff1e6,stroke:#8a3b12,stroke-width:1.2px,color:#3b1a06;
class X,O1,O2,O3 ovr;
class S1,S2,S3 soft;
style A fill:#f3f7ff,stroke:#1f4e79,color:#0b1f33;
style B fill:#fff5ed,stroke:#8a3b12,color:#3b1a06;