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.

0
votes
0answers
9 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
6 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 ...
0
votes
1answer
32 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
16 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
9 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
13 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
24 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
42 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
26 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 ...
0
votes
0answers
47 views

Applying machine learning to time series data and extracting meaningful patterns

I was just wondering if I could get some advice from all you experts who might be able to advise me as a (brand)newcomer to machine learning! I posted this on stack exchange but was told this forum ...
0
votes
0answers
12 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 ...
0
votes
0answers
16 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
40 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
49 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
38 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
25 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
30 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
28 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
43 views

Linear Regression Error

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
31 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
12 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
39 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 ...
0
votes
0answers
10 views

too few data while too many degrees of freedom in linear regression

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

find the values of theta in a cost function from andrew ng course

I was following Andrew NG ML course on coursera. I was stuck at cost function. How can I find values for Theta-0 and Theta-1 ? ...
0
votes
0answers
4 views

How to attribute variance to an input parameter?

Some data Maybe this is easiest to explain by going straight with the data. Here is how much money Bob has at the end of each day. ...
0
votes
1answer
11 views

Website for Datasets - Miles and Shevlin book, “Applying Regression & Correlation”

I've very much enjoyed Miles and Shevlin (2015) book, "Applying regression & correlation : a guide for students and researchers." The book mentions availability of datasets, but the website ...
1
vote
1answer
22 views

Loss function of linear regression

How do we decide whether mean absolute error or mean square error is better for linear regression? Are there other loss functions that are commonly used for linear regression?
0
votes
1answer
118 views

Obtaining a confidence interval for the prediction of a linear regression

The data I am working with is being used to predict the duration of a trip between two points. There are about 100 different trips in the data and ~90k observations. I am using the standard pattern: ...
0
votes
1answer
42 views

What's a good machine learning model for an univariate data set?

Here's my problem scenario:- I have to come up with a power equation as a function of frequency. The plot fits well with a higher order polynomial (4th or 6th) :- $$Power = \theta_0 + \theta_1 fr^1 + ...
0
votes
2answers
32 views

Does the choice of error function impact the model parametrs?

Suppose I have trained a multi variate linear regression model on a particular training set, and the model parameters $\theta=[\theta_1,\theta_2,\ldots, \theta_n]$ were determined by minimizing a cost ...
-1
votes
0answers
41 views

Fitting very complex signal in python

Can you suggest a robust regression model in python that can be used to fit below signal? I tried ols, and nnls and gives me a very bad result
1
vote
1answer
28 views

How to transform features order to make their distribution normal?

After sns.pairplot(df) command, I got this picture: The question is what transformation to use in order to make the distributions normal? Thank you
2
votes
1answer
15 views

P-value mining on large number of combinations of variables

I really don't know any machine learning, but have a problem that seems like one where I should use some ML algorithm. I am analyzing a medical study with one age-related condition, age, a treatment, ...
0
votes
0answers
28 views

Getting NaN output on test predictions, first attempt at building a model

I have been successfully following the tutorial examples on the Tensor Flow site and decided to implement my first model based on the Regression example of the Boston Housing data set. I have split ...
1
vote
0answers
23 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 ...
2
votes
0answers
13 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 ...
0
votes
1answer
81 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: ...
1
vote
1answer
37 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
25 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 ...
-1
votes
0answers
12 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
39 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 ...
-1
votes
0answers
112 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 ...
1
vote
2answers
19 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
51 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
89 views

Linear Regression in python with multiple outputs

I have a time series dataset which represented as following: ...
2
votes
1answer
34 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
26 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
20 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
10 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 ...