Stack Exchange Network

Stack Exchange network consists of 174 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.

-1
votes
0answers
29 views

Linear Regression performance in R

I have a problem with R's performance: here is my Script. The problem is that I need to use it in a base with ~6m of clients (with one linear model per customer) and it's taking to long to process. ...
1
vote
2answers
65 views

What are the differences between logistic and linear regression?

I know that linear regression does "regression" and logistic regression does "classification". When we implement these two methods, the only difference I could notice is the loss function: linear ...
3
votes
2answers
25 views

Why isn't local averaging (including KNN) used often for regression?

My professor said that the "holy grail of regression" is the function E(Y|X=x) i.e. the conditional expectation of Y on X. In practice, you'd take a small window of X and take the average value of Y ...
3
votes
0answers
11 views

Recreating sklearn linear regression from coefficients and intercept

I am attempting to write my own linear regression function using the coefficients and intercept achieved using the sklearn LinearRegression model. I have 11 ...
0
votes
0answers
9 views

If we use nonliear mapping to map two similar picture,how about the relation of the feature bewteen this two picture?

Supposed this two picture are dogs,and we use the random nonlinear mapping weights ,and the feature of dog will be similar?
2
votes
1answer
32 views

Which of the following linear regression model is better?

Consider 2 regression models on the same data set. Model 1 : $R^2 = 90$% , $R^2(adjusted) = 80 $%, $R^2(pred) = 70$% Model 2 : $R^2 = 60$% , $R^2(adjusted) = 59 $%, $R^2(pred) = 58$% In the first ...
2
votes
2answers
30 views

Is there a definitive and more conclusive way of interpreting the R^2 score from a linear regression model in terms of prediction accuracy?

I'm trying to find a definitive way to conclude the R^2 score from a prediction accuracy point of view rather than variance. How should I do it? Conceptually, most blogs / articles explain R^2 as: ...
1
vote
2answers
67 views

Is NN with no hidden layer is behave like a regression?

Is a NN with no hidden layer is behave like a regression? What we could say that NN without hidden layer can say us? ​ If we have for instance 20 input and 4 output and I have no true label, is it ...
1
vote
0answers
26 views

demand forecast for B2B

I am attempting to create a demand forecasting model in python to predict future sales of a particular category of product, using historical sales data. We are a B2B company, which means that we ...
2
votes
1answer
29 views

Selecting the right time series model [closed]

Using Python, I am trying to predict the future sales count of a product, using historical sales data. I am also trying to predict these counts for various groups of products. For example, my columns ...
5
votes
2answers
77 views

Dealing with feature vectors of variable length

How does one deal with a feature vector that can vary in size? Let's say per object, I calculate 4 features. In order to solve a certain regression problem, I may have 1, 2, or more of these objects (...
1
vote
1answer
26 views

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

I need to read data from csv file and then first partition that data into features and labels and then into training and testing set. However, there are several issues cropping up again and again. ...
0
votes
0answers
28 views

Different results for Linear Regression using lm (R) vs linear_model (sklearn-python)?

I'm implementing a linear regression to compare users (categorical variable) to a percent difference (target variable and continuous). When I was using linear_models from sci-kit learn (python), the ...
0
votes
2answers
35 views

Elastic net regression in orange

The penalty term for Elastic regression is written as How are the values of lambda's calculated if the slider is moved from the right to the left. I have read most the material available on the ...
1
vote
0answers
19 views

Linear approximation of the given equation with python3 [closed]

I was given a set of raw datum and have to model it by means of some machine learning techniques. After some research, I decided to do with the method of linear approximation. Description of the ...
1
vote
1answer
21 views

Linear regression, R²?

When I do a linear regression, R²: 0.90, but the estimates are not correct, why is this happening? (Deep Not : Adjusted R-squared: -0.3872)
2
votes
0answers
9 views

Quantile regression with inhomogeneous density of points

I am working on a dataset that can be represented this way: We can see that the lower values on the y-axis are increasing linearly along the x-axis. I want to estimate the coefficients of this ...
1
vote
1answer
39 views

tensorflow categorical data with vocabulary list - Expected binary or Unicode string, got [0,1,2,…]

I'm brand new to machine learning (having just completed the google machine learning crash course) and thought it would be good to try my hand at a Kaggle competition as a good starter to some real ...
1
vote
1answer
29 views

Why is ElasticNet performs worse than both Lasso and Ridge?

I am using the following codes to build a few models on the same dataset: ...
2
votes
1answer
37 views

What is the differences between normal equation and gradient descent for polynomial regression

I'm new to machine learning and willing to study and work with machine learning. It just that I still don't get to understand the benefits of using the normal equation in some occasion in comparison ...
0
votes
0answers
26 views

Lasso regression: why we need fit_intercept?

I am looking into the sklearn lasso function. There is a parameter called fit_intercept=True. This is a bit confusing to me ... ...
0
votes
0answers
11 views

Add constrain in to the linear regression. potentially still using sklearn

I am using sklearn to fit a simple lasso regression model. ...
1
vote
1answer
11 views

How the term “R-squared” in VIF(variance inflation factor) is different from normal R-squared calculation?

In normal calculation of R2 , more the value of R2 , it indicates variable represents more variance across the dataset. But in the calculation of VIF (variance inflation factor), higher the value of ...
2
votes
1answer
30 views

Predict the accuracy of Linear Regression

How do I test if the predicted values in Linear Regression model are matching with the actuals? I tried using - Confusion matrix, but I get this error - ...
1
vote
1answer
17 views

How does combining two linear perceptrons create non-linear boundaries?

I don't understand the equation that you get from combining the two linear perceptrons is non-linear? The video starts with two linear perceptrons with the equations: $$e1 = 5x_1 -2x_2 - 8 = 0 \...
0
votes
1answer
70 views

How to apply StandardScaler and OneHotEncoder simultaneously in Spark Machine learning?

I try to create a machine learning model, linear regression, to predict a price of a diamonds. All examples that I found online do not have a step with scaling of data, using MinMaxScaler or ...
-1
votes
1answer
25 views

Interpreting ANOVA results

I have 2702 records with one target variable (Y) and 11 independent/predictor variables (X1-X11). I am doing multivariable regression to understand if I can predict Y using X or if there is any ...
2
votes
1answer
127 views

What is the Time Complexity of Linear Regression?

I am working with linear regression and I would like to know the Time complexity in big-O notation. The cost function of linear regression without an optimisation algorithm (such as Gradient descent) ...
0
votes
0answers
21 views

Is there a “trend regression” that is not prone to “starting position” problems?

A lot of problems in forecasting consist of a trend and a seasonality. For example, in the international airline dataset. There, I applied a linear model to find the trend and another model for the ...
0
votes
2answers
18 views

Interpreting Results of Multivariable Regression / how to transform variables to improve results

I am working on a project that predicts the Market Cap (value) of different crypto-currencies. My data is very small (51 observations) and I initially have 18 X-variables. I was hoping to get feedback ...
1
vote
1answer
28 views

Why should re-sampling change the value of model's coefficients?

I have the code below in python to create LinearRegression model. When I train the model with re-sampled data, I get different values for its coefficients. I can't understand why that happens. Can you ...
0
votes
0answers
16 views

Stat-of-the-art Online Linear Regression alogirthms

I'm trying to find state-of-the-art linear regression algorithms for streaming datasets (online learning). However, I found only two algorithms so far, SGD regressor Passive Aggressive regression ...
0
votes
0answers
18 views

Problem statement formulation for time series forecasting

I have daily prices of major financial factors (Dollar Index, S&P 500, Gold,etc.) and I have to forecast sector returns on quarterly frequency. I am not able to formulate a machine learning ...
0
votes
2answers
43 views

time serie with only two values [closed]

Could any one help me know about different approaches, methods or algorithms to build a model to forcast a time serie which has only two values ( 0, 1 ) but they last over time each time . basically ...
0
votes
1answer
25 views

Can I use regression to solve a multiple equation problem

I'm working on a problem which is a multiple equation. I have a group of people and each person in the group is working on different tasks (e.g. n tasks in total). Each person in this group is working ...
0
votes
1answer
32 views

How do I plot linear regression results if input and target have different sizes? [closed]

For a linear regression model that I conducted, I'd like to review the regression plot of results. But since I have an input of size 6 parameters and target (output therefore) of 4, I get error when I ...
0
votes
1answer
70 views

Value error array with 0 features in linear regression scikit

My input and output data are written in an 6xn row-column excel file,thatI read them using pandas using this code : ...
1
vote
1answer
24 views

How to conclude, regression results can't be improved anymore?

I am trying to forecast sector's 1 month forward return using macroeconomic variables (170 variables). I tried a few things: For variable Selection Run regression with each one of the independent ...
1
vote
0answers
182 views

How to use Keras Linear Regression for Multiple input-output?

I was trying to use this code. I put part of the parameter list, but as you see the error indicates that it's taking the first member of each list to put in the first row and second ones for the ...
1
vote
1answer
150 views

Linear Regression Optimization

I am learning linear regression right now. In the most of the examples of implementation of this method, which I found, gradient descent is used. Is there a better way to optimize linear regression ...
2
votes
1answer
75 views

Weighted linear regression with a DNN (in Keras)

I have a fairly small dataset of 225 points. I have a target (labelled numeric), a feature (normalised numeric) and a quality index with set of normalised weights that describe the likelihood that the ...
4
votes
1answer
100 views

Implementing simple linear regression using a neural network

I have been trying to implement simple linear regression using neural networks in Keras in hopes to understand how do we work in Keras library. Unfortunately, I am ending up with a very bad model. ...
2
votes
1answer
100 views

My Neural network in Tensorflow does a bad job in comparison to the same Neural network in Keras

I am trying to predict "sales" from this dataset: https://www.kaggle.com/c/rossmann-store-sales There are>1,000,000 rows, I use 10 features from the dataset to predict sales I merged two datasets ...
1
vote
2answers
91 views

Linear Regression + KFold cross validation

I have a prepossessed data set ready and the corresponding labels (8 classes). I've already done KFold cross validation with K=10 with some classifiers such as DT,KNN,NB and SVM and now I want to do ...
0
votes
2answers
52 views

Predicting number of cars

I am predicting the number of cars from a traffic dataset. Here is my data dictionary : The ‘Traffic-Major-Roads(kilometres)’ file contains the following variables (variable names are in bold): ...
2
votes
3answers
57 views

Why replacing null values with outliers?

I have been watching a tutorial on stock price prediction with multivariate linear regression and the tutor replaces missing value data, NaN, with the outlier -99999. Why and how do replacements like ...
0
votes
0answers
13 views

Linear regression model with Automatic relevance determination VS sequential thresholding or Lasso?

Background Linear model with Automatic relevance determination is doing almost the same thing as sequential thresholding linear squares. And it is close to Lasso. I found both ARD and LASSO are ...
1
vote
2answers
63 views

Linear Model for Linear Regression

I'm new in Machine Learning and of the first concept I would like to learn is linear regression. I read that to apply linear regression I need to use a linear model. Starting from this assumption I ...
1
vote
2answers
41 views

Difference between Sum of Squares and Maximum Likelihood Linear Regression

I'm new in Machine Learning and one of the first arguments I'm studying is linear regression. I understood that , in few words , the idea to use the Linear Regression is to learn an hypothesis that ...
0
votes
2answers
32 views

Does high regression coefficient for Principal components that don't explain much variance imply that my data is not a good predictor?

There isn't much to add to the question. Essentially i had some data that I reduced to 4 principal components, the first two components of which explain 99% of the variance in my data. Upon building ...