linear-regression Questions

3

Solved

Quite new to SciKit and linear algebra/machine learning with Python in general, so I can't seem to solve the following: I have a training set and a test set of data, containing both continuous and...

1

My goal is to solve: Kc=y with the pseudo-inverse (i.e. minimum norm solution): c=K^{+}y such that the model is (hopefully) high degree polynomial model f(x) = sum_i c_i x^i. I am specially i...
Ligulate asked 22/10, 2017 at 21:40

1

Solved

I need a linear regression for calculating an empirical parameter. L1 is a raster image, format .tif. L2 is a raster image as well, calculated beforehand. Both images have the same number of column...
Coming asked 10/1, 2018 at 19:11

2

Solved

I have a data set which has driver trip information as mentioned below. My objective is to come up with a new mileage or an adjusted mileage which takes into account the load a driver is carrying a...
Salutation asked 22/12, 2017 at 13:55

2

Solved

Is there a simple way to extend a dotted line from the end of a solid regression line to a predicted value? Below is my basic attempt at it: x = rnorm(10) y = 5 + x + rnorm(10,0,0.4) my_lm <- l...
Alnico asked 20/12, 2017 at 17:4

2

Solved

I know there are several ways to compare regression models. One way it to create models (from linear to multiple) and compare R2, Adjusted R2, etc: Mod1: y=b0+b1 Mod2: y=b0+b1+b2 Mod3: y=b0+b1+b2+...
Barca asked 28/11, 2017 at 23:22

1

I'm trying to Lasso Regression after having optimal value of Lambda and now the problem is , I want to get the coefficients (weight vector) since I want to compare them with weights of Ridge regres...

1

Solved

I have two linear models created with lm that I would like to compare with a table in the stargazer package. For the most part, I like the results I'm getting. But the Akaike Information Criterion ...
Infundibuliform asked 26/11, 2017 at 9:37

2

Solved

I want to compare two nested linear models, call them m01, and m02 where m01 is the reduced model and m02 is the full model. I want to do a simple F-test to see if the full model adds significant u...
Platitude asked 21/7, 2017 at 17:48

2

Solved

I have the following code for linear regression using pyspark.ml package. However I get this error message for the last line, when the model is being fit: IllegalArgumentException: u'requiremen...
Korikorie asked 14/2, 2017 at 16:38

3

I have a linear model in R. set.seed(1234) x <- rnorm(100) z <- rnorm(100) y <- rnorm(100, x+z) mydata <- data.frame(x,y,z) fit <- lm(y ~ x + z, mydata) I would like to obtain an...
Gypsie asked 16/4, 2013 at 5:35

3

If I have independent variables [x1, x2, x3] If I fit linear regression in sklearn it will give me something like this: y = a*x1 + b*x2 + c*x3 + intercept Polynomial regression with poly =2 wi...
Scripture asked 23/8, 2017 at 0:47

2

Solved

I'd like to find the standard deviation and confidence intervals for an out-of-sample prediction from an OLS model. This question is similar to Confidence intervals for model prediction, but with...

3

Solved

I have large data frame, and I need to calculate efficiently correlation between the data frame rows and given value list. for example: dfa= DataFrame(np.zeros((1,4)) ,columns=['a','b','c','d']) d...

1

I was trying to solve a linear system Xc=y that was square. The methods I know to solve this are: using inverse c=<X^-1,y> using Gaussian elimination using the pseudo-inverse It seems as ...

1

Solved

In the sklearn.linear_model.LinearRegression method, there is a parameter that is fit_intercept = TRUE or fit_intercept = FALSE. I am wondering if we set it to TRUE, does it add an additional...
Westering asked 16/10, 2017 at 21:47

3

Solved

I am trying to run a usual linear regression in Python using sk-learn, but I have some categorical data that I don't know exactly how to handle, especially because I imported the data using pandas ...
Endoplasm asked 5/10, 2014 at 2:30

1

Solved

Scikit-learn allows sample weights to be provided to linear, logistic, and ridge regressions (among others), but not to elastic net or lasso regressions. By sample weights, I mean each element of t...
Personage asked 3/10, 2017 at 4:4

1

I am trying to apply Linear Regression method for a dataset of 9 sample with around 50 features using python. I have tried different methodology for Linear Regression i.e Closed form OLS(Ordinary L...
Herbalist asked 27/9, 2017 at 18:11

5

Solved

I've done a multivariate regression using sklearn.linear_model.LinearRegression and obtained the regression coefficients doing this: import numpy as np from sklearn import linear_model clf = li...
Derangement asked 5/1, 2014 at 19:34

4

Solved

what is the benefit of using Gradient Descent in the linear regression space? looks like the we can solve the problem (finding theta0-n that minimum the cost func) with analytical method so why we ...
Castlereagh asked 12/8, 2013 at 16:18

1

Could someone help me interpret the alias function output for testing for multicollinearity in a multiple regression model. I know some predictor variables in my model are highly correlated, and I ...
Pilloff asked 26/7, 2017 at 13:43

4

Solved

I want to be able to regression coefficients from multiple linear regression by supplying a correlation or covariance matrix instead of a data.frame. I realise you lose some information relevant to...
Alsup asked 25/7, 2016 at 0:43

0

Least squares regression is defined as the minimization of the sum of squared residuals e.g. Minimize(sum_squares(X * beta - y)) However, I'd like to propose a slight modification such that we a...
Crematory asked 20/8, 2017 at 18:17

1

Solved

I am trying to perform linear regression, for a model like this: Y = aX1 + bX2 + c So, Y ~ X1 + X2 Suppose I have the following response vector: set.seed(1) Y <- runif(100, -1.0, 1.0) And...
Bitter asked 8/8, 2017 at 20:35

© 2022 - 2024 — McMap. All rights reserved.