如何根据定量数据、Excel、趋势线、蒙特卡罗模拟确定执行时间公式

发布于 2024-07-27 14:47:07 字数 1014 浏览 8 评论 0原文

我可以得到你关于一些数学和 Excel 的帮助吗?

我对我的应用程序进行了基准测试,增加了迭代次数和记录以秒为单位的时间的义务人数量,结果如下:

        200 400 600 800 1000    1200    1400    1600    1800    2000
20000   15.627681   30.0968663  44.7592684  60.9037558  75.8267358  90.3718977  105.8749983 121.0030672 135.9191249 150.3331682
40000   31.7202111  62.3603882  97.2085204  128.8111731 156.2443206 186.6374271 218.324317  249.2699288 279.6008184 310.9970803
60000   47.0708635  92.4599437  138.874287  186.0576007 231.2181381 280.541207  322.9836878 371.3076757 413.4058622 459.6208335
80000   60.7346238  120.3216303 180.471169  241.668982  300.4283548 376.9639188 417.5231669 482.6288981 554.9740194 598.0394434
100000  76.7535915  150.7479245 227.5125656 304.3908046 382.5900043 451.6034296 526.0730786 609.0358776 679.0268121 779.6887277
120000  90.4174626  179.5511355 269.4099593 360.2934453 448.4387573 537.1406039 626.7325734 727.6132992 807.4767327 898.307638

我现在如何提出一个 T(以秒为单位的时间)函数作为义务人 O 数量的表达式和迭代次数,

谢谢

Can I get your help on some Maths and possibly Excel?

I have benchmarked my app increasing the number of iterations and number of obligors recording the time taken in seconds with the following result:

        200 400 600 800 1000    1200    1400    1600    1800    2000
20000   15.627681   30.0968663  44.7592684  60.9037558  75.8267358  90.3718977  105.8749983 121.0030672 135.9191249 150.3331682
40000   31.7202111  62.3603882  97.2085204  128.8111731 156.2443206 186.6374271 218.324317  249.2699288 279.6008184 310.9970803
60000   47.0708635  92.4599437  138.874287  186.0576007 231.2181381 280.541207  322.9836878 371.3076757 413.4058622 459.6208335
80000   60.7346238  120.3216303 180.471169  241.668982  300.4283548 376.9639188 417.5231669 482.6288981 554.9740194 598.0394434
100000  76.7535915  150.7479245 227.5125656 304.3908046 382.5900043 451.6034296 526.0730786 609.0358776 679.0268121 779.6887277
120000  90.4174626  179.5511355 269.4099593 360.2934453 448.4387573 537.1406039 626.7325734 727.6132992 807.4767327 898.307638

How can I now come up with a function for T (time taken in seconds) as an expression of number of obligors O and number of iterations I

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

香橙ぽ 2024-08-03 14:47:07

由于问题的构建/演示,我不太确定所涉及的数据。

假设您正在寻找y = f(x)。 如果将数据加载到 Excel 中,则可以在数据范围上使用方法 SLOPEINTERCEPT 来导出该形式的表达式,

y = mx+c

从而导出线性函数。

如果您想要二次或三次,您可以使用 LINEST 和一列时间数据的平方/立方等来为您提供二次/三次参数,从而导出适当的高阶函数。

I'm not quite sure of the data involved due to the question construction/presentation.

Assuming you're looking for y = f(x). If you load the data into Excel, you can use the methods SLOPE and INTERCEPT on the data ranges to derive an expression of the form

y = mx+c

and thus a linear function.

If you want a quadratic or cubic, you can use LINEST with a column of time data squared/cubed etc. to give you quadratic/cubic parameters, and thus derive an appropriate higher order function.

雨后彩虹 2024-08-03 14:47:07

这里对一位量化者来说,函数是 T = KNO,其中 T 是时间,K 是某个常数,N 次迭代,O 义务人。

重新排列 K = T/(NO),将其插入我的样本数据中,取所有样本点的平均值,使用标准偏差作为

我为数据所做的错误,并得到:

T = 3.81524E-06 * N * O(误差为 1.9%),这是一个非常好的近似值。

Spoke to one of the quants here the function is of the from T = KNO, where T is time, K some constant, N iterations, O obligors.

Rearrange for K = T/(NO), plug this into my sample data, take the average of all sample points, use the Std dev for the error

I did this for my data and get:

T = 3.81524E-06 * N * O (with 1.9% error), this is a pretty good approximation.

送君千里 2024-08-03 14:47:07

在 Excel 中创建图表,添加趋势线,然后选择将方程显示在图表上。

Create a chart in Excel, add a trendline, and select to have the equation displayed on the chart.

哀由 2024-08-03 14:47:07

澄清一下:您有表格数据,您想将其拟合到某个函数 f(O,I)=t 中?

        200          400         600         800         1000        1200        1400        1600        1800        2000
20000   15.627681   30.0968663  44.7592684  60.9037558  75.8267358  90.3718977  105.8749983 121.0030672 135.9191249 150.3331682
40000   31.7202111  62.3603882  97.2085204  128.8111731 156.2443206 186.6374271 218.324317  249.2699288 279.6008184 310.9970803
60000   47.0708635  92.4599437  138.874287  186.0576007 231.2181381 280.541207  322.9836878 371.3076757 413.4058622 459.6208335
80000   60.7346238  120.3216303 180.471169  241.668982  300.4283548 376.9639188 417.5231669 482.6288981 554.9740194 598.0394434
100000  76.7535915  150.7479245 227.5125656 304.3908046 382.5900043 451.6034296 526.0730786 609.0358776 679.0268121 779.6887277
120000  90.4174626  179.5511355 269.4099593 360.2934453 448.4387573 537.1406039 626.7325734 727.6132992 807.4767327 898.307638

粗略的猜测看起来像 O & 。 我是线性的。 所以 f 的形式为 t = aO + bI + c。 插入几个 (O,I,t) 并看看 a,b,c 应该是什么。

To clarify: You have tabular data below which you want to fit to some function f(O,I)=t?

        200          400         600         800         1000        1200        1400        1600        1800        2000
20000   15.627681   30.0968663  44.7592684  60.9037558  75.8267358  90.3718977  105.8749983 121.0030672 135.9191249 150.3331682
40000   31.7202111  62.3603882  97.2085204  128.8111731 156.2443206 186.6374271 218.324317  249.2699288 279.6008184 310.9970803
60000   47.0708635  92.4599437  138.874287  186.0576007 231.2181381 280.541207  322.9836878 371.3076757 413.4058622 459.6208335
80000   60.7346238  120.3216303 180.471169  241.668982  300.4283548 376.9639188 417.5231669 482.6288981 554.9740194 598.0394434
100000  76.7535915  150.7479245 227.5125656 304.3908046 382.5900043 451.6034296 526.0730786 609.0358776 679.0268121 779.6887277
120000  90.4174626  179.5511355 269.4099593 360.2934453 448.4387573 537.1406039 626.7325734 727.6132992 807.4767327 898.307638

A rough guess looks like both O & I are linear. So f is in the form t = aO + bI + c. Plug in a few (O,I,t) and see what a,b,c should be.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文