# Questions tagged [linear-regression]

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

429 questions
Filter by
Sorted by
Tagged with
22 views

...
15 views

### How to interpret Variance Inflation Factor (VIF) results?

From various books and blog posts, I understood that the Variance Inflation Factor (VIF) is used to calculate collinearity. They say that VIF till 10 is good. But I have a question. As we can see in ...
30 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 ...
15 views

### How do I plot the predictions made by a LinearRegression model?

I have made a linear regression using sklearn. I am wondering if there is a convenient way where I can plot the prediction versus a specified variable? Alternatively, is there any other good way of ...
14 views

### Image reconstruction using low-light components

Let's say we have a regular photo and three low-light photos illuminated in different colors. Each pixel is a three-component vector $q=(R,G,B)$. Then $q_k^{A}$ is the $k$-th pixel of the regular ...
40 views

### How do you predict a continuous variable when all your independent variables are categorical

I am new to data science and ML. Recently I have been given a sales dataset which contains weekly sales of a fashion brand. It has information about product like category(t shirt, polo shirt, cotton ...
18 views

### How should I improve my Vectorized Gradient descent linear regression model?

I wrote a vectorized Gradient descent implementation of the linear regression model. The Dataset looks something like: It's Not Working properly as I am getting negative R Squared error I don't ...
25 views

### Does Feature Normalization affect Gradient Descent | Linear Regression

am new to datascience and i want to learn linear regression so i coded linear regression from scratch and performed gradient descent to find the best $w_\theta$ and $b_\theta$ values using a tutorial. ...
27 views

### bad input shape (5634, 2)

I tried everything and I am not sure how to resolve the following error: "ValueError: bad input shape (5634, 2)" This is my first machine learning example so please bear with me. This is the python ...
22 views

### How to determine the convergence of Stochastic Gradient Descent?

While coding the batch gradient descent, it is easy to code the convergence as after each iterations the cost moves towards minimum and when the change in cost tends to approach a pre-defined number, ...
24 views

### Linear regression plotting abline() [[R]]

I have a ufc data set which i got and started cleaning for my own practice This the link to data:-https://www.kaggle.com/rajeevw/ufcdata#raw_fighter_details.csv and using raw_fighter_data file. I ...
11 views

### From a mix of real-world and back-calculated data how to remove the part that was back-calculated?

I have a geostatistical dataset and I've been building linear regression model, but when I plotted the data I've noticed that part of the data shows an absolute straight line trend, i.e. it is most ...
29 views

### Multicollinearity and impact of individual features

Assume the following scenario: I have four features: $x_1$, $x_2$, $x_3$, and $x_4$ There are non-negligible multi-collinearity among the features. I want to predict $y$ (response variable) with ...
25 views

### Andrew Ngs Class - Why Did He Change up the Cost Function?

I am taking Andrew Ng's Machine Learning Intro class. Looks like he changed the cost function without any explanation in the second week. Specifically: He no longer squares each deviation between the ...
25 views

### Applying Standardization OLS estimator

I have basic understanding of how to perform linear regression with sklearn and statsmodels. There are several questions that I would like to ask regarding Linear Regression (OLS estimator) : Is ...
127 views

### Regression: What defines Linear and non-linear models or functions

Linear regression is used when there is a linear relationship between the input and output variables. Does this linear relationship mean that there is no power over the variables or the parameters? In ...
36 views

...
34 views

### Linear regression doesn't return the expected number of $\beta_i$

I have a dataset of precincts and results of parties on different elections. After reading this article I really wanted to use linear regression to answer the question : how did voters changed their ...
87 views

### Correcting for one of multiple strong batch effects in a dataset

I am wondering which statistical tools to use when analysing data that have multiple strong batch effects (distributions vary from one batch to another). I would like to correct batch effect when it ...
20 views

### Where to get the Datascience Use cases for practice [duplicate]

I just started learning data science. I have gone through some of the courses in coursera & udemy, now i want to practice what i have learned. What i want to know is from where can i get the Use ...
67 views

### When using Absolute Error in Gradient Descent, how to calculate the derivative?

What is the derivative of the Loss Function (Absolute Error) with respect to the feature weights that is used to update the weights? Couldn't find anything specific about it anywhere.
37 views

### Difference between Non linear regression vs Polynomial regression

I have been reading a couple of articles regarding polynomial regression vs non-linear regression, but they say that both are a different concept. I mean when you say polynomial regression, it, in ...
117 views

I just finished working on my first machine learning algorithm i.e Linear regression. I want to reduce the rmse by optimising the model. I found out that gradient decent does the same job. But i dont ...
31 views

### Linear regression compute theta

I'm trying to compute the theta for a regression linear exercice. ...
20 views

### Convey time lag information to a linear regression model

I am using a simple linear regression to predict the number of units an item has moved and price of the item is one of the input parameters. For a few items, the older prices are not relevant and ...
19 views

### Can linear classifiers be used at each node of a decision tree instead of the lines parallel to any one of the axes?

I am relatively new to AI/ML. I came across this question while reading some content on ML. Would be of great help if anyone can answer this
25 views