修改--修改文档
This commit is contained in:
parent
11b8eb53a5
commit
ab6b147486
@ -106,6 +106,59 @@ NASA Turbofan Engine Degradation Simulation数据集(通常称为C-MAPSS数据
|
||||
- R²值为0.445表示模型仅能解释目标变量约44.5%的变异性
|
||||
- 超过55%的变异性未被模型捕获,说明初始模型拟合效果不佳
|
||||
|
||||
**模型优化方法**
|
||||
```json
|
||||
{
|
||||
"status": "success",
|
||||
"methods": [
|
||||
{
|
||||
"name": "GridSearchCV",
|
||||
"description": "网格搜索交叉验证,通过穷举搜索指定参数网格中的所有可能组合,找到最优参数。",
|
||||
},
|
||||
{
|
||||
"name": "RandomizedSearchCV",
|
||||
"description": "随机搜索交叉验证,从指定的分布中随机采样参数组合进行评估,而非穷举所有可能。",
|
||||
},
|
||||
{
|
||||
"name": "BayesianOptimization",
|
||||
"description": "贝叶斯优化,基于先验观测构建代理模型(通常是高斯过程),指导后续参数搜索方向。",
|
||||
},
|
||||
{
|
||||
"name": "HyperOpt",
|
||||
"description": "基于贝叶斯优化和树结构Parzen估计器(TPE)的超参数优化库,支持复杂搜索空间定义。",
|
||||
},
|
||||
{
|
||||
"name": "Optuna",
|
||||
"description": "现代超参数优化框架,结合多种采样算法和修剪机制,高效搜索最优参数。",
|
||||
},
|
||||
{
|
||||
"name": "BOHB",
|
||||
"description": "结合贝叶斯优化和Hyperband的多保真度优化算法,平衡探索与利用。",
|
||||
},
|
||||
{
|
||||
"name": "GeneticAlgorithm",
|
||||
"description": "基于进化理论的优化算法,通过选择、交叉和变异操作迭代优化参数。",
|
||||
},
|
||||
{
|
||||
"name": "ParticleSwarmOptimization",
|
||||
"description": "基于群体智能的优化算法,模拟鸟群觅食行为,通过粒子间信息共享寻找最优解。",
|
||||
},
|
||||
{
|
||||
"name": "EarlyStopping",
|
||||
"description": "提前停止策略,监控模型在验证集上的性能,当性能不再提升时停止训练,防止过拟合。",
|
||||
},
|
||||
{
|
||||
"name": "LearningRateScheduler",
|
||||
"description": "学习率调度器,根据预定策略或模型性能动态调整优化器的学习率。",
|
||||
},
|
||||
{
|
||||
"name": "ModelCheckpoint",
|
||||
"description": "模型检查点,定期保存训练过程中的模型状态,确保能够恢复最佳模型。",
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
**参数优化**:
|
||||
RandomForestRegressor使用GridSearchCV进行超参数调优,探索以下参数组合(共1296种组合):
|
||||
|
||||
@ -119,6 +172,39 @@ RandomForestRegressor使用GridSearchCV进行超参数调优,探索以下参
|
||||
| bootstrap | true, false |
|
||||
| criterion | "squared_error", "absolute_error" |
|
||||
|
||||
**计算机配置**
|
||||
- CPU: 12th Gen Intel(R) Core(TM) i5-12600KF
|
||||
- 内存: 32G ddr4 3200
|
||||
- GPU: NVIDIA GeForce RTX 3060 12G
|
||||
|
||||
|
||||
**优化结果**:
|
||||
- 共计1296种优化组合,每种组合耗时越30s,共耗时越11小时.随着搜索项数的增多,模型优化的时间成倍数增长.建议只在网格数较少时使用网格搜索.
|
||||
```json
|
||||
{
|
||||
"metrics": {
|
||||
"mae": 34.21,
|
||||
"mse": 2156.74,
|
||||
"rmse": 46.44,
|
||||
"r2": 0.633,
|
||||
"explained_variance": 0.445
|
||||
}
|
||||
}
|
||||
```
|
||||
**最优参数**
|
||||
```json
|
||||
{
|
||||
"n_estimators": 200,
|
||||
"max_depth": 20,
|
||||
"min_samples_split": 5,
|
||||
"max_depth": 15,
|
||||
"min_samples_leaf": 20,
|
||||
"max_features": "sqrt",
|
||||
"bootstrap": true,
|
||||
"criterion": "squared_error"
|
||||
}
|
||||
```
|
||||
|
||||
#### 1.3.3 其他回归模型
|
||||
|
||||
同样的方法也应用于XGBRegressor、LGBMRegressor和AdaBoostRegressor模型训练与优化。
|
||||
@ -127,12 +213,12 @@ RandomForestRegressor使用GridSearchCV进行超参数调优,探索以下参
|
||||
|
||||
下表展示了四种模型在涡扇发动机剩余寿命预测任务上的性能:
|
||||
|
||||
| 模型 | MAE | MSE | RMSE | R² | 训练时间(s) |
|
||||
| 模型 | MAE | MSE | RMSE | R² | 训练时间(一次, s) |
|
||||
|------|-----|-----|------|---|------------|
|
||||
| RandomForestRegressor | 34.21 | 2156.74 | 46.44 | 0.63 | 15.3 |
|
||||
| XGBRegressor | 31.84 | 1836.25 | 42.85 | 0.68 | 24.6 |
|
||||
| LGBMRegressor | 30.56 | 1783.42 | 42.23 | 0.69 | 18.2 |
|
||||
| AdaBoostRegressor | 42.78 | 3125.67 | 55.91 | 0.47 | 11.4 |
|
||||
| RandomForestRegressor | 34.21 | 2156.74 | 46.44 | 0.63 | 30 |
|
||||
| XGBRegressor | 31.84 | 1836.25 | 42.85 | 0.68 | 54.6 |
|
||||
| LGBMRegressor | 30.56 | 1783.42 | 42.23 | 0.69 | 158.2 |
|
||||
| AdaBoostRegressor | 42.78 | 3125.67 | 55.91 | 0.47 | 111.4 |
|
||||
|
||||
**综合分析**:
|
||||
- LGBMRegressor模型在本任务中表现最佳,R²达到0.69,RMSE为42.23
|
||||
|
||||
Loading…
Reference in New Issue
Block a user