Questions tagged [linear-regression]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

Best method to determine future success or to determine best linearity? [closed]

Long time viewer, but first time poster, so excuse me if i'm in the wrong place please. Anyway, I am working on a project that is pretty interesting. Through data mining, I am able to gather a ton of ...
0
votes
1answer
38 views

Dot product and linear regression

I'm studying PCA and my professor said something about finding the linear regression by doing the dot product of both axis. Could someone explain to me why? The dot product returns a number. What's ...
2
votes
2answers
39 views

How to interpret linear trends in residuals?

I am trying to compare companies in the same industry and see how Profit and Number of employees correlated. My linear regression looks something like this: Given the nature of the dataset, the model ...
0
votes
0answers
10 views

How to do feature reduction for a log-linear regression model

I'm building a log-linear regression model and I have 18 different variables in my model. 13 out of 18 variables I'm using are hot-encoded variables for holiday, e.g. showing which holiday it is. I ...
1
vote
0answers
19 views

Can elastic net l1 ratio be greater than 1?

I have multiple datasets that I trained with ElasticNetCV (sklearn), and I noticed that many of them selected l1_ratio = 1 as ...
0
votes
0answers
5 views

Encoding Data and huge loss during ANN training

I just started to learn on ANN and tried to experiment on my own on a Linear Regression. I got a dataset which had housing prices for a city. Tried going through this but my model gives me a huge loss....
3
votes
0answers
40 views

How to properly do feature selection when comparing different models?

Context: I'm currently crafting and comparing machine learning models to predict housing data. I have around 32000 data points, 42 features, and I'm predicting housing price. I'm comparing Random ...
0
votes
3answers
45 views

Whether Interaction terms should be included in Linear Regression analysis?

I am working on a linear model with 6 independent variables and when thinking about including an interaction I got lost. An interaction exists if the level of one independent variable is affected by ...
3
votes
1answer
32 views

How best to use the resale transaction year in predicting housing prices?

I'm looking into the classic problem of predicting apartment prices (resale market) based on the their type, size, location, etc. Pretty straightforward and Linear Regression or Regression Trees give ...
3
votes
1answer
56 views

Why do machine learning engineers insist on training with more data than validation set?

Among my colleagues I have noticed a curious insistence on training with, say, 70% or 80% of data and validating on the remainder. The reason it is curious to me is the lack of any theoretical ...
1
vote
2answers
22 views

Python function returning a 4x4 matrix instead of a floating number like in an equivalent Octave function in a Linear Regression problem

I am trying to translate code from Octave to Python, and I am stuck. I am aware they are libraries out there such as scikit-learn etc., but for my own learnin,g I would like to be able to implement ...
1
vote
1answer
25 views

Is knn similar to this version of k-means?

If we use k-means in a dataset where k is equal to the number of points in the dataset, and each cluster is made out of only a point. Considering that we have given a distance method, we can classify ...
3
votes
1answer
64 views

Which definition of Likelihood function is correct?

In the online version of the Deep Learning book on chapter 5 the estimator for likelihood function is defined as: That is the product of individual probabilities. After taking the log it arrives at ...
1
vote
0answers
6 views

Error term in probabilistic interpretation of least squares update rule

I have read in Stanford's CS229 course notes that to justify the least-squares update rule with probability, the following is assumed: $$y^{(i)} = \theta^Tx^{(i)}+\epsilon^{(i)}$$ , where $\epsilon^{(...
0
votes
0answers
6 views

Enforce Floor limit when predicting values using Multioutput Regression with Gradient Booster

I have a very simple program below that builds a model using multi-output regression. Even though all the training data consists of positive float values I'm discovering that predictions made often ...
1
vote
0answers
8 views

How do you calculate how many coefficients are necessary in polynomial regression?

So I can't seem to find much on this by searching so I came here. Let's say I had 3 variables $x_1,x_2,x_3$ and the let's say the degree of the polynomial was $d=2$, I can define the length of a ...
0
votes
0answers
31 views

How to retrieve results summary from statsmodels GLM with regularization?

I'm trying to fit a GLM to predict continuous variables between 0 and 1 with statsmodels. Because I have more features than data, I need to regularize. ...
0
votes
0answers
11 views

Linear Regression Model Validation with Transformed Data

I worked on a model that I applied a log10 transformation to the dependent variable. I am having trouble with manually calculating the R2 for both train and test dataset. The model looks like this. <...
0
votes
1answer
19 views

For very simple linear regression can we quantify the prediction accuracy hit between using one hot encoding and simple numerical mapping?

Suppose I had a simple linear regression model that had the following input or X variable: ...
0
votes
0answers
8 views

Are units sold,order quantity,Profit,loss continuous or discreet?

Continuous :Cant be counted and has no limit Discreet : Can be counted Please help to understand if my assumption is right or wrong linear regression is used to predict only continuous variables so ...
1
vote
1answer
28 views

Confused about polynomial regression with multiple variables

I'm trying to create a multivariable polynomial regression model from scratch but I'm getting kind of confused by how to structure it. So, I have an array of feature vectors such that each vector can ...
0
votes
1answer
21 views

Train error vs. Test error in linear regression by samples analysis

I have run a multivariate linear regression model on a small set of about 3500 samples. While the model's error is as large as expected, I also ran a bias vs. variance analysis by comparing the train ...
0
votes
0answers
31 views

Multivariable linear gradient descent resulting in inf

I am trying to implement a multivariable gradient descent algorithm, it seems to start working fine, and works on smaller datasets, but applying it to larger datasets the variables overflow and cause ...
1
vote
2answers
44 views

Predicting the likelihood that a prediction from a linear regression model is accurate

So to set up the problem: I have a data set that had labeled data like colour, brand and quality as independent variables and the dependent is RRP (price). I have made a linear regression model using ...
2
votes
0answers
15 views

Interpretation of the output from qqPlot (using car library)

Basically, I have created a linear model and am testing to verify the normality of my errors. As a result, I have used the qqPlot function from the car library and have gotten the graph that can be ...
2
votes
0answers
21 views

Reproduce Figure 3.2 in Introduction to Statistical Learning

Has anyone reproduced Figure 3.2 in Introduction to Statistical Learning (James et al)? https://trevorhastie.github.io/ISLR/ISLR%20Seventh%20Printing.pdf They have a contour plot with circles. Here is ...
1
vote
0answers
19 views

Performing Regression on Text and Image together in the most efficient way

I have a dataset with texts and images. The texts are present in a CSV file, which I am able to read using Pandas. The CSVs contain the image names, and I have the corresponding pngs which are ...
0
votes
1answer
26 views

Is it necessary to take log transformation on the data values to get the minimum mean squared error? [closed]

I have tried the house price prediction problem using simple linear regression by using the square feet as independent variable and price as dependent variable.while trying to check the MSE of the ...
0
votes
0answers
16 views

F-Value P-Value T-Value linear regression interpretation

The following is what I found and understood and put in use without really understanding the logic behind it! The t-value measures the size of the difference relative to the variation in your sample ...
1
vote
1answer
35 views

Polynomial Regression Not Overfitting as Expected

I am trying to implement polynomial regression in Python and have it mostly working, but it is not overfitting enough for higher degree polynomials. This is a weird thing to be upset about, I know, ...
0
votes
0answers
10 views

How to approach Customer dimensions and work hours relation problem

I am thinking about how to solve the following problem related to a supermarket and its employees' workload prediction: I have customer dimensions (attributes): CustomerID Loyalty status Uses e-store ...
1
vote
1answer
37 views

Interpretation of coefficient on interactive effects term in regression analysis

I have two continuous variables: $X1$ and $X2$, both have a positive correlation on the dependent variable $y$ (continuous). I found that the interaction term $(X1*X2)$ is statistically significant ...
1
vote
1answer
24 views

Relationships between groups of features against independent variables

I have several groups of features that I'd like to test against independent variables. The idea is to find which groups tend to be associated with a specific value of an independent variable. Let's ...
0
votes
2answers
29 views

how Lasso regression helps to shrinks the coefficient to zero and why ridge regression dose not shrink the coefficient to zero?

How Lasso regression helps feature selection of model by making the coefficient to zero? , I could see few below with below diagram ,can any please explain in simple terms how to corelate below ...
2
votes
2answers
34 views

Linear regression using math or machine learning? Why even use machine learning for this?

I have studied statistical math and is now taking a course in machine learning. The first example the teacher talked about is how to find a linear trend line using machine learning. Why would anybody ...
1
vote
1answer
25 views

Intutitively what advantages are there to use more data than absolutely necessary while fitting a linear regression? [closed]

If I have p features in a vector, I can get a unique solution for the weights by using just the p independent rows(data points) in the input, why should then I be using more data points than ...
1
vote
0answers
34 views

How to choose initial theta in simple linear regression?

I have the sales of items from January 2013 to October 2015. I just want to predict the total sales for the next month. Just for the sake of learning, I would like to transform it into a multiple ...
0
votes
1answer
69 views

Performing a linear regression with Perceptron

I was wondering about the link between the linear regression and the perceptron! Perceptrons were used as binary classifiers i.e to classify binary labels ( 0 or 1 ). My question is How can you ...
4
votes
2answers
305 views

why R-square always keep increasing

I have read in multiple articles that R-square always increases with the number of features, even though a feature may not be of any significance. The formula for R-square is $$1 - \frac{\sum(y-\hat{y}...
3
votes
1answer
69 views

For a linear model without intercept, why does the redundent term in one-hot encoding function as intercept?

In this question Elias Strehle pointed out that if we keep all the levels during one hot encoding on a linear model without an intercept, the redundant feature will function as an intercept. Why is ...
1
vote
1answer
49 views

TicTacToe Linear Regression low accuracy and R^2 score

Im using the python sklearn library to attempt a linear regression TicTacToe AI. I create my training set by simply having the computer play random 'blind' games against itself. For example... Player ...
0
votes
1answer
25 views

Why can't we feed datetime to Linear Regression and how does toordinal() different from any other integer datatype?

I'm working with dates for the first time. First I knew I had to convert it to timestamps which gave me the values in "datetime64" values. But then I came to know that Linear Regression from ...
0
votes
1answer
32 views

How to find the weights for weighted least squares regression?

When we are doing weighted least squares how do we find the weights? Where ever I see tutorials are just using $w_i = \frac{1}{(sigma)i^2}$ and doing it with basic data. But I want to know how to find ...
0
votes
0answers
18 views

Regression of citations by article title

I have a dataset of some lines (article titles) and the number of citations for an article with this title, what is the best way to build a regression model? I have an idea to launch TF-IDF and use a ...
0
votes
0answers
28 views

Bayesian Regression Model

I am new to Bayesian modeling. I am running Bayesian regression model in R using brm function from brms library, which is powered by STAN. I have a data with 10 million records. I took 10% sample out ...
1
vote
2answers
131 views

How to interpret correlation matrix?

I have built a correlation matrix to check multicollinearity in a regression model. But how to interpret this? Can we say that there is a certain correlation value from which the independent ...
-1
votes
3answers
133 views

How do I use lagged independent variable in statsmodel OLS regression?

If there is good reason to believe that an independent variable (x) has a lagged effect on dependent ...
2
votes
1answer
157 views

One Neural network with multiple outputs or multiple neural networks with a single output?

I an building a feed forward deep learning model using tabular data. The inputs are numeric features or categorical features (represented with embeddings). The outputs are the same number of numeric ...
0
votes
1answer
39 views

How to predict custom value after using linear regression?

I'm new to machine learning, and I'm currently practicing by playing around with datasets that I find on Kaggle. Currently I'm trying to predict the price of an Audi, based on the model, mileage and ...
0
votes
1answer
38 views

Linear and non-linear dependence in a single DS model

I have a dataset with parameters (features) a,b,c, etc. We need to develop a model to ...

1
2 3 4 5
12