Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Running Regression with filters

Himanshu123
7 - Meteor

Hi

 

I am trying to run linear regression and trying to use the filters to get the desired ouptut. However, it keeps throwing errors. I am attaching the packaged workflow over here. Can someone help me in this?

 

Thanks in advance

 

 

 

 

4 REPLIES 4
mceleavey
17 - Castor
17 - Castor

Hi @Himanshu123,

 

There are potentially a couple of issues here.

First, you are using a filter to isolate records with a single value in market segment. You are then using that in the linear regression as a predictor variable. This means a single value non-numeric categorical variable with a one to one relationship by definition. The linear regression tool can't process this.

Second, you don't have enough numeric variables to carry out a linear regression.

If this is simply a representation of the data, then if you could provide more data and more columns that are closer to what you're trying to do then I'll give that a try.

 

M.



Bulien

Himanshu123
7 - Meteor

Thanks M.

 

I think I agree with you on your first concern. However, since I am selecting the market segment as one of the factors, I think Alteryx is trying to run the regression for each of my segments and finding the best fit line based on size and revenue for each segment. this is what I wanted. Am I wrong in this assumption?

 

Also, I believe that though having more variables will improve my result, it should not be a constraint in not being able to perform the regression (univariate regression requires only one variable). Theoretically, regression is the line which minimizes the sqaured deviation of the line from the observation, I do not think that will be causing the issue. Can you pinpoint me to the error which you think that suggests this?

 

Thanks

Himanshu

Himanshu123
7 - Meteor

Hi @mceleavey

 

I am attaching here a packaged workflow where I have removed the column market segment. It is working fine here. Can you help me why it is working here and not in the workflow earlier.

 

Thanks

KaneG
Alteryx Alumni (Retired)

The difference is the number of rows. Even with 22 rows, there is a warning ( Linear Regression (6) The incoming data may not have enough rows to generate a model successfully.). With 10 rows, it's just not enough data. Theoretically you could process the maths behind it with 10 rows, but is the result really worth it?

Labels