Skip to content
/ fastreg Public
forked from ajferraro/fastreg

Fast vectorised linear regression in Python

License

Notifications You must be signed in to change notification settings

gaow/fastreg

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastreg

A faster regression routine for Python.

There are a number of regression routines for Python, but none of them handle vectorised calculations (to my knowledge). A classic example of this problem is regression in time of an array which includes spatial dimensions. A simple way to approach this would be to loop over each spatial point. This approach is extremely slow. A faster approach is to use matrix operations.

fastreg implements a vectorised ordinary least squares (OLS) linear regression for used when the independent data vary only with time but the dependent data vary in both time and space (a new version allowing the independent data to also vary in space is planned).

The equation for the parameters of the OLS problem is:

OLS equation

fastreg implements this in Python and calculates the Pearson correlation coefficient, p-value for the hypothesis test whose null hypothesis is that the slope is zero, and the standard error for the slope estimate.

About

Fast vectorised linear regression in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%