Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions docs/gaussian_mixture.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_)
```
11 changes: 7 additions & 4 deletions ignore_users.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[
"Haidong Wang",
"donghaiwang",
"whd@hutb.edu.cn"
]
{
"name": "Haidong Wang",
"github": "donghaiwang",
"email": "whd@hutb.edu.cn",
"role": "author"
}
]
15 changes: 11 additions & 4 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
[pytest]
# 测试文件匹配规则
python_files = test_*.py *_test.py
python_classes = Test*
python_functions = test_*

# Ignore heavy integration tests
# 只运行轻量级测试
testpaths =
tests

# 忽略需要模拟器环境的重型集成测试
norecursedirs =
src/airsim_control
src/automatic_drive_deep_learning
Expand All @@ -12,6 +20,5 @@ norecursedirs =
src/lane_path_detection
src/uav_navigation

# Only run lightweight tests
testpaths =
tests
# 输出配置
addopts = -v --tb=short