Files
maths-cs-ai-compendium-zh/images/svm_margin.svg
T
flykhan 2536c937e3 feat: 完整中文翻译 maths-cs-ai-compendium(数学·计算机科学·AI 知识大全)
翻译自英文原版 maths-cs-ai-compendium,共 20 章全部完成。

第01章 向量 | 第02章 矩阵 | 第03章 微积分
第04章 统计学 | 第05章 概率论 | 第06章 机器学习
第07章 计算语言学 | 第08章 计算机视觉 | 第09章 音频与语音
第10章 多模态学习 | 第11章 自主系统 | 第12章 图神经网络
第13章 计算与操作系统 | 第14章 数据结构与算法
第15章 生产级软件工程 | 第16章 SIMD与GPU编程
第17章 AI推理 | 第18章 ML系统设计
第19章 应用人工智能 | 第20章 前沿人工智能

翻译说明:
- 所有数学公式 $...$ / $$...$$、代码块、图片引用完整保留
- mkdocs.yml 配置中文导航 + language: zh
- README.md 已翻译为中文(兼 docs/index.md)
- docs/ 目录包含指向各章文件的 symlink
- 约 29,000 行中文内容,排除 .cache/ 构建缓存
2026-05-03 10:23:20 +08:00

72 lines
4.2 KiB
XML

<svg width="700" height="320" xmlns="http://www.w3.org/2000/svg">
<text x="350" y="22" fill="#333" font-size="14" font-weight="bold" text-anchor="middle">SVM: Maximum-Margin Hyperplane</text>
<!-- Axes -->
<line x1="60" y1="275" x2="640" y2="275" stroke="#333" stroke-width="1.5"/>
<line x1="60" y1="275" x2="60" y2="40" stroke="#333" stroke-width="1.5"/>
<text x="350" y="298" fill="#666" font-size="11" text-anchor="middle">x₁</text>
<text x="35" y="155" fill="#666" font-size="11" text-anchor="middle" transform="rotate(-90,35,155)">x₂</text>
<!-- Margin band -->
<polygon points="235,40 305,40 505,275 435,275" fill="#9b59b6" opacity="0.08"/>
<!-- Decision boundary (hyperplane) -->
<line x1="270" y1="40" x2="470" y2="275" stroke="#9b59b6" stroke-width="2.5"/>
<text x="395" y="130" fill="#9b59b6" font-size="11" font-weight="bold" transform="rotate(45,395,130)">w·x + b = 0</text>
<!-- Positive margin -->
<line x1="305" y1="40" x2="505" y2="275" stroke="#9b59b6" stroke-width="1.2" stroke-dasharray="5,4"/>
<text x="440" y="108" fill="#9b59b6" font-size="9" transform="rotate(45,440,108)">w·x + b = +1</text>
<!-- Negative margin -->
<line x1="235" y1="40" x2="435" y2="275" stroke="#9b59b6" stroke-width="1.2" stroke-dasharray="5,4"/>
<text x="310" y="172" fill="#9b59b6" font-size="9" transform="rotate(45,310,172)">w·x + b = -1</text>
<!-- Margin width indicator -->
<line x1="320" y1="85" x2="285" y2="85" stroke="#9b59b6" stroke-width="1"/>
<line x1="320" y1="80" x2="320" y2="90" stroke="#9b59b6" stroke-width="1"/>
<line x1="285" y1="80" x2="285" y2="90" stroke="#9b59b6" stroke-width="1"/>
<text x="302" y="78" fill="#9b59b6" font-size="9" text-anchor="middle">margin</text>
<!-- Class +1 points (blue circles, right side) -->
<circle cx="380" cy="80" r="5" fill="#3498db" opacity="0.7"/>
<circle cx="420" cy="100" r="5" fill="#3498db" opacity="0.7"/>
<circle cx="450" cy="65" r="5" fill="#3498db" opacity="0.7"/>
<circle cx="480" cy="120" r="5" fill="#3498db" opacity="0.7"/>
<circle cx="500" cy="80" r="5" fill="#3498db" opacity="0.7"/>
<circle cx="530" cy="140" r="5" fill="#3498db" opacity="0.7"/>
<circle cx="550" cy="95" r="5" fill="#3498db" opacity="0.7"/>
<circle cx="460" cy="150" r="5" fill="#3498db" opacity="0.7"/>
<circle cx="510" cy="55" r="5" fill="#3498db" opacity="0.7"/>
<circle cx="580" cy="110" r="5" fill="#3498db" opacity="0.7"/>
<!-- Class -1 points (red squares, left side) -->
<rect x="97" y="145" width="10" height="10" fill="#e74c3c" opacity="0.7"/>
<rect x="117" y="175" width="10" height="10" fill="#e74c3c" opacity="0.7"/>
<rect x="137" y="120" width="10" height="10" fill="#e74c3c" opacity="0.7"/>
<rect x="157" y="200" width="10" height="10" fill="#e74c3c" opacity="0.7"/>
<rect x="177" y="160" width="10" height="10" fill="#e74c3c" opacity="0.7"/>
<rect x="197" y="230" width="10" height="10" fill="#e74c3c" opacity="0.7"/>
<rect x="130" y="215" width="10" height="10" fill="#e74c3c" opacity="0.7"/>
<rect x="175" y="245" width="10" height="10" fill="#e74c3c" opacity="0.7"/>
<rect x="100" y="195" width="10" height="10" fill="#e74c3c" opacity="0.7"/>
<!-- Support vectors (highlighted) -->
<circle cx="345" cy="115" r="5" fill="#3498db" opacity="0.7"/>
<circle cx="345" cy="115" r="9" fill="none" stroke="#3498db" stroke-width="2"/>
<circle cx="385" cy="165" r="5" fill="#3498db" opacity="0.7"/>
<circle cx="385" cy="165" r="9" fill="none" stroke="#3498db" stroke-width="2"/>
<rect x="237" y="178" width="10" height="10" fill="#e74c3c" opacity="0.7"/>
<rect x="233" y="174" width="18" height="18" fill="none" stroke="#e74c3c" stroke-width="2" rx="2"/>
<rect x="257" y="218" width="10" height="10" fill="#e74c3c" opacity="0.7"/>
<rect x="253" y="214" width="18" height="18" fill="none" stroke="#e74c3c" stroke-width="2" rx="2"/>
<!-- Legend -->
<circle cx="195" cy="310" r="4" fill="#3498db"/>
<text x="210" y="314" fill="#666" font-size="10">Class +1</text>
<rect x="270" y="306" width="8" height="8" fill="#e74c3c"/>
<text x="288" y="314" fill="#666" font-size="10">Class -1</text>
<circle cx="375" cy="310" r="5" fill="none" stroke="#333" stroke-width="1.5"/>
<text x="390" y="314" fill="#666" font-size="10">Support vectors (on margin)</text>
</svg>