Skip to content
/ MLR Public

a Multiple Linear Regression tool written in python

Notifications You must be signed in to change notification settings

hurulu/MLR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Multiple Linear Regression tool written in Python

Prerequisites:
1, python(>=2.6.6 recommended) with numpy (>=1.6.1 recommended)
2, a web server needed to use web interface index.php

The tool is based on a equation like y=a1*x1+a2*x2+a3*x3+...+b. When given an array of x1,x2...xn and y,the tool can work out the a1,a2,...an,b and R2 as well.

For example,the sample input data is stored in a text file sampledata.txt.

cat sampledata.txt

2310 2 2 20 142000 
2333 2 2 12 144000 
2356 3 1.5 33 151000 
2379 3 2 43 150000 
2402 2 3 53 139000 
2425 4 2 23 169000 
2448 2 1.5 99 126000 
2471 2 2 34 142900 
2494 3 3 23 163000 
2517 4 4 55 169000 
2540 2 3 22 149000 

./mlr.py sampledata.txt

and its output will be:

y=27.641387366*x1+12529.7681671*x2+2553.21066039*x3+-234.237164471*x4+52317.8305073
R2=0.996748

If you want to use it through web, put MLR to your www document root directory (like apache/htdocs/) and then visit http://yourwebserver/MLR/index.php  

About

a Multiple Linear Regression tool written in python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published