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
vote
0answers
16 views

Dynamic window regression model

I have a signal and want to predict y which present Number of requests, using regression models. Currently, I am using OLS regression model to predict y. But the prediction error is very high, as my ...
-1
votes
0answers
9 views

Linear Regression vs. Classification Trees

I had seen a lot of debate about use of linear regression and use of decision trees. There are no rules prescribing which one to use when, but could it be possible that methodologically both models ...
2
votes
0answers
7 views

Varying strength of prior for MCMC hierarchical linear model

I am training an MCMC model in using Pymc3. My aim is to build a series of linear regression models which will predict the time to unload a truck, based on the number of crates to unload. I have ...
1
vote
0answers
30 views

interpreting multi linear regression results

am very new to all of this and am taking baby steps learning this (so please be merciful). I have imported my csv file into python as shown below: ...
0
votes
1answer
17 views

How to handle missing data data in dependent variable?

I'm solving a ML problem statement where there are around 40k records in the dataset. A dependent variable is given in the question (There are many independent variables). But there are some 2k ...
2
votes
2answers
23 views

Difference between various linear regression implementations

Aim: To find the coefficients for the regression line (hyperplane in case of multiple variables?) that models the data best. Let's call this w What is the difference between: 1) Estimating using ...
0
votes
0answers
11 views

What could population evolution percentage along with population benefit the training model

I have many numeric and categorical data to train on and predict if any client would churn contract or not. Data is like: ...
0
votes
1answer
37 views

What could be a dataset in which the presence of an outlier dramatically affects the performance of Ordinary Least Squares (OLS) regression?

I am tasked with giving an example of a dataset in which the presence of an outlier dramatically affects the performance of Ordinary Least Squares (OLS) regression. I've searched and searched the web ...
0
votes
0answers
54 views

Using greedy feature selection for linear regression in Python

This is a homework problem for a machine learning course I'm taking. I'll be as descriptive as I can regarding the approaches I took, what worked, and what didn't. We are given four types of data ...
0
votes
2answers
12 views

How to determine the function is linear in linear regression problem?

I know that the first degree of the polynomial equation is considered as a linear function. But, I found some things confusing in linear regression. ...
1
vote
1answer
44 views

image recognition: fully connected network vs CNN

To recognize handwritten digits, I have a fully connected network, containing only 2 layers: input layer (all pixels of the image) and output layer (0 or 1). I use the simplest linear regression for ...
1
vote
1answer
27 views

Linear Regression in python with multiple outputs

I have a time series dataset which represented as following: ...
2
votes
1answer
29 views

How to derive the sum-of squares error function formula?

I'm attending a Machine Learning course and I'm studying linear models for classification right now. Slides present approaches to learn linear discriminants (Least squares, Fisher's linear ...
1
vote
1answer
22 views

Evaluation of linear regression model

I want to evaluate the performance of my linear regression model. I have the true values of y (y-true). I am thinking of two way for evaluation but not sure which one is correct. Let's assume that ...
0
votes
0answers
14 views

Distribution of Features

I am using a dataset. The aim is to predict the average monthly loss to the company. With feature enginnering I have introduced a feature loss using workload(given per day) and the absence (given per ...
0
votes
0answers
8 views

What is shown when results of linear Q-learning during training is better than deep Q-learning?

What is shown when results of linear Q-learning during training is better than deep Q-learning? I have experienced during 1000 episodes and compare the results of DQN and Linear Q-learning (having ...
1
vote
0answers
30 views

comparison of linear Q-learning and DQN

I saw in DQN nature paper 2015 https://www.nature.com/articles/nature14236(Extended Data Table 4) some comparisons between DQN and linear Q-learning. The ratio ...
0
votes
0answers
18 views

Fitting a gradient boosting regression model on residuals of a linear model

I'm working on time series forecasting of electrical consumption. What you need to know is that there are tons of categorical features, so I opted for a regressive model (gradient boosting) instead of ...
0
votes
1answer
27 views
0
votes
0answers
13 views

Comparing the performance (reward) of dqn and logistic q-learning?

I have tried to compare my DQN results (rewards) with logistci q-learning (omitting the hidden layer, just inputs and outputs with a sigmoid activation function) My rewards of logistic-Q-N is about 5-...
0
votes
1answer
16 views

How to replace NA Data using a regression?

My dataset contains some stocks and some bitcoin titles. I would like to replace NA data (normal stocks are not traded on sat. and sun.) using a regression on the stock itself. How can i do this?
0
votes
1answer
59 views

Difference between Gradient Descent and Normal Equation in Linear Regression

Hi I am new to Linear Regression. I want to know what is the difference b/w Gradient Descent and Mean Square Error in Linear Regression using machine learning? And When to use Gradient ...
3
votes
2answers
115 views

How can I check the correlation between features and target variable?

I am trying to build a Regression model and I am looking for a way to check whether there's any correlation between features and target variables? This is my ...
2
votes
1answer
25 views

Does Orange scale the data automatically for the linear regression with Ridge regularization

I'm using the linear regression tool with the Ridge regularization. To use the Ridge regularization I have to scale the data first. Does Orange scale the data automatically? I can't find any ...
1
vote
2answers
16 views

Dealing with diverse groups in regression

What happens if a certain dataset contains different "groups" that follow different linear models? For example, let's imagine that examining the scatterplot of a certain feature $x_i$ against $y$ we ...
0
votes
1answer
56 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
80 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
26 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
26 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
10 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
33 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 ...
3
votes
2answers
41 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: ...
3
votes
2answers
81 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
1answer
72 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
35 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
188 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
47 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
36 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
41 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
59 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
10 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
91 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
43 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
54 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
62 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
14 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
37 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
19 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 \...