From 998a705b341a9483174a4418f5f7cd62e7e204ab Mon Sep 17 00:00:00 2001 From: Xcreate672 <3534270192@qq.com> Date: Sat, 6 Jun 2026 15:51:33 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=94=B9=E6=88=90=E5=AF=B9=E8=B1=A1?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=20Update=20ignore=5Fusers.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 改成对象格式 --- ignore_users.json | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ignore_users.json b/ignore_users.json index ed695fe839..584595373e 100644 --- a/ignore_users.json +++ b/ignore_users.json @@ -1,5 +1,8 @@ [ - "Haidong Wang", - "donghaiwang", - "whd@hutb.edu.cn" -] \ No newline at end of file + { + "name": "Haidong Wang", + "github": "donghaiwang", + "email": "whd@hutb.edu.cn", + "role": "author" + } +] From 97797c0c66da04312ff80b24a22c7732fdd6253e Mon Sep 17 00:00:00 2001 From: Xcreate672 <3534270192@qq.com> Date: Tue, 9 Jun 2026 15:10:59 +0800 Subject: [PATCH 2/3] =?UTF-8?q?Update=20gaussian=5Fmixture.md=E8=A1=A5?= =?UTF-8?q?=E5=85=85=E9=AB=98=E6=96=AF=E6=B7=B7=E5=90=88=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E5=85=AC=E5=BC=8F=E4=B8=8E=E4=BB=A3=E7=A0=81=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 补充高斯混合模型公式与代码示例 --- docs/gaussian_mixture.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/docs/gaussian_mixture.md b/docs/gaussian_mixture.md index 4f2ea7cbce..5bc0e45fb0 100644 --- a/docs/gaussian_mixture.md +++ b/docs/gaussian_mixture.md @@ -44,3 +44,34 @@ - 异常检测 - 图像分割 - 语音识别 +- +## 数学公式 + +GMM 的概率密度函数为: + +`p(x) = Σ π_k * N(x | μ_k, Σ_k)` + +其中: +- K 为高斯成分数量 +- π_k 为第 k 个成分的混合权重,满足 Σπ_k = 1 +- N(x | μ_k, Σ_k) 为第 k 个高斯分布 + +## 代码示例 + +使用 scikit-learn 拟合高斯混合模型: + +```python +from sklearn.mixture import GaussianMixture +import numpy as np + +# 生成示例数据 +X = np.random.randn(300, 2) + +# 创建并训练模型 +gmm = GaussianMixture(n_components=3, random_state=0) +gmm.fit(X) + +# 预测类别 +labels = gmm.predict(X) +print("各成分权重:", gmm.weights_) +``` From 785fb2c1c2690ec0db1f8810415d8191fb4ff719 Mon Sep 17 00:00:00 2001 From: Xcreate672 <3534270192@qq.com> Date: Wed, 10 Jun 2026 23:05:40 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=A1=A5=E5=85=85=E7=83=AD=E8=BA=AB?= =?UTF-8?q?=E7=A4=BA=E4=BE=8B=E9=A2=84=E6=9C=9F=E8=BE=93=E5=87=BA=E4=B8=8E?= =?UTF-8?q?=E5=B8=B8=E8=A7=81=E9=97=AE=E9=A2=98=20Update=20warmup.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 补充热身示例预期输出与常见问题 --- docs/warmup.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/warmup.md b/docs/warmup.md index 95aa32aa8d..5c7803a2d4 100644 --- a/docs/warmup.md +++ b/docs/warmup.md @@ -33,3 +33,27 @@ python src/chap01_warmup/numpy_tutorial.py ## 完整代码 [完整代码](https://github.com/OpenHUTB/nn/blob/main/src/chap01_warmup/numpy_tutorial.py) + +## 预期输出 + +运行后终端会依次输出: +数组形状: (5,) +矩阵乘法结果: [[19 22] [43 50]] +切片结果: [2 3 4] +同时弹出 sin(x) 函数图像窗口。 + +## 常见问题 + +**Q:运行报错 `ModuleNotFoundError: No module named 'numpy'`** + +执行以下命令安装依赖: +```bash +pip install numpy matplotlib +``` + +**Q:图像窗口不弹出** + +在代码末尾将 `plt.show()` 改为: +```python +plt.savefig('output.png') +```