# Questions tagged [linear-regression]

Techniques for analyzing the relationship between one (or more) "dependent" variables and "independent" variables.

192 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
513 views

### differences between LSQR and FTRL when working with very sparse data

I have a 2M instances dataset with millions of very very sparse dummy variables created using the hashing trick = ...
• 1,357
710 views

### Linear Regression bad results after log transformation

I have a dataset that has the following columns: The variable I'm trying to predict is "rent". My dataset looks a lot similar to what happens in this notebook. I tried to normalize the rent ...
• 167
223 views

### Multi-dimensional Euclidian R^2 squared - reasonable?

I have a high-dimensional space, say $\mathbb{R}^{1000}$, and I have samples $y_1, \ldots , y_n \in \mathbb{R}^{1000}$ and $\hat{y}_1, \ldots , \hat{y}_n \in \mathbb{R}^{1000}$. Would  R^2 = 1 - \...
50 views

### How best to use the resale transaction year in predicting housing prices?

I'm looking into the classic problem of predicting apartment prices (resale market) based on the their type, size, location, etc. Pretty straightforward and Linear Regression or Regression Trees give ...
• 171
909 views

### How to retrieve results summary from statsmodels GLM with regularization?

I'm trying to fit a GLM to predict continuous variables between 0 and 1 with statsmodels. Because I have more features than data, I need to regularize. ...
2k views

### Why does classifier chain ask for at least 2 classes, when I have it

I'm using Classifier Chain with logistic regression and when i try to use fit, i get This solver needs samples of at least 2 classes in the data, but the data contains only one class: 1 but I'm ...
2k views

### Partitioning data into features/labels and train/test after reading from csv file

I need to read data from a CSV file and then the first partition that data into features and labels and then into the training and testing set. However, there are several issues cropping up again and ...
• 141
2k views

### Piece-wise regression by clustering

I was wondering about the possibilities of clustering numerical data (more than 3 dimensions) into different clusters and doing curve fitting on each cluster to get much higher accuracy than using a ...
• 141
1k views

### How to predict Estimated Time for Arrival given only trajectory data and time?

I have data of latitude, longitude and timestamp. I am trying to build a graph based on pincodes (in India) (equivalent to zipcode). Based on this graph and trajectory data that I have, I want to ...
146 views

### Is it ok to trust regression predictions when none of the coefficients are statistically significant?

Background to the problem: I am estimating individual treatment effects using double machine learning model. I do not know true treatment effects for my problem. Double ML: Given Y (outcome), T (...
• 131
21 views

### Why would the result change so much for a linear regression with or without a constant?

I was running a Linear Regression with Wooldridge dataset named GPA2, which is found on Python library named wooldridge. I tried two linear regressions. The first: ...
• 191
460 views

### Why do we don't write units with MAE or RSME for regression problem ? If I wish to write the units when how do I identify the units for them?

I have referred many research paper but no one is talking about the units of the metrics. Do MAE , RMSE etc have some units ?
39 views

### Return the gradient and y intercept (m, b) to create two lines to best fit the data

I have been working on this task for a few hours now and have been unsuccessful with getting the target result. I have tried using multiple methods of trying to split the dataset using different ...
• 21
551 views

### Linear regression with Pytorch not converging

I am trying to perform a simple linear regression using Pytorch lightning (a network with only one neuron). The network is supposed to learn a simple function: y=-4x...
• 121
630 views

### Why not using linear regression for finetuning the last layer of a neural network?

In transfer learning, often only the last layer of the network is retrained using gradient descent. However, the last layer of a common neural network performs only a linear transformation, so why do ...
• 595
228 views

### How to process categorical variable having lots of unique values in linear regression?

I have House Price dataset and I am using linear regression to predict the house price. while data preprocessing I found a variable called "Location" and it have around 342 unique value. For ...
146 views

### Interpretation of the output from qqPlot (using car library)

Basically, I have created a linear model and am testing to verify the normality of my errors. As a result, I have used the qqPlot function from the car library and have gotten the graph that can be ...
138 views

### Reproduce Figure 3.2 in Introduction to Statistical Learning

Has anyone reproduced Figure 3.2 in Introduction to Statistical Learning (James et al)? https://trevorhastie.github.io/ISLR/ISLR%20Seventh%20Printing.pdf They have a contour plot with circles. Here is ...
112 views

### Deriving vectorized form of linear regression

We first have the weights of a D dimensional vector $w$ and a D dimensional predictor vector $x$, which are all indexed by $j$. There are $N$ observations, all D dimensional. $t$ is our targets, i.e, ...
• 143
123 views

• 121
1 vote