如何在Python中创建一个执行excel解算器功能的函数 [英] How to make a function in Python that does what excel's solver does

查看:93
本文介绍了如何在Python中创建一个执行excel解算器功能的函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在python中构建一个可用于应用预测模型的函数。



我试图使用Winter的指数平滑模型为了预测可能受季节影响的冰淇淋店的销售。



我最初使用Excel的求解器以最小化平均绝对百分比误差并找到找出最佳解决方案。



这是使用Excel求解器创建的结果。任何人都知道如何在python中创建一个函数吗?

http://i.stack.imgur.com/xaU81.jpg

以上是指向图片结果



非常感谢你!




我试过的:



我试过写一个算法,但很难想出那个做excel解算器能做的事情

I want to build a function in python that can be used to apply a forecasting model.

I am trying to use Winter's exponential smoothing model in order to predict the sales of an ice cream store, which can be affected by season.

I originally used Excel's solver in order to minimize the mean absolute percentage error and find out the optimal solution.

Here is the result that was created by using Excel's solver. Anyone knows how to make a function in python that does this?
http://i.stack.imgur.com/xaU81.jpg
Above is the link to the image result

thank you very much!


What I have tried:

I have tried to write an algorithm but it was hard to come up with the one that does what excel's solver can do

推荐答案

请参阅 this [ ^ ]最近回答同一个问题。
See this[^] very recent answer to the same question.


这篇关于如何在Python中创建一个执行excel解算器功能的函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆