When should embeddings not be used for categorical data? What are their limitations?2019 Community Moderator ElectionBoruta Feature Selection packagePreprocessing and dropout in Autoencoders?Training of word weights in Word Embedding and Word2VecProperly using activation functions of neural networkAre there cases where tree based algorithms can do better than neural networks?Value error in Merging two different models in kerasHow to dual encode two sentences to show similarity scoreWhy does averaging a sentence's worth of word vectors work?LSTM - Forecasting usage (real world)
Why do we use polarized capacitors?
Was there ever an axiom rendered a theorem?
Is there a familial term for apples and pears?
A poker game description that does not feel gimmicky
What does 'script /dev/null' do?
Can Pesach Mitzvot be performed before Tzet Kochavim?
"My colleague's body is amazing"
Is "plugging out" electronic devices an American expression?
Can I buy Tokyo Keisei line tickets with international debit card?
Why is my log file so massive? 22gb. I am running log backups
Is domain driven design an anti-SQL pattern?
Shall I use personal or official e-mail account when registering to external websites for work purpose?
Should the British be getting ready for a no-deal Brexit?
How to deal with fear of taking dependencies
What is it called when one voice type sings a 'solo'?
How is it possible for user's password to be changed after storage was encrypted? (on OS X, Android)
What do the Banks children have against barley water?
Creating a loop after a break using Markov Chain in Tikz
Could a US political party gain complete control over the government by removing checks & balances?
Why is the design of haulage companies so “special”?
How can I fix this gap between bookcases I made?
How can I plot a Farey diagram?
Extreme, but not acceptable situation and I can't start the work tomorrow morning
How could a lack of term limits lead to a "dictatorship?"
When should embeddings not be used for categorical data? What are their limitations?
2019 Community Moderator ElectionBoruta Feature Selection packagePreprocessing and dropout in Autoencoders?Training of word weights in Word Embedding and Word2VecProperly using activation functions of neural networkAre there cases where tree based algorithms can do better than neural networks?Value error in Merging two different models in kerasHow to dual encode two sentences to show similarity scoreWhy does averaging a sentence's worth of word vectors work?LSTM - Forecasting usage (real world)
$begingroup$
I recently came across the concept of embeddings so the concept is still new to me, but it is my understanding that embeddings convert one-hot encoded input data into a dense vector.
Vectors corresponding to all one-hot encodings are first embedded into the dense space randomly. As the embedding gets trained, the vectors move in the dense space from their initial random positions to positions that add algebraic meaning to the dense space. The data basically organizes itself.
This process of data arranging itself seems too good to be true.
I am posting this question here because in all the articles I have read about embeddings, they are presented as a silver bullet, and I wasn't able to find any texts on the limitations of embeddings.
This would essentially enable all categorical data to be converted into dense, meaningful representations during preprocessing or as part of training of a bigger model).
This is an example of embeddings being used to convert all categorical features into dense representations:
# Input layer for religion
encoder_liv = Sequential()
encoder_liv.add(Embedding(liv_cats,4,input_length=1))
encoder_liv.add(Flatten())
# Input layer for religion
encoder_edu = Sequential()
encoder_edu.add(Embedding(edu_cats,4,input_length=1))
encoder_edu.add(Flatten())
# Input layer for triggers(x_b)
dense_x = Sequential()
dense_x.add(Dense(4, input_dim=x.shape[1]))
model = Sequential()
model.add(Merge([encoder_liv, encoder_edu, dense_x], mode='concat'))
# model.add(Activation('relu'))
model.add(Dense(output_dim=12))
model.add(Activation('relu'))
model.add(Dense(output_dim=3))
model.add(Activation('softmax'))
model.compile(optimizer='adagrad', loss='categorical_crossentropy', metrics=['accuracy'])
An embedding is used in this video to replace the entire encoder network of a convolutional autoencoder generating human faces. here is the accompanying code.
So, what's the catch? Why should I not use always use an embedding for all categorical data? What are the constraints limiting an embedding's use/success?
machine-learning categorical-data word-embeddings embeddings
$endgroup$
add a comment |
$begingroup$
I recently came across the concept of embeddings so the concept is still new to me, but it is my understanding that embeddings convert one-hot encoded input data into a dense vector.
Vectors corresponding to all one-hot encodings are first embedded into the dense space randomly. As the embedding gets trained, the vectors move in the dense space from their initial random positions to positions that add algebraic meaning to the dense space. The data basically organizes itself.
This process of data arranging itself seems too good to be true.
I am posting this question here because in all the articles I have read about embeddings, they are presented as a silver bullet, and I wasn't able to find any texts on the limitations of embeddings.
This would essentially enable all categorical data to be converted into dense, meaningful representations during preprocessing or as part of training of a bigger model).
This is an example of embeddings being used to convert all categorical features into dense representations:
# Input layer for religion
encoder_liv = Sequential()
encoder_liv.add(Embedding(liv_cats,4,input_length=1))
encoder_liv.add(Flatten())
# Input layer for religion
encoder_edu = Sequential()
encoder_edu.add(Embedding(edu_cats,4,input_length=1))
encoder_edu.add(Flatten())
# Input layer for triggers(x_b)
dense_x = Sequential()
dense_x.add(Dense(4, input_dim=x.shape[1]))
model = Sequential()
model.add(Merge([encoder_liv, encoder_edu, dense_x], mode='concat'))
# model.add(Activation('relu'))
model.add(Dense(output_dim=12))
model.add(Activation('relu'))
model.add(Dense(output_dim=3))
model.add(Activation('softmax'))
model.compile(optimizer='adagrad', loss='categorical_crossentropy', metrics=['accuracy'])
An embedding is used in this video to replace the entire encoder network of a convolutional autoencoder generating human faces. here is the accompanying code.
So, what's the catch? Why should I not use always use an embedding for all categorical data? What are the constraints limiting an embedding's use/success?
machine-learning categorical-data word-embeddings embeddings
$endgroup$
add a comment |
$begingroup$
I recently came across the concept of embeddings so the concept is still new to me, but it is my understanding that embeddings convert one-hot encoded input data into a dense vector.
Vectors corresponding to all one-hot encodings are first embedded into the dense space randomly. As the embedding gets trained, the vectors move in the dense space from their initial random positions to positions that add algebraic meaning to the dense space. The data basically organizes itself.
This process of data arranging itself seems too good to be true.
I am posting this question here because in all the articles I have read about embeddings, they are presented as a silver bullet, and I wasn't able to find any texts on the limitations of embeddings.
This would essentially enable all categorical data to be converted into dense, meaningful representations during preprocessing or as part of training of a bigger model).
This is an example of embeddings being used to convert all categorical features into dense representations:
# Input layer for religion
encoder_liv = Sequential()
encoder_liv.add(Embedding(liv_cats,4,input_length=1))
encoder_liv.add(Flatten())
# Input layer for religion
encoder_edu = Sequential()
encoder_edu.add(Embedding(edu_cats,4,input_length=1))
encoder_edu.add(Flatten())
# Input layer for triggers(x_b)
dense_x = Sequential()
dense_x.add(Dense(4, input_dim=x.shape[1]))
model = Sequential()
model.add(Merge([encoder_liv, encoder_edu, dense_x], mode='concat'))
# model.add(Activation('relu'))
model.add(Dense(output_dim=12))
model.add(Activation('relu'))
model.add(Dense(output_dim=3))
model.add(Activation('softmax'))
model.compile(optimizer='adagrad', loss='categorical_crossentropy', metrics=['accuracy'])
An embedding is used in this video to replace the entire encoder network of a convolutional autoencoder generating human faces. here is the accompanying code.
So, what's the catch? Why should I not use always use an embedding for all categorical data? What are the constraints limiting an embedding's use/success?
machine-learning categorical-data word-embeddings embeddings
$endgroup$
I recently came across the concept of embeddings so the concept is still new to me, but it is my understanding that embeddings convert one-hot encoded input data into a dense vector.
Vectors corresponding to all one-hot encodings are first embedded into the dense space randomly. As the embedding gets trained, the vectors move in the dense space from their initial random positions to positions that add algebraic meaning to the dense space. The data basically organizes itself.
This process of data arranging itself seems too good to be true.
I am posting this question here because in all the articles I have read about embeddings, they are presented as a silver bullet, and I wasn't able to find any texts on the limitations of embeddings.
This would essentially enable all categorical data to be converted into dense, meaningful representations during preprocessing or as part of training of a bigger model).
This is an example of embeddings being used to convert all categorical features into dense representations:
# Input layer for religion
encoder_liv = Sequential()
encoder_liv.add(Embedding(liv_cats,4,input_length=1))
encoder_liv.add(Flatten())
# Input layer for religion
encoder_edu = Sequential()
encoder_edu.add(Embedding(edu_cats,4,input_length=1))
encoder_edu.add(Flatten())
# Input layer for triggers(x_b)
dense_x = Sequential()
dense_x.add(Dense(4, input_dim=x.shape[1]))
model = Sequential()
model.add(Merge([encoder_liv, encoder_edu, dense_x], mode='concat'))
# model.add(Activation('relu'))
model.add(Dense(output_dim=12))
model.add(Activation('relu'))
model.add(Dense(output_dim=3))
model.add(Activation('softmax'))
model.compile(optimizer='adagrad', loss='categorical_crossentropy', metrics=['accuracy'])
An embedding is used in this video to replace the entire encoder network of a convolutional autoencoder generating human faces. here is the accompanying code.
So, what's the catch? Why should I not use always use an embedding for all categorical data? What are the constraints limiting an embedding's use/success?
machine-learning categorical-data word-embeddings embeddings
machine-learning categorical-data word-embeddings embeddings
asked Mar 28 at 19:37
Aayush MahajanAayush Mahajan
1061
1061
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "557"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f48175%2fwhen-should-embeddings-not-be-used-for-categorical-data-what-are-their-limitati%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Data Science Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f48175%2fwhen-should-embeddings-not-be-used-for-categorical-data-what-are-their-limitati%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown