Top "Least-squares" questions

Refers to a general estimation technique that selects the parameter value to minimize the squared difference between two quantities, such as the observed value of a variable, and the expected value of that observation conditioned on the parameter value.

How to do linear regression, taking errorbars into account?

I am doing a computer simulation for some physical system of finite size, and after this I am doing extrapolation …

python numpy linear-regression least-squares extrapolation
How to set a weighted least-squares in r for heteroscedastic data?

I'm running a regression on census data where my dependent variable is life expectancy and I have eight independent variables. …

r regression least-squares
Need to fit polynomial using chebyshev polynomial basis

I have been fitting linear least-squares polynomials to data using the polyfit function in matlab. From what I read, this …

matlab curve-fitting polynomial-math least-squares
C# implementation of Levenberg–Marquardt algorithm

I am looking for a C# implementation of the Levenberg–Marquardt algorithm for non-linear least squares fit.

c# least-squares levenberg-marquardt
Compute least squares using java

I am trying to find a java code to compute the least squares solution (x) in the Ax=b equation. …

java least-squares
Fitting a line that passes through the origin (0,0) to data

I have a set of points (x,y) and I need to find the line of best-fit that passes through …

algorithm matlab numerical curve-fitting least-squares
Python statsmodels OLS: how to save learned model to file

I am trying to learn an ordinary least squares model using Python's statsmodels library, as described here. sm.OLS.fit() …

python least-squares statsmodels
ValueError when using scipy least_squares

I am trying to fit my data to a function. I've been using this sample code as a guide http://…

python numpy scipy least-squares
How to use least squares with weight matrix?

I know how to solve A.X = B by least squares using Python: Example: A=[[1,1,1,1],[1,1,1,1],[1,1,1,1],[1,1,1,1],[1,1,0,0]] B=[1,1,1,1,1] X=numpy.linalg.lstsq(…

python numpy matrix least-squares
What is the difference between numpy.linalg.lstsq and scipy.linalg.lstsq?

lstsq tries to solve Ax=b minimizing |b - Ax|. Both scipy and numpy provide a linalg.lstsq function with …

python numpy scipy least-squares