File:LinearRegression.svg

From Wikipedia, the free encyclopedia
Jump to: navigation, search
LinearRegression.svg(SVG file, nominally 600 × 480 pixels, file size: 41 KB)
Description

Illustration of linear regression on a data set.

Date

24 June 2007(2007-06-24)

Source

self-made in Gnuplot.

Author

Berland

Permission
(Reusing this file)
See below.
Other versions

[edit] Gnuplot source code

set terminal svg fname "Helvetica" fsize 25
set output "LinearRegression.svg"
set key left
set xtics axis 4.0,0.5
set ytics nomirror 1
set border 2
f(x) = a*x + b
fit f(x) 'randpts' using 1:2 via a,b
set yrange [-0.9:4]
plot 'randpts' with points pointtype 7 pointsize 0.3 title 'Datapoints', \
        f(x) with lines linetype 3 linewidth 3 title 'Regression',  \
        0 with lines linetype -1 notitle

The datafile 'randpts' was made in GNU Octave using the commands

f = fopen('randpts', 'w');
for i=1:200; 
   x=rand(1); 
   y=0.2*randn(1) + 3*x + 0.35; 
   fprintf(f, '%g %g\n', x, y); 
end
fclose(f)

(identical code also works in Matlab.)

[edit] Licensing

Public domain This work has been released into the public domain by its author, I, Berland. This applies worldwide.
In some countries this may not be legally possible; if so:
I, Berland grants anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current12:50, 28 October 2008Thumbnail for version as of 12:50, 28 October 2008600 × 480 (41 KB)F l a n k e r (Reverted to version as of 10:01, 28 October 2008)
10:16, 28 October 2008Thumbnail for version as of 10:16, 28 October 2008600 × 480 (42 KB)F l a n k e r (Using Helvetica as the font)
10:13, 28 October 2008Thumbnail for version as of 10:13, 28 October 2008600 × 480 (42 KB)F l a n k e r (Using Helvetica as the font)
10:01, 28 October 2008Thumbnail for version as of 10:01, 28 October 2008600 × 480 (41 KB)F l a n k e r (Tring to resolve)
09:30, 28 October 2008Thumbnail for version as of 09:30, 28 October 2008600 × 480 (23 KB)Wiso ({{Information |Description= |Source= |Date= |Author= |Permission= |other_versions= }})
20:57, 25 June 2007Thumbnail for version as of 20:57, 25 June 2007600 × 480 (20 KB)Berland ({{Information |Description=Illustration of linear regression on a data set. |Source=self-made in Gnuplot. |Date=24 June 2007 |Author= Berland }} ==Gnuplot source code== set terminal svg fname "Helvetic)
18:56, 24 June 2007Thumbnail for version as of 18:56, 24 June 2007600 × 480 (19 KB)Berland ({{Information |Description=Illustration of linear regression on a data set. |Source=self-made in Gnuplot. |Date=24 June 2007 |Author= Berland }} ==Gnuplot source code== set terminal svg fname "Helvetic)
No pages on the English Wikipedia link to this file. (Pages on other projects are not counted.)

Global file usage

The following other wikis use this file:

Metadata

Personal tools
Namespaces
Variants
Views
Actions
Navigation
Interaction
Toolbox