# Support Vector Machines **ผู้จัดทำ:** อรรถพล คงหวาน --- # Outline 1. Linear SVM 2. Kernel Trick 3. Non-linear SVM 4. Multi-class Classification 5. ประวัติศาสตร์และพัฒนาการของ SVM 6. ข้อดี ข้อเสีย และการเลือกใช้ SVM --- # ภาพรวม Support Vector Machines **Support Vector Machines (SVM)** คืออัลกอริทึม ML ที่มีพื้นฐานทางคณิตศาสตร์อันแข็งแกร่ง - เป้าหมาย: หา **Hyperplane** ที่แบ่งแยกข้อมูลสองกลุ่มด้วย **Margin** ที่กว้างที่สุด - เรียกว่า **Maximum Margin Classifier** - เป็น **Discriminative Model** ที่มีประสิทธิภาพสูง - ใช้ได้ทั้งงาน Classification และ Regression --- ## ภาพรวม SVM (Diagram) ```mermaid %%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#282828', 'primaryTextColor': '#ebdbb2', 'primaryBorderColor': '#d79921', 'lineColor': '#d65d0e', 'secondaryColor': '#3c3836', 'tertiaryColor': '#504945', 'background': '#1d2021', 'mainBkg': '#282828'}}}%% graph TD A["🤖 Support Vector Machines"] --> B["Linear SVM"] A --> C["Non-linear SVM"] A --> D["Multi-class SVM"] B --> B1["Hard Margin SVM"] B --> B2["Soft Margin SVM"] C --> C1["Kernel Trick"] C1 --> C2["RBF Kernel"] C1 --> C3["Polynomial Kernel"] C1 --> C4["Sigmoid Kernel"] D --> D1["One-vs-One (OvO)"] D --> D2["One-vs-Rest (OvR)"] style A fill:#d79921,color:#282828,stroke:#b57614 style B fill:#458588,color:#ebdbb2,stroke:#076678 style C fill:#98971a,color:#ebdbb2,stroke:#79740e style D fill:#cc241d,color:#ebdbb2,stroke:#9d0006 ``` --- # 1. Linear SVM --- ## 1.1 แนวคิดพื้นฐาน **Linear SVM** มีเป้าหมายหา **Decision Boundary** (Hyperplane) ที่ทำให้ **Margin** กว้างที่สุด | คำศัพท์ | ความหมาย | |---------|----------| | **Hyperplane** | ระนาบแบ่งแยกข้อมูล: **w**ᵀ**x** + b = 0 | | **Support Vectors** | จุดข้อมูลที่ใกล้ Hyperplane ที่สุด | | **Margin** | ระยะห่างระหว่าง Hyperplane กับ Support Vectors | | **Maximum Margin** | หลักการหา Hyperplane ที่ Margin กว้างที่สุด | --- ## 1.1 Feature Space (Diagram) ```mermaid %%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#282828', 'primaryTextColor': '#ebdbb2', 'primaryBorderColor': '#d79921', 'lineColor': '#d65d0e', 'background': '#1d2021', 'mainBkg': '#282828'}}}%% graph LR subgraph SPACE["Feature Space"] SV1["● Support Vector (คลาส +1)"] SV2["▲ Support Vector (คลาส -1)"] HP["━━━ Decision Hyperplane: w·x + b = 0"] M1[".- - - Margin Boundary +: w·x + b = +1"] M2[".- - - Margin Boundary -: w·x + b = -1"] end M1 --> HP HP --> M2 SV1 -. "2/||w||" .-> SV2 style SPACE fill:#282828,stroke:#d79921 style SV1 fill:#458588,color:#ebdbb2,stroke:#076678 style SV2 fill:#cc241d,color:#ebdbb2,stroke:#9d0006 style HP fill:#d79921,color:#282828,stroke:#b57614 ``` --- ## 1.2 สมการ Hyperplane สมการ Hyperplane:
w
T
x
+
b
=
0
เงื่อนไขการจำแนก:
y
i
(
w
T
x
i
+
b
)
≥
1
ความกว้างของ Margin:
Margin
=
2
‖
w
‖
--- ## 1.3 Hard Margin SVM — Optimization **วัตถุประสงค์:** ทำให้ Margin กว้างที่สุด → ทำให้ ‖**w**‖ น้อยที่สุด
minimize
w
,
b
1
2
‖
w
‖
2
subject to:
y
i
(
w
T
x
i
+
b
)
≥
1
,
i
=
1
,...,
n
--- ## 1.4 Soft Margin SVM เพิ่ม **Slack Variables (ξᵢ)** อนุญาตให้จำแนกผิดพลาดได้บ้าง:
minimize
w
,
b
,
ξ
1
2
‖
w
‖
2
+
C
∑
i
=
1
n
ξ
i
- **C สูง** → ให้ความสำคัญกับการจำแนกถูกต้อง → Overfitting - **C ต่ำ** → ยอมรับ Error ได้มาก Margin กว้าง → Underfitting --- ## 1.5 ตัวอย่างการคำนวณ Linear SVM **ข้อมูล:** w = [0.5, 0.5], b = -1
Margin
=
2
0.5
2
+
0.5
2
=
2
0.5
≈
2.83
- Support Vector จุด (2,2) คลาส +1: 2w₁ + 2w₂ + b = 1 - Support Vector จุด (0,0) คลาส -1: b = -1 - จาก w₁ + w₂ = 1 และ symmetry → **w₁ = w₂ = 0.5** --- ## 1.6 เปรียบเทียบ Hard Margin vs Soft Margin | คุณสมบัติ | Hard Margin | Soft Margin | |-----------|-------------|-------------| | พารามิเตอร์ C | ไม่มี (∞) | มีค่า C > 0 | | ข้อมูล Noise | ไม่ทนทาน | ทนทาน | | Slack Variables ξᵢ | ไม่มี | มี | | Generalize | ต่ำ | สูง | | การใช้งานจริง | น้อย | มาก | --- ## 1.7 โค้ด Python: Linear SVM ```python from sklearn.svm import SVC from sklearn.preprocessing import StandardScaler scaler = StandardScaler() X_train_s = scaler.fit_transform(X_train) X_test_s = scaler.transform(X_test) # Hard Margin: C สูงมาก svm_hard = SVC(kernel='linear', C=1000.0) svm_hard.fit(X_train_s, y_train) # Soft Margin: C = 1 svm_soft = SVC(kernel='linear', C=1.0) svm_soft.fit(X_train_s, y_train) print("Support Vectors:", svm_hard.n_support_) print("Weight Vector:", svm_hard.coef_[0]) ``` --- # 2. Kernel Trick --- ## 2.1 ความจำเป็นของ Kernel Trick - Linear SVM จัดการเฉพาะข้อมูล **Linearly Separable** เท่านั้น - ข้อมูลจริงมักมีโครงสร้างที่ซับซ้อนกว่า - **แนวคิด:** ใช้ **Kernel Function** คำนวณ Inner Product ใน Feature Space สูงมิติโดยตรง - ไม่จำเป็นต้องแปลงข้อมูลจริง → ประหยัดคอมพิวเตอร์มาก --- ## 2.1 Kernel Trick (Diagram) ```mermaid %%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#282828', 'primaryTextColor': '#ebdbb2', 'primaryBorderColor': '#d79921', 'lineColor': '#d65d0e', 'background': '#1d2021', 'mainBkg': '#282828'}}}%% graph LR subgraph ORIG["Original Space (2D)"] D1["ข้อมูลที่แยกเชิงเส้นไม่ได้"] end subgraph FEAT["Feature Space (Higher Dim)"] D2["ข้อมูลที่แยกเชิงเส้นได้แล้ว"] end D1 -->|"φ(x) — Mapping"| D2 D2 -->|"Kernel K(x,z) = φ(x)·φ(z)"| D1 note["💡 Kernel Trick: คำนวณ φ(x)·φ(z) โดยไม่ต้องคำนวณ φ(x) จริงๆ"] style ORIG fill:#3c3836,stroke:#d79921,color:#ebdbb2 style FEAT fill:#3c3836,stroke:#98971a,color:#ebdbb2 style note fill:#b57614,color:#282828,stroke:#d79921 ``` --- ## 2.2 นิยาม Kernel Function **Kernel Function K(x, z)** คำนวณค่าเทียบเท่าผลคูณภายในของ Feature Maps:
K
(
x
,
z
)
=
⟨
φ
(
x
)
,
φ
(
z
)
⟩
- **φ** = Feature Map แปลงข้อมูลไปยัง Feature Space มิติสูง - **เงื่อนไข Mercer's Theorem:** K ต้องเป็น Positive Semi-definite (PSD) --- ## 2.3 ประเภทของ Kernel Functions | Kernel | สมการ | การใช้งาน | |--------|--------|-----------| | **Linear** | K(x,z) = xᵀz | ข้อมูล High-dimensional | | **Polynomial** | K(x,z) = (γxᵀz + r)ᵈ | Text Classification | | **RBF/Gaussian** | K(x,z) = exp(-γ‖x-z‖²) | งานทั่วไป | | **Sigmoid** | K(x,z) = tanh(γxᵀz + r) | Neural Network-like | --- ## 2.3 Polynomial Kernel — การคำนวณ **x** = [1, 2], **z** = [3, 4], d = 2, γ = 1, r = 0
K
(
x
,
z
)
=
(
x
T
z
)
2
=
(
1
×
3
+
2
×
4
)
2
=
11
2
=
121
ตรวจสอบด้วย φ(x) = [x₁², √2·x₁x₂, x₂²]: - φ([1,2])·φ([3,4]) = 9 + 48 + 64 = **121** ✓ --- ## 2.3 RBF Kernel — การคำนวณ **x** = [1, 0], **z** = [0, 1], γ = 1.0
K
(
x
,
z
)
=
exp
(
-
γ
‖
x
-
z
‖
2
)
=
exp
(
-
2
)
≈
0.1353
- K ≈ 0.135 → x และ z มีความคล้ายกันน้อย (ห่างกัน) - ถ้า x = z → K = 1 (คล้ายกันที่สุด) --- ## 2.4 เปรียบเทียบ Kernel บน Circles Dataset ``` Dataset: Circles Dataset Kernel Train Acc Test Acc #SV ------------------------------------------------------- Linear 0.5357 0.5167 94 Polynomial (d=3) 0.9929 0.9833 8 RBF (γ=auto) 0.9929 0.9833 7 Sigmoid 0.5571 0.5500 90 ``` > Linear SVM ≈ 50% เพราะข้อมูลไม่แยกเชิงเส้นได้ > RBF Kernel ≈ 98% หลัง Kernel Trick --- ## 2.5 ผลกระทบของพารามิเตอร์ γ ใน RBF Kernel
K
(
x
,
z
)
=
exp
(
-
γ
‖
x
-
z
‖
2
)
| ค่า γ | ผล | ความเสี่ยง | |-------|-----|-----------| | γ เล็กมาก | Boundary เรียบ อิทธิพลไกล | Underfitting | | γ เหมาะสม | สมดุล Bias-Variance | ดี | | γ ใหญ่มาก | Boundary ซับซ้อน อิทธิพลใกล้ | Overfitting | --- # 3. Non-linear SVM --- ## 3.1 แนวคิด Non-linear SVM **Non-linear SVM** ใช้ Kernel Trick แปลงปัญหา Non-linear ให้เป็น Linear ใน Feature Space มิติสูง ```mermaid %%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#282828', 'primaryTextColor': '#ebdbb2', 'primaryBorderColor': '#d79921', 'lineColor': '#d65d0e', 'background': '#1d2021', 'mainBkg': '#282828'}}}%% flowchart LR A["Input Space ℝⁿ
ข้อมูลดิบ x"] -->|"Kernel K(xᵢ,xⱼ)"| B["Dual Optimization
หา α"] B --> C["Decision Function
f(x) = Σ αᵢyᵢK(xᵢ,x)+b"] C --> D["Classification
y = sign(f(x))"] style A fill:#458588,color:#ebdbb2,stroke:#076678 style B fill:#d79921,color:#282828,stroke:#b57614 style C fill:#98971a,color:#ebdbb2,stroke:#79740e style D fill:#cc241d,color:#ebdbb2,stroke:#9d0006 ``` --- ## 3.2 Dual Formulation ของ SVM **Dual Problem** ของ Soft Margin SVM:
maximize
α
∑
i
=
1
n
α
i
-
1
2
∑
i
=
1
n
∑
j
=
1
n
α
i
α
j
y
i
y
j
K
(
x
i
,
x
j
)
เงื่อนไข: 0 ≤ αᵢ ≤ C และ Σαᵢyᵢ = 0 --- ## 3.2 Decision Function
f
(
x
)
=
∑
i
=
1
n
α
i
y
i
K
(
x
i
,
x
)
+
b
- αᵢ > 0 เฉพาะจุด **Support Vectors** เท่านั้น - การทำนายขึ้นอยู่กับ Support Vectors เท่านั้น → Memory Efficient --- ## 3.3 SVR — Support Vector Regression SVM ขยายไปงาน Regression ผ่าน **Support Vector Regression (SVR)**
ε-insensitive loss:
|
y
-
f
(
x
)
|
-
ε
ถ้า
|
y
-
f
(
x
)
|
>
ε
```python from sklearn.svm import SVR svr = SVR(kernel='rbf', C=100, gamma='scale', epsilon=10) svr.fit(X_train_s, y_train) print("R² Score:", svr.score(X_test_s, y_test)) ``` --- ## 3.4 Hyperparameter Tuning (GridSearchCV) ```python param_grid = { 'C': [0.1, 1, 10, 100], 'gamma': ['scale', 'auto', 0.001, 0.01, 0.1], 'kernel': ['rbf', 'poly'] } grid_search = GridSearchCV( SVC(probability=True), param_grid, cv=5, scoring='roc_auc', n_jobs=-1 ) grid_search.fit(X_train_s, y_train) print("Best Params:", grid_search.best_params_) print("Best CV AUC:", grid_search.best_score_) ``` --- ## 3.5 ผลกระทบของ C และ γ ```mermaid %%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#282828', 'primaryTextColor': '#ebdbb2', 'primaryBorderColor': '#d79921', 'lineColor': '#d65d0e', 'background': '#1d2021', 'mainBkg': '#282828'}}}%% graph TD subgraph C_EFFECT["ผลของ C (Regularization)"] C1["C เล็ก: Margin กว้าง → Underfitting"] C2["C เหมาะสม: สมดุล Bias-Variance"] C3["C ใหญ่: Margin แคบ → Overfitting"] C1 --> C2 --> C3 end subgraph G_EFFECT["ผลของ γ (RBF Kernel)"] G1["γ เล็ก: Boundary เรียบ → Underfitting"] G2["γ เหมาะสม: สมดุล"] G3["γ ใหญ่: Boundary ซับซ้อน → Overfitting"] G1 --> G2 --> G3 end style C1 fill:#cc241d,color:#ebdbb2 style C2 fill:#98971a,color:#ebdbb2 style C3 fill:#cc241d,color:#ebdbb2 style G1 fill:#cc241d,color:#ebdbb2 style G2 fill:#98971a,color:#ebdbb2 style G3 fill:#cc241d,color:#ebdbb2 ``` --- # 4. Multi-class Classification --- ## 4.1 ความท้าทายของการจำแนกหลายคลาส SVM ถูกออกแบบสำหรับ **Binary Classification (2 คลาส)** โดยธรรมชาติ | กลยุทธ์ | จำนวนโมเดล (K คลาส) | ข้อดี | ข้อเสีย | |---------|---------------------|-------|---------| | **OvR** | K โมเดล | เร็ว ประหยัด Memory | คลาส Imbalance | | **OvO** | K(K-1)/2 โมเดล | แม่นยำกว่า | ช้า โมเดลมาก | | **DAGSVM** | K(K-1)/2 โมเดล | ประสิทธิภาพดี | ซับซ้อน | | **Crammer-Singer** | 1 โมเดล | Principled | คำนวณยาก | --- ## 4.2 One-vs-Rest (OvR) Strategy **กระบวนการ:** 1. สำหรับคลาส k: Label คลาส k เป็น +1 คลาสอื่นเป็น -1 2. ฝึก K โมเดล 3. ทำนายจากคลาสที่ให้ค่า Decision Function สูงสุด
y
^
=
argmax
k
∈
{
1
,...,
K
}
f
k
(
x
)
--- ## 4.3 One-vs-One (OvO) Strategy ```mermaid %%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#282828', 'primaryTextColor': '#ebdbb2', 'primaryBorderColor': '#d79921', 'lineColor': '#d65d0e', 'background': '#1d2021', 'mainBkg': '#282828'}}}%% graph TD X["ข้อมูลใหม่ x"] --> M12["SVM(1 vs 2) → คลาส 1"] X --> M13["SVM(1 vs 3) → คลาส 3"] X --> M23["SVM(2 vs 3) → คลาส 3"] X --> M24["SVM(2 vs 4) → คลาส 2"] X --> M34["SVM(3 vs 4) → คลาส 3"] M12 --> VOTE["คะแนน Vote:
คลาส 1: 1, คลาส 2: 1
คลาส 3: 3 ⭐, คลาส 4: 0"] M13 --> VOTE M23 --> VOTE M24 --> VOTE M34 --> VOTE VOTE --> RESULT["ผล: คลาส 3"] style X fill:#458588,color:#ebdbb2 style VOTE fill:#d79921,color:#282828 style RESULT fill:#98971a,color:#ebdbb2 ``` --- ## 4.4 โค้ด Python: Multi-class SVM ```python from sklearn.svm import SVC from sklearn.multiclass import OneVsRestClassifier, OneVsOneClassifier # OvO (default ของ SVC) svm_ovo = SVC(kernel='rbf', C=10, gamma='scale', decision_function_shape='ovo') # OvR svm_ovr = SVC(kernel='rbf', C=10, gamma='scale', decision_function_shape='ovr') svm_ovo.fit(X_train_s, y_train) svm_ovr.fit(X_train_s, y_train) print("OvO Acc:", svm_ovo.score(X_test_s, y_test)) print("OvR Acc:", svm_ovr.score(X_test_s, y_test)) ``` --- ## 4.4 ผลการเปรียบเทียบ Multi-class (Iris) ``` Strategy Train Acc Test Acc CV Mean --------------------------------------------------------- OvO (default SVC) 1.0000 0.9778 0.9810 OvR (SVC) 1.0000 0.9778 0.9810 OvO (explicit) 1.0000 0.9778 0.9810 OvR (explicit) 1.0000 0.9778 0.9810 ตัวอย่างการทำนาย: [5.1, 3.5, 1.4, 0.2] → setosa [6.0, 2.7, 5.1, 1.6] → versicolor [6.9, 3.1, 5.4, 2.1] → virginica ``` --- ## 4.5 จำนวนโมเดล OvO vs OvR ```python K = 10 # จำนวนคลาส (Digits Dataset: 0-9) n_ovo = K * (K - 1) // 2 # = 45 โมเดล n_ovr = K # = 10 โมเดล # ผลการเปรียบเทียบบน Digits Dataset # OvO → Test Acc สูงกว่าเล็กน้อย # OvR → ฝึกเร็วกว่า ประหยัดหน่วยความจำ ``` - **K คลาส น้อย** → OvO ดีกว่า (ความแม่นยำ) - **K คลาส มาก** → OvR ดีกว่า (ความเร็ว) --- # 5. ประวัติศาสตร์และพัฒนาการของ SVM --- ## 5. ประวัติศาสตร์และพัฒนาการ ```mermaid %%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#282828', 'primaryTextColor': '#ebdbb2', 'primaryBorderColor': '#d79921', 'lineColor': '#d65d0e', 'background': '#1d2021', 'mainBkg': '#282828'}}}%% flowchart TD A1["1963 — Vapnik & Chervonenkis: VC Theory"] A2["1971 — Mercer's Theorem"] B1["1992 — Boser, Guyon, Vapnik: Hard Margin SVM + Kernel"] B2["1995 — Cortes & Vapnik: Soft Margin SVM (C-SVM)"] B3["1996 — Schölkopf: SVR และ ν-SVM"] C1["2001 — Platt Scaling: SVM → Probability"] C2["2004 — One-class SVM: Anomaly Detection"] C3["2008 — LIBSVM Library"] D1["2010s — Deep Learning เฟื่องฟู, SVM แข็งแกร่งใน Small Data"] D2["ปัจจุบัน — SVM + Deep Features"] A1 --> B1 A2 --> B1 B1 --> B2 --> B3 --> C1 --> C2 --> C3 --> D1 --> D2 style B1 fill:#282828,color:#ebdbb2,stroke:#458588 style B2 fill:#282828,color:#ebdbb2,stroke:#458588 style C3 fill:#282828,color:#ebdbb2,stroke:#98971a style D2 fill:#282828,color:#ebdbb2,stroke:#cc241d ``` --- # 6. ข้อดี ข้อเสีย และการเลือกใช้ SVM --- ## 6.1 ข้อดีของ SVM - **Theoretical Foundation แข็งแกร่ง** — มีทฤษฎี VC Dimension รองรับ - **High-dimensional Spaces** — ทำงานได้ดีเมื่อ Features > Samples - **Memory Efficient** — ใช้เฉพาะ Support Vectors ในการทำนาย - **Versatile** — เลือก Kernel ได้หลายแบบตามลักษณะข้อมูล - **Global Optimum** — Convex Optimization รับประกัน Global Optimum --- ## 6.2 ข้อเสียของ SVM - **Slow on Large Datasets** — ความซับซ้อน O(n²) ถึง O(n³) - **Sensitive to Feature Scaling** — ต้อง Normalize ก่อนเสมอ - **Kernel Selection ยาก** — ต้องเลือก Kernel และ Hyperparameters ระมัดระวัง - **No Direct Probability** — ต้องใช้ Platt Scaling เพิ่มเติม - **Hard to Interpret** — โมเดลซับซ้อน อธิบายยาก --- ## 6.3 แนวทางการเลือกใช้ SVM ```python def recommend_svm_config(n_samples, n_features, has_noise): if n_features > n_samples: kernel = 'linear' # High-dim: Linear เพียงพอ elif n_samples < 10000: kernel = 'rbf' # Small-Medium: RBF ดีที่สุด else: kernel = 'linear' # Large: Linear เร็วกว่า C_range = [0.1, 1, 10] if has_noise else [1, 10, 100] return kernel, C_range ``` --- ## สรุปภาพรวม SVM vs อัลกอริทึมอื่น | เกณฑ์ | SVM | Logistic Reg | Neural Net | Random Forest | |-------|-----|-------------|------------|---------------| | ข้อมูลขนาดเล็ก | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐ | ⭐⭐⭐ | | ข้อมูลขนาดใหญ่ | ⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | | High Dimension | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐ | | Noisy Data | ⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐ | | ความเร็วฝึก | ⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐ | | ตีความผล | ⭐⭐ | ⭐⭐⭐⭐ | ⭐ | ⭐⭐⭐ | --- ## สรุปความสัมพันธ์กับหัวข้ออื่น ```mermaid %%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#282828', 'primaryTextColor': '#ebdbb2', 'primaryBorderColor': '#d79921', 'lineColor': '#d65d0e', 'background': '#1d2021', 'mainBkg': '#282828'}}}%% graph LR LR["Logistic Regression
(สัปดาห์ 5-6)"] -->|"เพิ่ม Margin Max"| SVM DT["Decision Trees
(สัปดาห์ 7)"] -->|"Non-linear boundary"| SVM SVM["SVM
(สัปดาห์ 11)"] SVM -->|"Kernel → RKHS"| KM["Kernel Methods
Gaussian Processes"] SVM -->|"Soft Margin → Regularization"| LT["Learning Theory
(สัปดาห์ 14)"] SVM -->|"Feature Engineering"| DR["Dimensionality Reduction
(สัปดาห์ 13)"] style SVM fill:#d79921,color:#282828,stroke:#b57614 style LR fill:#458588,color:#ebdbb2 style DT fill:#458588,color:#ebdbb2 style KM fill:#98971a,color:#ebdbb2 style LT fill:#98971a,color:#ebdbb2 style DR fill:#98971a,color:#ebdbb2 ``` --- ## เอกสารอ้างอิง 1. Cortes & Vapnik (1995). Support-vector networks. *Machine Learning, 20*(3) 2. Boser, Guyon & Vapnik (1992). A training algorithm for optimal margin classifiers. *COLT* 3. Schölkopf & Smola (2002). *Learning with Kernels*. MIT Press 4. Chang & Lin (2011). LIBSVM. *ACM TIST, 2*(3) 5. Pedregosa et al. (2011). Scikit-learn. *JMLR, 12* 6. Bishop (2006). *Pattern Recognition and ML*. Springer. Ch.7 7. Murphy (2012). *Machine Learning: A Probabilistic Perspective*. MIT Press. Ch.14 8. scikit-learn SVM Guide: https://scikit-learn.org/stable/modules/svm.html --- # คำถาม - ข้อสงสัย