We’re rewarding the question askers & reputations are being recalculated! Read more.

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
1answer
23 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 ...
0
votes
0answers
11 views

Analytical question with r [closed]

evaluating the effect of the weather conditions on wages can be propoed in an Analytical point of view and machine learning and how can I prove it
0
votes
1answer
24 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 ...
0
votes
1answer
19 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 ...
0
votes
0answers
3 views

standard error of the estimate for each feature? [migrated]

I am reading a book in which it gives a linear regression example with multiple features, and it talks about standard error of the estimate (SE) for the weights of each feature, as shown below but ...
0
votes
1answer
121 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 ...
0
votes
2answers
29 views
0
votes
1answer
32 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 ...
0
votes
1answer
35 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 ...
0
votes
1answer
18 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 ...
0
votes
1answer
36 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.
1
vote
1answer
28 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 ...
0
votes
3answers
63 views

Gradient decent in Python

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 ...
0
votes
1answer
26 views

Linear regression compute theta

I'm trying to compute the theta for a regression linear exercice. ...
0
votes
2answers
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 ...
0
votes
0answers
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
0
votes
2answers
24 views

Normal equation for linear regression

I am going through the derivation of normal equation for multivariate linear regression. The equation is given by : $\theta = (X^{T}X)^{-1}X^{T}Y$ The cost function is given by: $J(\theta) = \frac{...
1
vote
1answer
23 views

Dividing the weights obtained on an already standardized data set by the standard deviation of the features? (Ridge regression)

I'm trying to understand a code snippet from my lecture on Machine Learning (see the code below). It extracts the mean and standard deviation of the features and uses them to 'normalize' (...
3
votes
1answer
32 views

Predicting the speed of a car

I'm working on the commaai speedchallenge. The goal of the challenge is to predict the speed of a car based on a dashcam video. So far all the examples that I found (example 1, example 2) use some ...
0
votes
0answers
10 views

Irregular output from Statsmodel after Regression Fit

I'm using Python's Statsmodel package for a regression to impute missing data for another column. I have checked the shape of my data going into the model, and it checks as expected. However, on the ...
0
votes
1answer
43 views

Cross-validation average score

I am using Repeated K-folds (RepeatedKFold(n_splits=10, n_repeats=10, random_state=999) from sklearn) to provide reliable scores for a linear regression on my ...
1
vote
2answers
45 views

Linear Regression model visualization

I am trying to visualize, how does the linear regression model draw a straight line when we have multiple features and one label to predict. Like when we have 1 feature and 1 label, we can easily plot ...
0
votes
0answers
35 views

Same coefficient in multivariate regression with dummy variables

Hello Data Science community, I have a model with 1 quantitative variable (y) and 2 categorical variables. In order to work with the categorical variables I have created dummy variables (binary) for ...
0
votes
2answers
162 views

Multivariate Regression Error “AttributeError: 'numpy.ndarray' object has no attribute 'columns'”

I'm trying to run a multivariate linear regression but I'm getting an error when trying to get the coefficients of the regression model. The error I'm getting is this: AttributeError: 'numpy.ndarray' ...
1
vote
1answer
18 views

Interpreting fraction of zero weights in TensorFlow

I am using the TensorFlow to do a simple linear classification using logistic regression. The graph included from the TensorBoard displays what they call the fraction of zero weights. How do I ...
2
votes
1answer
25 views

is the logit transform ever actually computed in modeling process of logistic regression?

i've been tying to wrap my head around logistic regression, the logit transform, and the sigmoid function. logit transform: from what i understand, in practice all we want to do is maximize the ...
0
votes
1answer
20 views

shapes (127,1) and (13,) not aligned: 1 (dim 1) != 13 (dim 0) [closed]

i am try to find score of linear regression it gives me this type error my code is below ...
0
votes
1answer
6 views

Using a trained Model from Pickle

I trained and saved a model that should predict a sons hight based on his fathers height. I then saved the model to Pickle. I can now load the model and want to use it but unfortunately a second ...
0
votes
0answers
18 views

Linear Regression Error in feature matrix step

I'm trying to code the design function used in linear regression using numpy and I get this error: Traceback (most recent call last): File "C:\Users\visha\AppData\Local\Continuum\anaconda3\lib\...
2
votes
0answers
30 views

Linear Regression in Python using gradient descent

I am trying to implement a simple multivariate linear regression model without using any inbuilt machine libraries. So far, I have been able to get a root mean squared error for training about $2.93$ ...
0
votes
2answers
67 views

Gradient Descent or Normal Equation?

Hi guys I am really struggling with this question. I need to pick the correct choice: Suppose you have a dataset with m = 50 examples and n = 15 features for each example. You want to use ...
2
votes
2answers
54 views

Which Technique should we use for predicting an integer output?

I'm working on a problem where my target feature of type integer. i.e (n_clicks). In general, if we want to predict categorical target feature then we use classification algorithms and on the other ...
1
vote
1answer
115 views

Why $L2$ loss is strictly convex if number of samples $N$ is larger than input dimension $d$?

I am using $L2$ loss in my linear regression problem and I have to prove that my $L2$ loss is strictly convex if number of samples $N$ is larger than input dimension $d$. I think, if I can prove ...
0
votes
1answer
32 views

Linear Regression: Why use global basis functions instead of local basis functions

I'm looking through an online course about machine learning and the first big topic is finding a model that approximates our data with linear regression. The model itself is linear function and we ...
0
votes
1answer
26 views

Linear Regression vs Generalized linear regression

What is the difference between Linear Regression and Generalized Linear regression of degree 1? because linear regression uses ordinary least square method to find the best fit but GLM uses least ...
1
vote
0answers
26 views

Why do I get such a high MSE when I choose a multivariate target?

I have this dataset: Here's how I currently create my data and univariate target: ...
0
votes
0answers
10 views

How to encode features that encode regular values as well as special categorical values

I was recently playing around with the FICO explainable machine learning challenge dataset. In the dataset, there are a bunch of numerical features which have values values typically in the 0-100 ...
0
votes
1answer
77 views

Gradient descent formula implementation in python

So I recently started with Andrew Ng's ML Course and this is the formula that Andrew lays out for calculating gradient descent on a linear model. $$ \theta_j = \theta_j - \alpha \frac{1}{m} \sum_{i=1}...
0
votes
0answers
26 views

Linear/Logistic Regression for unknown values or how to get a good prior for new coefficients

Suppose, we model the probability of making holidays by country and town. The input data are people and how many people actually made holiday in that particular town: ...
0
votes
1answer
30 views

How to use a a trained model

I just trained my first model in Python 3.7/scikitlearn (Linear Regression) (well I copied most of the code but its something ^^). Now I want to actually Use the model. Specifically its about sons ...
0
votes
2answers
44 views

Why use deep neural networks over methods like linear regression or SVM?

This is a very broad question, but I was wondering why researchers would choose a deep neural network over linear regression or SVM? As in, what are the advantages and disadvantages of both?
0
votes
0answers
21 views

Linear regression: Selecting number of features with BIC/AIC

Im looking into selecting a linear model based on its BIC/AIC rather than its CV-score. Basically I run 10-fold CV using RFE and I obtain a training-MSE, ...
0
votes
1answer
31 views

Calculate coefficient w*

I'm learning ML from Bishop's book. But I don't know that How should I calculate w* in the below picture.
2
votes
0answers
35 views

Assumptions made when modelling with ML/AI approaches vs. “conventional” statistical models

I was wondering if there is a good paper out there, that informs about model and data assumptions in AI/ML approaches? For example if you look at Time Series Modelling (Estimation or Prediction) with ...
1
vote
1answer
30 views

How Linear SVM Regression and Multiple Linear Regression different in terms of the regression result?

They starts from the same equation as below. y = w*x + b But they solve it differently. MLR specified the w and b by minimizing the square error whereas SVM specified w and b by minimizing the loss ...
0
votes
0answers
51 views

Mean encoding for linear regression: leveraging domain expertise

I'm trying to build a linear model to predict a customer satisfaction score that measures the overall store experience. My customer could interact with my store using an offline channel (physical) or ...
0
votes
1answer
22 views

Appraise the statement: “For the model 𝑦 = 𝛽0 + 𝛽1𝑥 + 𝑒, 𝛽1 reflects the causal effect of 𝑥 on 𝑦.” Ask

not sure if this was the right place to ask my question, but I saw some questions regarding linear regression so I'd thought I would try to get some answers here. I just started learning about linear ...
0
votes
0answers
6 views

Multiple linear the final X output is the same as the imported one despite the fact that p-value are bigger than 0.05

I am making a simple test on multiple linear regression. Importing datasets and libraries ...
0
votes
4answers
43 views

Analyzing country data. Does duplicating observations by population for regression make sense?

Question: While analyzing country happiness data via OLS regression, should I duplicate observations based on country population? Example: If duplicating per million, the U.S. would have 327 ...
0
votes
1answer
92 views

How to combine nlp and numeric data for a linear regression problem

I'm very new to data science (this is my hello world project), and I have a data set made up of a combination of review text and numerical data such as number of tables. There is also a column for ...