Questions tagged [linear-regression]

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

Filter by
Sorted by
Tagged with
1
vote
2answers
25 views

Why is $Y=\beta_0 x^{\beta_1} e$ a linear model?

Why is $Y=\beta_0 x^{\beta_1} e$ a linear model? When we apply the transform, it becomes $lnY = ln\beta_0+\beta_1 lnx +lne$, and why is it still linear when the $\beta_0$ part is under ln?
-3
votes
0answers
14 views

Building Model directly on data [closed]

I am building a model and my data is mostly skewed how far I can trust my model. My Training and Testing errors are almost equal and I am getting good results on my testing data. Can I belive that ...
0
votes
0answers
14 views

Why I got a wrong loss? [closed]

I am using Pytorch to do a linear regression but I got some problems with my code : I started to import the packages : ...
2
votes
0answers
16 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, ...
-2
votes
1answer
60 views

Which machine learning model to choose? [closed]

I am a beginner in data science. I am facing the problem of choosing the most appropriate algorithm for my specific problem. I am building a recommendation system that gives students insight into ...
0
votes
1answer
7 views

Value error while using Linear Regression (new) [closed]

I am new to Python. I was trying to practice Linear Reg Modeling. Below error in picture shows up every time. Code in this link worked. Data set i used Ad.csv
0
votes
1answer
27 views

Interpretation of the data through scatter plot [closed]

I was exploring the data and had observed the data points are forming a triangle on the lower side. x-axis: Total items y-axis: Cancelled items Can someone help me ...
0
votes
1answer
25 views

How to use a multiple linear regression model built from normalized data

I built a linear multivariable regression model from normalized data (for the interval [0; 1]). Initially, the data was not normalized, I normalized the data by myself (independent and dependent ...
1
vote
0answers
24 views

Preprocessing dataset to predict salary

I'm currently a student in a machine learning course studying for an upcoming exam. Here's a question I've been given for practice: You have a very large dataset of employees and you'd like to ...
2
votes
2answers
46 views

Scikit learn linear regression - learning rate and epoch adjustment

I am trying to learn linear regression using ordinary least squares and gradient descent from scratch. I read the documentation for the Scikit learn function and I do not see a means to adjust the ...
2
votes
2answers
73 views

Predictive power of a dataset

I am reading a book on machine learning for undergraduate. I am actually confused on linear regression flexibility as the say: Occasionally, linear regression will fail to recover a good solution for ...
0
votes
0answers
28 views

Choosing the correct loss function

I am training multiple linear Ridge regression using Python (sklearn). I want to train regression using my loss function. I found that my loss function in sklearn I can define using ...
1
vote
0answers
16 views

How to calculate cov(e|X) in Generalised linear regression?

This image taken from wiki https://en.wikipedia.org/wiki/Generalized_least_squares. I am not able to calculate Cov(e|X)? Can someone tell me that.And also give me dimesion of cov(E|X)= sigma^2 * rho
11
votes
3answers
1k views

Overfitting in Linear Regression

I'm just getting started with machine learning and I have trouble understanding how overfitting can happen in a linear regression model. Considering we use only 2 feature variables to train a model, ...
1
vote
1answer
39 views

Imagining a Linear Regression model with more than 3 dimensions [closed]

I'm just getting started with Machine Learning and this is really bugging me now. Assuming we could use more than 2 feature variables to train a Multiple Linear Regression model, how can we imagine ...
0
votes
0answers
15 views

Implementation of RMS prop for linear regression

I'm trying to implement linear regression using Rms Prop optimizer from scratch. Code: ...
2
votes
2answers
73 views

How do standardization and normalization impact the coefficients of linear models?

One benefit of creating a linear model is that you can look at the coefficients the model learns and interpret them. For example, you can see which features have the most predictive power and which do ...
0
votes
2answers
77 views

Dose finding slope/intercept using the formula of m,b gives best fit line always In linear regression?

In liner regression We have to fit different lines and chose one with minimum error so What is the motive of having a formula for m,b that can give slope and intercept value in the regression line ,...
0
votes
1answer
69 views

Dropping one category for regularized linear models

While reviewing the sklearn's OneHotEncoder documentation (attached below) I noticed that when applying regularization (e.g., lasso, ridge, etc.) it is not recommended to drop the first category. ...
1
vote
1answer
33 views

Understanding one of the assumptions of linear regression: Multicollinearity

I've read that multicollinearity is one of the main assumptions of multivariate linear regression - Multicollinearity occurs when the independent variables are too highly correlated with each other. ...
4
votes
0answers
60 views

Possible harm in standardizing one-hot encoded features

While there may not be any added value in standardizing one-hot encoded features prior to applying linear models, is there is any harm in doing so (i.e., affecting model performance)? Standardizing ...
2
votes
1answer
36 views

Multiple linear regression for multi-dimensional input and output?

Assume that I have $N$ points $x_i,i=1,...,N$ in some $A>1$-dimensional space $\mathbb{R}^A$ with pointwise evaluations of some function $f:\mathbb{R}^A \rightarrow \mathbb{R}^B$, i.e. $f(x_i),i=1,...
6
votes
2answers
386 views

Can a linear regression model without polynomial features overfit?

I've read in some articles on the internet that linear regression can overfit. However is that possible when we are not using polynomial features? We are just plotting a line trough the data points ...
1
vote
2answers
34 views
2
votes
0answers
61 views

When to use bayesian linear regression instead of linear regression?

When does it make sense to use a bayesian approach, maybe in context to linear regression? To be more concrete: Assume you measure a certain number of devices and you wanna' check the linear ...
0
votes
1answer
49 views

Normal equation for linear regression is illogical

Currently I'm taking Andrew Ng's course. He gives a following formula to find solution for linear regression analytically: $θ = (X^T * X)^{-1} * X^T * у$ He doesn't explain it so I searched for it and ...
1
vote
1answer
20 views

How to encode ordinal data before applying linear regression in STATA?

I have a data set that has student performance marks (continuous and dependent variable), Teacher Qualification (Ordinal and independent variable containing categories: Masters, Bachelors, High School)...
0
votes
1answer
188 views

What is Happening in the training process when we are fitting a model to the data [closed]

In any prediction task, the process of “fitting” a model to the data observed in the training process can be best described as... Assessing all observations available and then backsolving for the ...
2
votes
1answer
37 views

Fitting multiple line

Short version: How can I find a function that maps X to Y when data looks like this. Note: For a pair of emissivity and distance relation between temperature and raw_thermal_data is linear. Long ...
1
vote
3answers
79 views

How do I interpret the output of linear regression model in R?

I have the following linear regression model and its analysis. There are a few errors, but I am not very sure about the errors. I have not succeeded in finding them so far. First, the 95% confidence ...
3
votes
0answers
59 views

How to find lagged cross correlation between time series?

I have 2 time series, $X$ and $Y$, and I'm trying to find the best lag range that correlates $X$ to $Y$ (find the amount(s) of lag of $X$ that best correlate to the target variable $Y$). For instance, ...
10
votes
7answers
320 views

Multi-country model or single model

I am working on a ML model to be deployed in a product operating in many countries. The issue that I am having is the following: should I train one model and serve it for all countries? train a model ...
0
votes
0answers
32 views

What metrics to use in regression if variance in output label is very low?

What metrics/method should one adopt in judging the error when variance is low in output variable. To give you an example : the output variable can be stock prices over a month, the variance generally ...
0
votes
0answers
14 views

Fixing autocorrelation not caused by time series

I have data with features that looks like this I am using ML regression in Sklearn to predict a final cost (in a separate df). Before fitting a linear regression I went to test the assumptions of ...
3
votes
1answer
39 views

Will stochastic gradient descent converge for multivariate linear regression

I am trying to figure out if stochastic gradient descent for a multivariate linear regression will converge (assuming there is no mini-batching, i.e., the batch size is 1). My guess is yes, based on ...
2
votes
2answers
82 views

Checking linearity for a linear regression model?

I've read that there are various assumptions associated with a multiple linear regression model which you should check/validate before getting too excited about your model results. One of these is the ...
1
vote
1answer
46 views

Dealing with missing data

I have a question about data cleaning. I am a novice and have just started learning in this field so please pardon my ignorance. Suppose there are two columns and based on some samples taken from both ...
1
vote
0answers
29 views

Adjusting Variables in Multiple Linear Regression

Suppose I have $10$ exposure variables $a_{1}...a_{10}$ and one dependent outcome $y$.I suspected $a_{9}$ and $a_{10}$ as a possible confounding variables. So at first I performed the multiple linear ...
1
vote
3answers
28 views

Linear Regression with vs without polynomial features

I have a conceptual question about why (processing power/storage aside) would you ever just use a regular linear regression without adding polynomial features? It seems like adding polynomial features ...
2
votes
1answer
147 views

Can GLM( generalized linear method) handle the collinearity between the predictor variables in a regression-analysis?

I'm a beginner in Machine learning and I've studied that collinearity among the predictor variables of a model is a huge problem since it can lead to unpredictable model behaviour and a large error. ...
0
votes
1answer
41 views

Multivariate Linear Regression with exponential trend-line

The dataset that I'm working with has 2 independent variables (qty, volume) and 1 dependent variable (cost). When I plot individual X with Y, it turns out qty vs cost gives an exponential decay trend ...
0
votes
0answers
12 views

No data point at some combination of categorical independent variables when doing linear regression

I am running a linear regression model which contains a few categorical independent variables. During the EDA, I found that some combination of these categorical variables doesn't really have data ...
0
votes
2answers
39 views

Linear Regression Model

I'm taking a course on Supervised Learning in R: Regression. There is a section where I'm supposed to predict blood pressure given age and weight. This is was MY approach ...
1
vote
0answers
36 views

Trusting p-values when errors are not normally distributed [duplicate]

Suppose I have a multiple linear regression model and the errors are not distributed normally.Does the central limit theorem hold true in this case? should i trust the p values of the coefficients of ...
1
vote
1answer
35 views

Does it violate the assumptions of linear regression to perform it on time series data?

One of the assumptions of linear regression says that the errors must be independent i.e., the residuals must not depend on each other. Let's say we are using linear regression to model the ...
0
votes
1answer
26 views

Which supervised machine learning algorithms assume normally distributed feature variables?

I want to understand the assumptions made by supervised machine learning models. I've heard it said many times that 'you need to make sure your feature variables are normally distributed for your ML ...
2
votes
1answer
36 views

How to solve (or even effectively think about) a complex real-life multivariate problem

In my work, we get estimates. An estimate may include up to 12 different categories of costs (Development, Legal Travel, etc.) to produce any number of assets/deliverables from dozens of different ...
3
votes
1answer
56 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 (...
1
vote
3answers
72 views

Why would it be bad to fit a regression model to a binary classification problem?

Let's say that we have a binary classification problem. Why would it be bad to fit a linear regression and then classify given a threshold? The output would be continuos and it could be out of range,...
0
votes
1answer
26 views

Deciding what type of model to use for predicting the bottom decile of student grades

I have a large dataset which includes 36 variables (in %iles) to describe a student, and then the output is the students grades as a %ile. I am trying to predict, using the 36 variables, whether a ...

1
2 3 4 5
11