预测模型、目标函数和优化 [英] Prediction models, Objective functions and Optimization
问题描述
在 Python 中使用 pyomo 进行优化时,我们如何定义目标函数.我们分别定义了预测模型.下一步是从预测模型(梯度提升、随机森林、线性回归等)中引入目标函数并进行优化以实现最大和最小优化.请建议并分享pyomo中的任何工作示例.
How do we define objective functions while doing optimization using pyomo in Python. We have defined Prediction models separately. Next step is to bring objective functions from prediction models (Gradient boosting, Random forest , Linear regression and others) and optimize to achieve maximum and minimum optimization. please suggest and share any working example in pyomo.
推荐答案
由于 Pyomo 使用代数表达式,您应该:
Due to Pyomo use algebraic expression you should:
- 定义预测模型函数的数学表达式.
- 在 Pyomo 中实现正确的数学模型,包括所需的参数、变量和其他约束.
- 应用最小值 - 最大值
您可以进行如下循环:
预测模型函数 ->最小-最大细化 ->预测模型函数调整->最小-最大细化 ->...
Prediction model function -> Min-max refinement -> Prediction model function adjustment -> Min-max refinement -> ...
您需要多次达到预期的准确度.API 连接和多线程实现可以工作.
As many times you need to reach yor expected accuracy. API connection and multi-thread implementation could work.
这篇关于预测模型、目标函数和优化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!