Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [linear-regression]

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

0
votes
1answer
58 views

Can a Neural Network Measure the Random Error in a Linear Series?

I have been trying to develop a neural network to measure the error in a linear series. What I would like the model to do is infer a linear regression line and then measure the mean absolute error ...
0
votes
0answers
14 views

What does this residual-fitted value plot show?

I am trying to fit a linear regression model, where my Y and X variables are all continuous. I have applied a vanilla linear regression in R, and I am trying to understand if the model fits all the ...
1
vote
1answer
40 views

neural network to find a very simple linear model (scikit-learn)

I'm trying to test different machine learning algorithm to try to find correlation between various data on MRI scans. Since I'm dealing with medical data, I don't have access to many events, but still ...
1
vote
0answers
26 views

Linear regression load model doesn't predict as expected

I have trained a linear regression model, with sklearn, for a 5 star rating and it's good enough. I have used Doc2vec to create my vectors, and saved that model. Then I save the linear regression ...
2
votes
1answer
53 views

Understanding minimizing cost correctly

I cannot wrap my head around this simple concept. Suppose we have a linear regression, and there is a single parameter theta to be optimized (for simplicity purposes): $h(x) = \theta \cdot x$ The ...
-2
votes
0answers
18 views

linear mixed plot [closed]

what is the factor to consider linearlity of plots.
2
votes
1answer
58 views

Normalizing the data set

I have two questions : Why doesn't normalization have any effect on linear regressor performance (mathematical approach is appreciated ) ? When we normalize the training set we ought to normalize ...
1
vote
1answer
20 views

Can I use Linear Regression to model a nonlinear function?

I have recently started studying the basics about regression, and as a beginner I started by Linear Regression. I read this article that says that for this particular type of regression the ...
0
votes
2answers
18 views

How do I correctly build model on given data to predict target parameter?

I have some dataset which contains different paramteres and data.head() looks like this Applied some preprocessing and performed Feature ranking - ...
1
vote
1answer
30 views

Partial least squares (PLS)

I am relatively new to Orange, trying to utilise it for linear regression, in particular partial least squares (PLS). My statistics knowledge is in the moment not good enough to know whether I could ...
4
votes
2answers
59 views

Difference between output of probabilistic and ordinary least squares regressions

If I execute the commands my_reg = LinearRegression() lin.reg.fit(X,Y) I train my model. To my understanding training a model is calculating coefficient ...
2
votes
1answer
39 views

What kind of a fit would be suitable for this?

Below is a scatter plot of the data set I am dealing with. The X axis is the total number of words per essay for a particular individual, and they Y axis is the number of unique words. In principle, ...
0
votes
2answers
18 views

How to handle continuous values and a binary target?

This is going to be a very beginner's question. I have a datset of continues features like LoanAmount, LoanDuration(multiclass?), ... ClientIncome, ClientFreeSources, etc. and a binary target whether ...
0
votes
2answers
20 views

What is purpose of partial derivatives in loss calculation (linear regression)?

I am studying ML and data science stuff from scratch. As a part of the course, I am studying how the models are derived. And for most of them, starting with the simplest - linear regression, we take ...
0
votes
1answer
23 views

model.score and r2_score giving different values for a regression model

I am build a linear regression model and a decision tree model using sklearn. I want to compare the performance of these two models, I have calculated the r2_score for both the models. I have ...
2
votes
1answer
42 views

How to force weights to add to $1$ in Linear regression

I am using a linear regression using scikit-learn in python. However, I would like to force the weights to add to $1$. Is there a way to do this? I know that I need to add a constraint but am not able ...
1
vote
1answer
31 views

Linear regression model with (categorical) predictor variables

I used LM model with (categorical) predictor variables on my data in r like this (I have count variable as dependent/target variable): ...
2
votes
1answer
14 views

In a residuals vs fitted plot, how do I interpret a homoscedastic variance that is not randomly distributed above/below the line?

I'm learning linear regression, and I ran a step function for linear regression and checked out the residuals vs fitted plot for the final equation. The residual looks homoscedastic but it's not ...
8
votes
3answers
145 views

Is a “curve” considered “linear”?

In linear regression, we are fitting a polynomial to a set of data points. In Bishop's book of Pattern Recognition & Machine Learning, there are a few examples where the fit is a curve or a ...
1
vote
1answer
15 views

Functions to do MLE and MSE calculations in R

Are there libraries available or does one have to write these functions from scratch.
1
vote
4answers
38 views

Which statistical model should I run to get a good model

I'm working on an analysis to analyze projected man-hours vs actual man-hours used for different teams. My data looks like this below. The software I am using is SAS. I've tried a HP linear ...
4
votes
1answer
78 views

Does Gradient Boosting detect non-linear relationships?

I wish to train some data using the the Gradient Boosting Regressor of Scikit-Learn. My questions are: 1) Is the algorithm able to capture non-linear relationships? For example, in the case of y=x^2,...
0
votes
1answer
33 views

Machine learning using python

ImportError=cannot import name 'GaussionNB' from 'sklearn. naive_bayes' (F:\anaconda\lib\site-packages\sklearn \naive_bayes.py How I can remove this error!? ...
0
votes
1answer
27 views

What is the best way to predict time series data? [closed]

I have monthly price data for tomatoes for the last 9 yrs for a particular town and I'm looking to predict the prices of tomatoes 6 months into the future. I had considered using Linear Regression in ...
5
votes
4answers
158 views

Is the prediction algorithm absolutely the same for all linear classifiers?

Is the prediction algorithm absolutely the same for all linear classifiers and linear regression algorithms? As known, any linear classifier can be described as: ...
1
vote
3answers
58 views

In linear regression, is there anything I can do if the coefficient for one of the features is unrealistic/inappropriate?

I'm building a simple linear regression model that predicts Home Price using Square Footage, Number of Bed(s), and Number of Bathroom(s). After creating the model, I noticed that the coefficients for ...
1
vote
1answer
24 views

Why is correlation between my independent variables helping my linear regression model?

I am working with PUBG data and developing a linear regression model for the same ! Now there were three features in my original dataset, ridedistance, swimdistance, walkdistance. I combined the three ...
0
votes
0answers
13 views

Why do we reduce magnitude of the coefficient in regression

Why do we reduce the magnitude of the coefficient in regression? how does it help the model?
0
votes
0answers
12 views

homogeneity of variance in logistic regression

One of the assumptions of logistic regression states that homogeneity of variance need not be satisfied. Can someone explain the reason for this? I know that homoscedasticity(constant variance around ...
3
votes
1answer
52 views

Linear optimization problem of $argmin$

Consider a vector $a \in R^n$. I want to know how I can find analytically the solution of the following optimization problem: $x^* = argmin_{x \in R^n} f(x)$, where $f(x) = ||x-a||_{2}^2 + \lambda ...
0
votes
1answer
24 views

LinearRegression with multiple binary features sometimes performs poorly

I have a dataset comprising a number of binary features which are the dummies (as in, pd.get_dummies()) of categorical features. SalePrice is my target variable. ...
0
votes
0answers
10 views

Is there any purpose to having more output features than input features for a linear model?

If we have a vector of say 64 features and we want to feed that through a linear model which outputs 256 features, is this a reasonable thing to do? Part of me thinks that it is useless to have more ...
1
vote
0answers
19 views

What's the correct objective function for cosine similarity of two vectors to be 1 or 0?

The representation learning model produces vectors for objects. I want the cosine similarity of some vector pairs to be (close to) 1, some to be 0. What objective function should I use? MSE as ...
1
vote
1answer
31 views

How is y=mx+b different from hθ(x)=θ0+θ1x?

I could not quite comprehend the hypothesis represented by hθ(x)=θ0+θ1x To find out good values for the parameters θ0 and θ1 we want to minimize the difference between the calculated result and the ...
0
votes
1answer
65 views

How to represent linear regression in a decision tree form

I have read that decision trees can represent any hypothesis and are thus completely expressive. So how do we represent the hypothesis of linear regression in the form of a decision tree ? I am ...
0
votes
1answer
125 views

Mean Absolute Error in Random Forest Regression

I am new to the whole ML scene and am trying to resolve the Allstate Kaggle challenge to get a better feeling for the Random Forest Regression technique. The challenge is evaluated based on the MAE ...
-1
votes
0answers
21 views

Predicting new data with the same regression model

I've applied a linear regression model for a training dataset and wish to expand it to a new untested dataset to observe its performance. However, I couldn't make Matlab recognize the new dataset with ...
-1
votes
0answers
17 views

Low AUC in a Linear Regression Model

I am using AWS Machine Learning service to create my own Linear Regression model using my own dataset, however when the model is created the Evaluation Summary shows a very low AUC of 0.519 The ...
2
votes
1answer
47 views

Non-linear Regression

For example suppose I've data set which looks like: [[x,y,z], [1,2,5], [2,3,8], [4,5,14]] It's easy to find the theta parameters from those tiny data set. ...
1
vote
1answer
85 views

Why don't we use Manhattan distance instead of euclidean distance in linear regression?

When I am explaining concept of linear regression to one of my peers, I got stuck in answer this question. Why don`t we use Manhattan distance instead of euclidean distance in linear regression? Can ...
0
votes
1answer
41 views

When is a neural network better “traditional” models like decisions trees and lassos?

There's a whole theory of statistical inference based off calculus studying consistency, efficiency, robustness, BLUE, unbiasedness of linear models (Gaussian,Exponential, Chi-square, F-distribution, ...
3
votes
2answers
29 views

Regression for discrete values?

Im a noob in ml / statistical algorithm, but I do have worked with simple classifiers and regression I like some opinions if I am going the right way, given my limited knowledge My problem is ...
0
votes
1answer
45 views

Getting negative r2_score with new set of dimensions

I am trying to predict flight take off delay using my current dataset. At this point of time, I only have four dimensions. ...
0
votes
1answer
31 views

What are the assumptions of linear regression [duplicate]

Can anyone explain the assumptions of linear regressions? If possible with an example? Is this really important to check these assumptions before proceeding?
0
votes
3answers
149 views

Linear Regression Error [closed]

I tried creating a simple linear regression model on just 30 rows of data. I got this error while trying to fit the model: ...
0
votes
1answer
43 views

Linear machine learning algorithms “often” have high bias/low variance?

In this blog, which explains the meaning of bias and variance in machine learning, there's a line under the heading "Bias-Variance Trade-Off" which says: Parametric or linear machine learning ...
0
votes
1answer
14 views

What affects the magnitude of lasso penalty of a feature?

Is there a way to intuitively tell if the lasso penalty for a particular feature will be small or large? Consider the following scenario: Imagine we use Lasso regression on a dataset of 100 features ...
0
votes
1answer
57 views

Cost function in linear regression

Can anyone help me about cost function in linear regression. As from the below plot we have actual values and predicted values and I assumed the answer as zero but it actually is 14/6? Can anyone ...
1
vote
0answers
14 views

input transformation for polynomial regression

First I apologize if the question is not very clear as I'm new to this field. I'm doing a university project to create polynomial regression in python without any kind of libraries. In our class the ...