Judy T Raj
Judy T Raj

Reputation: 1844

Label encoding in Azure Machine Learning Studio

I'm trying to find the equivalent of the sklearn LabelEncoder or the OrdinalEncoder in Azure ML Studio. I understand the Convert to Indicator Values module performs One-hot encoding but I can't find anything that would do label encoding.

What I have is a column with six unique string values and what I need is to represent that data with integers from 0 to 6.

Right now, I'm using the Execute Python Script module to do it but I was wondering if there's a built-in module to do it.

Upvotes: 2

Views: 1167

Answers (1)

Alibek Jakupov
Alibek Jakupov

Reputation: 620

There is Feature Hashing module that converts strings to integer encoded features using the Vowpal Wabbit library. It builds a dictionary and based on this dictionary converts its items into hash values. So instead of having a string column you will have your data in the following format:

Hashing feature 1   Hashing feature 2   Hashing feature 3
1                   0                   0

Upvotes: 1

Related Questions