File:Linear regression.svg

來自Wikimedia Commons
跳去導覽 跳去搵嘢

原本檔案 (SVG檔案,表面大細: 438 × 289 像素,檔案大細:71 KB)

Captions

Captions

Add a one-line explanation of what this file represents
A straight line with y-intercept 5 fitted to datapoints

摘要

[編輯]
 
This diagram was created with SageMath.
描述
English: Random data points and their linear regression. Created with the following Sage (http://sagemath.org) commands:
X = RealDistribution('uniform', [-20, 60])

Y = RealDistribution('gaussian', 1.5)

f(x) = 3*x/20 + 5

xvals = [X.get_random_element() for _ in range(100)]

data = [(x, f(x) + Y.get_random_element()) for x in xvals]

m, b = var('m b')

g(x) = m*x + b

g(x) = g(x).subs(find_fit(data, g, solution_dict=True))

p = list_plot(data) + plot(g, (x, -20, 60), color='red')

p.save('linear_regression.svg')
日期
來源 自己作品
作者 Sewaqu
Other versions Derivative works of this file:  Sedm zakladnich nastroju zlepsovani kvality cz.svg

協議

[編輯]
Public domain I, the copyright holder of this work, release this work into the public domain. This applies worldwide.
In some countries this may not be legally possible; if so:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.

檔案歷史

撳個日期/時間去睇響嗰個時間出現過嘅檔案。

日期/時間縮圖尺寸用戶註解
現時2016年3月31號 (四) 10:42響2016年3月31號 (四) 10:42嘅縮圖版本438 × 289(71 KB)RaphaelQS傾偈 | 貢獻transparent background
2010年11月5號 (五) 03:18響2010年11月5號 (五) 03:18嘅縮圖版本438 × 289(42 KB)Sewaqu傾偈 | 貢獻{{Information |Description={{en|1=Random data points and their linear regression. Created with the following Sage (http://sagemath.org) commands: X = RealDistribution('uniform', [-20, 60]) Y = RealDistribution('gaussian', 1.5) f(x) = 3*x/20 + 5 xvals

全域檔案使用情況

下面嘅維基都用緊呢個檔案:

睇呢個檔案嘅更多全域使用情況

Metadata