MachineLearningNotebooks icon indicating copy to clipboard operation
MachineLearningNotebooks copied to clipboard

Incorrect featurization of numeric column

Open ktebbe opened this issue 7 years ago • 6 comments

My data has a mix of numeric & categorical columns, but one of the numeric columns seems to be converted to a factor/character/categorical variable. When I look at the data types of my training data, it's an int64, but then it seems to split up each numeric value into its own column:

image

ktebbe avatar Apr 03 '19 19:04 ktebbe

Hello Kira, thanks for reaching out. For numeric columns with very few unique values, we automatically convert to categorical. See: https://docs.microsoft.com/en-us/azure/machine-learning/service/how-to-configure-auto-train#data-pre-processing-and-featurization. Does that impact your scenario/model negatively? Thanks!

deepamu avatar Apr 03 '19 20:04 deepamu

@deepamu - Why is it done that way? For my use case, the specific number is mostly irrelevant, but this seems to be missing low vs medium vs high values.

ktebbe avatar Apr 03 '19 20:04 ktebbe

Idea is that if you have few unique values, you would not care much about the value itself but instead but instead about classes - hence we convert to categorical so we can automatically one-hot encode for you. But it looks like in your case it isn't helpful? Can you please share what you get and what you'd like to get?

deepamu avatar Apr 03 '19 20:04 deepamu

Ah I see. In this case, when I have a list of 40+ numbers and we know there are trends above a certain threshold, treating them as categorical is a limitation. I see the use for 1-5 unique values, but not for 40+. Additionally, I already ensured the categorical data I do have was passed as such, so I don't want other numeric data to be re-cast.

ktebbe avatar Apr 11 '19 18:04 ktebbe

Thanks for your report. Are you still experiencing this issue? Thank you!

j-martens avatar Jul 11 '19 22:07 j-martens

Thank you for reaching out to us. We see our answer was delayed. Our apologies. We did not receive a response to our post, so will close this issue for now. Should you need further assistance, please submit a post on this forum and we will respond promptly.

v-strudm-msft avatar Apr 17 '20 22:04 v-strudm-msft