Linear Regression
2024-08-22 15:03:53
大学时候学物理实验的时候接触过线性回归,现在忘记了...还得重新拾起来。学习不扎实耽误了多少时光... sigh
Suppose that you time a program as a function of N and produce
the following table. N seconds
-------------------
64 0.000
128 0.001
256 0.010
512 0.083
1024 0.698
2048 5.742
4096 48.346
8192 401.315
16384 3366.172 Estimate the order of growth of the running time as a function of N.
Assume that the running time obeys a power law T(N) ~ a N^b. For your
answer, enter the constant b. Your answer will be marked as correct
if it is within 1% of the target answer - we recommend using
two digits after the decimal separator, e.g., 2.34.
已知一组数据,N和seconds, 求T(n)中的b。
方法是两边先取对数,这样造成 log(T(n)) = log(a) + b * log(n), 这样就完成了一个斜率b的线性函数。我们用一般的线性回归就可以解出b和a。
Reference:
https://en.wikipedia.org/wiki/Regression_analysis
最新文章
- HTML5入门(---------------HTML——基本骨架--------------)
- 数据结构图文解析之:栈的简介及C++模板实现
- 同态加密-Homomorphic encryption
- EditorWindow简单双击效果
- java 笔记(2) —— 内部类的作用
- 学习jsp(3)
- 215. Kth Largest Element in an Array
- 不要停留在表面,MVC 3 我们要深入一些
- java代码整理---正则表达式
- T-SQL语言基础
- HDNOIP201206施工方案
- 在Raspberry上使用小度WIFI
- Arcengine 开发,FeatureClass新增feature时“The Geometry has no z-value”或";The Geometry has null z-value";的解决方案
- CentOS 7 服务器配置--安装Mysql
- 《ASP.NET Core In Action》读书笔记系列四 创建ASP.NET Core 应用步骤及相应CLI命令
- 工具 - 怎么看微信h5的源码?
- .Net文件压缩
- python网页爬虫小项目开发
- 你所不了解的javascript操作DOM的细节知识点(一)
- 10个非常炫酷的jQuery相册动画赏析