linear-regression Questions

3

Solved

In understand that when I have a category variable in a model passed to a statsmodels fit that dummy variables will automatically be generated for the categories. For example if I have a variable '...
Peerage asked 16/3, 2014 at 0:28

5

I want to write a program that, given a list of points in 3D-space, represented as an array of x,y,z coordinates in floating point, outputs a best-fit line in this space. The line can/should be in ...
Wobbly asked 14/7, 2014 at 23:27

7

Solved

data2 = pd.DataFrame(data1['kwh']) data2 kwh date 2012-04-12 14:56:50 1.256400 2012-04-12 15:11:55 1.430750 2012-04-12 15:27:01 1.369910 2012-04-12 15:42:06 1.359350 2012-04-12 15:57:10 1.305680 ...
Boggers asked 14/4, 2015 at 8:59

4

Solved

I'm new to R and statistics and haven't been able to figure out how one would go about plotting predicted values vs. Actual values after running a multiple linear regression. I have come across sim...
Unwind asked 29/8, 2016 at 14:29

1

Solved

I am trying to fit a multivariate linear regression model with statsmodels.api. I get an error MissingDataError: exog contains inf or nans. I have checked for nans and inf and find none. How is thi...
Sculptor asked 21/3, 2021 at 10:27

3

I am performing lasso regression in R using glmnet package: fit.lasso <- glmnet(x,y) plot(fit.lasso,xvar="lambda",label=TRUE) Then using cross-validation: cv.lasso=cv.glmnet(x,y) plot(cv...
Teepee asked 30/5, 2018 at 18:0

3

I want to run several regression types (Lasso, Ridge, ElasticNet and SVR) on a dataset with around 5,000 rows and 6 features. Linear regression. Use GridSearchCV for cross validation. The code is e...
Ensphere asked 9/10, 2015 at 6:26

6

Solved

As an R user, I wanted to also get up to speed on scikit. Creating a linear regression model(s) is fine, but can't seem to find a reasonable way to get a standard summary of regression output. ...
Robson asked 11/10, 2014 at 21:4

2

Solved

I want to use a linear regression model, but I want to use ordinary least squares, which I think it is a type of linear regression. The software I use is SPSS. It only has linear regression, partia...
Aureus asked 22/11, 2009 at 21:57

3

Solved

I am trying to use a linear regression on a group by pandas python dataframe: This is the dataframe df: group date value A 01-02-2016 16 A 01-03-2016 15 A 01-04-2016 14 A 01-05-2016 17 ...
Turnip asked 6/1, 2017 at 18:24

3

Solved

Suppose I have a set of returns and I want to compute its beta values versus different market indices. Let's use the following set of data in a table named Returns for the sake of having a concrete...
Thermidor asked 14/2, 2018 at 21:53

2

Solved

I'm following a machine learning course. I have a simple linear regression (LR) problem to help me get used to TensorFlow. The LR problem is to find parameters a and b such that Y = a*X + b approxi...

2

Solved

I am running the following source code: import statsmodels.formula.api as sm # Add one column of ones for the intercept term X = np.append(arr= np.ones((50, 1)).astype(int), values=X, axis=1) re...

2

For my evaluation, I wanted to run a rolling 1000 window OLS regression estimation of the dataset found in this URL: https://drive.google.com/open?id=0B2Iv8dfU4fTUa3dPYW5tejA0bzg using the followin...
Meghanmeghann asked 22/6, 2017 at 18:58

3

I am trying to make and test a linear model as follows: lm_model <- lm(Purchase ~., data = train) lm_prediction <- predict(lm_model, test) This results in the following error, statin...
Spode asked 27/7, 2018 at 6:46

4

Solved

I have an lm object and want to get the formula extracted with coefficients. I know how to extract the formula without coefficients, and how to get the coefficients without the formula, but not how...
Copt asked 21/1, 2014 at 21:48

1

Solved

I have two data sets index_list and frequency_list which I plot in a loglog plot by plt.loglog(index_list, freq_list). Now I'm trying to fit a power law a*x^(-b) with linear regression. I expect th...
Public asked 29/9, 2020 at 15:30

1

Solved

I want to do a linear regression applying survey weights in R studio. I have seen that it is possible to do this with the lm() function, which enables me to specify the weights I want to use. Howev...
Holzer asked 27/9, 2020 at 15:8

2

Solved

I'm trying to reproduce this blog post on overfitting. I want to explore how a spline compares to the tested polynomials. My problem: Using the rcs() - restricted cubic splines - from the rms pack...
Buttery asked 31/1, 2013 at 19:8

5

Solved

I'm currently working with Pandas and matplotlib to perform some data visualization and I want to add a line of best fit to my scatter plot. Here is my code: import matplotlib import matplotlib.p...
Rinee asked 15/5, 2016 at 3:12

4

Solved

I'm working on a regression algorithm, in this case k-NearestNeighbors to predict a certain price of a product. So I have a Training set which has only one categorical feature with 4 possible valu...

1

I am running a fixed effects panel regression use the PanelOLS() function in linearmodels 4.5. While trying to add the 'entity_effects=True' and 'time_effects=True' in the model estimation, it re...
Estevan asked 3/2, 2019 at 20:22

5

Solved

I have a classic linear regression problem of the form: y = X b where y is a response vector X is a matrix of input variables and b is the vector of fit parameters I am searching for. Python pro...

15

Solved

When we have to predict the value of a categorical (or discrete) outcome we use logistic regression. I believe we use linear regression to also predict the value of an outcome given the input...
Graven asked 27/8, 2012 at 17:49

3

Solved

I'm working through some examples of Linear Regression under different scenarios, comparing the results from using Normalizer and StandardScaler, and the results are puzzling. I'm using the boston ...
Crescentic asked 7/1, 2019 at 1:12

© 2022 - 2024 — McMap. All rights reserved.