Tagged Questions
21
votes
3answers
22k views
How to do exponential and logarithmic curve fitting in Python? I found only polynomial fitting
I have a set of data and I want to compare which line describes it best (polynomials of different orders, exponential or logarithmic).
I use Python and Numpy and for polynomial fitting there is a ...
13
votes
3answers
7k views
multivariate linear regression in python?
I can't seem to find any python libraries that do multivariate regression. The only things I find only do simple regression. I need to regress my dependent variable (y) against several independent ...
5
votes
2answers
3k views
6th degree curve fitting with numpy/scipy
I have a very specific requirement for interpolating nonlinear data using a 6th degree polynomial. I've seen numpy/scipy routines (scipy.interpolate.InterpolatedUnivariateSpline) that allow ...
7
votes
3answers
4k views
Can scipy.stats identify and mask obvious outliers?
With scipy.stats.linregress I am performing a simple linear regression on some sets of highly correlated x,y experimental data, and initially visually inspecting each x,y scatter plot for outliers. ...
4
votes
2answers
3k views
Multiple linear regression with python
I would like to calculate multiple linear regression with python.
I found this code for simple linear regression
import numpy as np
from matplotlib.pyplot import *
x = np.array([1, 2, 3, 4, 5])
y ...
22
votes
1answer
19k views
Linear regression with matplotlib
still a Python beginner.
I'm trying to generate a linear regression on a scatter plot I have generated, however my data is in list format, and all of the examples I can find of using 'polyfit' ...
2
votes
2answers
19k views
Linear Regression with Python numpy
I'm trying to make a simple linear regression function but continue to encounter a
numpy.linalg.linalg.LinAlgError: Singular matrix error
Existing function (with debug):
def makeLLS(inputData, ...
1
vote
1answer
952 views
(Python) Estimating regression parameter confidence intervals with scikits bootstrap
I've just started to try out a nice bootstrapping package available through scikits:
https://github.com/cgevans/scikits-bootstrap
but I've encountered a problem when trying to estimate confidence ...
3
votes
5answers
862 views
numpy: code to update least squares with more observations
I am looking for a numpy-based implementation of ordinary least squares that would allow the fit to be updated with more observations. Something along the lines of Applied Statistics algorithm AS 274 ...
2
votes
1answer
3k views
Multiple linear regression python
I use multiple linear regression, I have one dependant variable (var) and several independant variables (varM1, varM2,...)
I use this code in python:
z=array([varM1, varM2, varM3],int32)
...
1
vote
2answers
903 views
How can I obtain segmented linear regressions with a priori breakpoints?
I need to explain this in excruciating detail because I don't have the basics of statistics to explain in a more succinct way. Asking here in SO because I am looking for a python solution, but might ...