linear-regression Questions
2
I am trying to create a piecewise linear regression to minimize the MSE(minimum square errors) then using linear regression directly. The method should be using dynamic programming to calculate the...
Stickweed asked 2/7, 2020 at 15:43
2
Solved
I'm trying to build a simple regression line with pandas in spyder.
After executing the following code, I got this error:
Found input variables with inconsistent numbers of samples: [1, 99]
the co...
Novanovaculite asked 15/8, 2017 at 16:40
2
Solved
The problem is to find the best fit of a real-valued 2D curve (given by the set of points) with a polyline consisting of two lines.
A brute-force approach would be to find the "left" and "right" l...
Stolzer asked 19/6, 2020 at 21:30
3
Solved
I want to plot a simple regression line in R. I've entered the data, but the regression line doesn't seem to be right. Can someone help?
x <- c(10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120...
Avow asked 28/9, 2016 at 1:56
3
Solved
Can anyone explain to me the difference between ols in statsmodel.formula.api versus ols in statsmodel.api?
Using the Advertising data from the ISLR text, I ran an ols using both, and got differen...
Trev asked 4/6, 2015 at 17:20
4
Solved
I am doing a computer simulation for some physical system of finite size, and after this I am doing extrapolation to the infinity (Thermodynamic limit). Some theory says that data should scale line...
Turnedon asked 30/1, 2014 at 23:26
10
Solved
I'm in the second week of Professor Andrew Ng's Machine Learning course through Coursera. We're working on linear regression and right now I'm dealing with coding the cost function.
The code I've ...
Debbee asked 25/3, 2014 at 4:22
3
Solved
I have managed to get a linear regression line for time series data, much thanks to stackoverflow prior. So I have the following plots/line drawn over from python:
I got this regression line wit...
Carousal asked 15/2, 2017 at 19:23
4
Solved
How large a system is it reasonable to attempt to do a linear regression on?
Specifically: I have a system with ~300K sample points and ~1200 linear terms. Is this computationally feasible?
U asked 23/12, 2009 at 20:22
1
Solved
Basically just the title. It just struck me as odd when I was dipped my toes into the sklearn library. Is there an explanation for this?
Caulfield asked 22/4, 2020 at 14:37
7
Solved
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 ...
Golightly asked 8/8, 2010 at 7:36
2
Solved
I got good use out of pandas' MovingOLS class (source here) within the deprecated stats/ols module. Unfortunately, it was gutted completely with pandas 0.20.
The question of how to run rolling OLS...
Toilette asked 6/6, 2017 at 1:31
1
Solved
It is easy to get a linear best fit of data in plotnine --using stat_smooth(method="gls"). However, I can't figure out how to get out the coefficients to the best fit line or the R2 value. Ggplot i...
Ita asked 9/4, 2020 at 22:30
3
I would like to know how to constrain certain parameters in lm() to have positive coefficients. There are a few packages or functions (e.g. display) that can make all coefficients, and the intercep...
Pegasus asked 2/12, 2014 at 8:26
3
In Machine Learning, we say that:
w1x1 + w2x2 +...+ wnxn is a linear regression model where w1,w2....wn are the weights and x1,x2...x2 are the features whereas:
w1x12 + w2x22 +...+ wnxn2 is a non...
Muslin asked 4/5, 2016 at 5:17
3
I know that this error message (ValueError: too many values to unpack (expected 4)) appears when more variables are set to values than a function returns.
scipy.stats.linregress returns 5 values ...
Truncheon asked 2/8, 2016 at 15:43
3
Solved
I want to build a multiple linear regression model by using Tensorflow.
Dataset: Portland housing prices
One data example: 2104,3,399900 (The first two are features, and the last one is house price...
Incident asked 11/5, 2016 at 9:55
2
Solved
As a self study exercise I am trying to implement gradient descent on a linear regression problem from scratch and plot the resulting iterations on a contour plot.
My gradient descent implementat...
Delegation asked 6/6, 2018 at 14:54
2
Solved
I wanted to run a rolling 1000 window OLS regression estimation of the dataset for my evaluation found at the following URL:
https://drive.google.com/open?id=0B2Iv8dfU4fTUa3dPYW5tejA0bzg
I tried ...
Viminal asked 22/6, 2017 at 21:38
3
Solved
I am trying to use linear regression in combination with python and scikitlearn to answer the question "can user session lengths be predicted given user demographic information?"
I am using linear...
Growl asked 25/12, 2016 at 23:24
2
Assuming I have a group of lines segments like the red lines (or green lines) in this picture
I want to know how can I replace them with just one line segment that approximates them best. Or mayb...
Footfall asked 18/8, 2014 at 17:13
2
Solved
I was running a regression using categorical variables and came across this question. Here, the user wanted to add a column for each dummy. This left me quite confused because I though having long ...
Trowbridge asked 1/2, 2019 at 0:9
2
Solved
I am trying to create multiple linear regression models from a list of variable combinations (I also have them separately as a data-frame if that is more useful!)
The list of variables looks like ...
Nomarch asked 3/12, 2019 at 16:12
4
Solved
Does anyone know of a scientific/mathematical library in Java that has a straightforward implementation of weighted linear regression? Something along the lines of a function that takes 3 arguments...
Lois asked 16/4, 2011 at 3:28
2
Solved
How does plot.lm() determine what points are outliers (that is, what points to label) for residual vs fitted plot? The only thing I found in the documentation is this:
Details
sub.caption—by defau...
Strenta asked 31/8, 2016 at 21:25
© 2022 - 2024 — McMap. All rights reserved.