Doc2vec for text classification task
$begingroup$
Can I use doc2vec for classification big documents (500-2000 words, 20000 total documents, classication for three classes)? Is it a problem that the documents are large enough and contain many common words? Can I train my data together with Wikipedia articles (using unique tag for every article) for a more accurate calculation word-embedings, or it can't give positive effect?
machine-learning classification word-embeddings
$endgroup$
add a comment |
$begingroup$
Can I use doc2vec for classification big documents (500-2000 words, 20000 total documents, classication for three classes)? Is it a problem that the documents are large enough and contain many common words? Can I train my data together with Wikipedia articles (using unique tag for every article) for a more accurate calculation word-embedings, or it can't give positive effect?
machine-learning classification word-embeddings
$endgroup$
add a comment |
$begingroup$
Can I use doc2vec for classification big documents (500-2000 words, 20000 total documents, classication for three classes)? Is it a problem that the documents are large enough and contain many common words? Can I train my data together with Wikipedia articles (using unique tag for every article) for a more accurate calculation word-embedings, or it can't give positive effect?
machine-learning classification word-embeddings
$endgroup$
Can I use doc2vec for classification big documents (500-2000 words, 20000 total documents, classication for three classes)? Is it a problem that the documents are large enough and contain many common words? Can I train my data together with Wikipedia articles (using unique tag for every article) for a more accurate calculation word-embedings, or it can't give positive effect?
machine-learning classification word-embeddings
machine-learning classification word-embeddings
asked 2 days ago
r1d1r1d1
374
374
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
Can I use doc2vec for classification big documents (500-2000 words,
20000 total documents, classification for three classes)?
Yes. This amount of documents is considered small to medium. It is worth noting that the original Doc2Vec paper experimented with 75K documents.
Is it a problem that the documents are large enough and contain many common words?
No, it is OK. Consider the fact that both common and distinctive words are increasing with the size of documents, and distinctive words are what that matters. That is, larger texts are easier to distinguish.
Can I train my data together with Wikipedia articles (using unique tag
for every article) for a more accurate calculation word-embeddings, or
it can't give positive effect?
It depends and is worth the try. If Wikipedia documents are close in format and content to your documents, they could definitely help. In the Doc2Vec paper, authors used 25K labeled documents (IMDb reviews with positive and negative labels) and 50K unlabeled ones for training.
Also, this is a nice tutorial on using doc2vec. It reports 1-2 hours for 100K documents.
$endgroup$
add a comment |
$begingroup$
It's fine for you to use doc2vec on 20K documents(500-2000 words). However, make sure you have done proper prep-processing of text documents before you start. It might require significant parameter-tuning and iterations to train the model. Assuming you have enough computational resources, I don't see any problem trying out.
$endgroup$
$begingroup$
Thx! Could you tell more about tuning of the parameters?
$endgroup$
– r1d1
2 days ago
$begingroup$
For tuning, first comeup with a way to evaluate the output of a training session (example: desired document-pairs that should be closer to each other than others). Then perform a grid search to come up with best ones. In your case with large number of documents, you may find that quite-smallwindowandnegativevalues may perform better.
$endgroup$
– Srini
2 days ago
add a comment |
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%2f47223%2fdoc2vec-for-text-classification-task%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Can I use doc2vec for classification big documents (500-2000 words,
20000 total documents, classification for three classes)?
Yes. This amount of documents is considered small to medium. It is worth noting that the original Doc2Vec paper experimented with 75K documents.
Is it a problem that the documents are large enough and contain many common words?
No, it is OK. Consider the fact that both common and distinctive words are increasing with the size of documents, and distinctive words are what that matters. That is, larger texts are easier to distinguish.
Can I train my data together with Wikipedia articles (using unique tag
for every article) for a more accurate calculation word-embeddings, or
it can't give positive effect?
It depends and is worth the try. If Wikipedia documents are close in format and content to your documents, they could definitely help. In the Doc2Vec paper, authors used 25K labeled documents (IMDb reviews with positive and negative labels) and 50K unlabeled ones for training.
Also, this is a nice tutorial on using doc2vec. It reports 1-2 hours for 100K documents.
$endgroup$
add a comment |
$begingroup$
Can I use doc2vec for classification big documents (500-2000 words,
20000 total documents, classification for three classes)?
Yes. This amount of documents is considered small to medium. It is worth noting that the original Doc2Vec paper experimented with 75K documents.
Is it a problem that the documents are large enough and contain many common words?
No, it is OK. Consider the fact that both common and distinctive words are increasing with the size of documents, and distinctive words are what that matters. That is, larger texts are easier to distinguish.
Can I train my data together with Wikipedia articles (using unique tag
for every article) for a more accurate calculation word-embeddings, or
it can't give positive effect?
It depends and is worth the try. If Wikipedia documents are close in format and content to your documents, they could definitely help. In the Doc2Vec paper, authors used 25K labeled documents (IMDb reviews with positive and negative labels) and 50K unlabeled ones for training.
Also, this is a nice tutorial on using doc2vec. It reports 1-2 hours for 100K documents.
$endgroup$
add a comment |
$begingroup$
Can I use doc2vec for classification big documents (500-2000 words,
20000 total documents, classification for three classes)?
Yes. This amount of documents is considered small to medium. It is worth noting that the original Doc2Vec paper experimented with 75K documents.
Is it a problem that the documents are large enough and contain many common words?
No, it is OK. Consider the fact that both common and distinctive words are increasing with the size of documents, and distinctive words are what that matters. That is, larger texts are easier to distinguish.
Can I train my data together with Wikipedia articles (using unique tag
for every article) for a more accurate calculation word-embeddings, or
it can't give positive effect?
It depends and is worth the try. If Wikipedia documents are close in format and content to your documents, they could definitely help. In the Doc2Vec paper, authors used 25K labeled documents (IMDb reviews with positive and negative labels) and 50K unlabeled ones for training.
Also, this is a nice tutorial on using doc2vec. It reports 1-2 hours for 100K documents.
$endgroup$
Can I use doc2vec for classification big documents (500-2000 words,
20000 total documents, classification for three classes)?
Yes. This amount of documents is considered small to medium. It is worth noting that the original Doc2Vec paper experimented with 75K documents.
Is it a problem that the documents are large enough and contain many common words?
No, it is OK. Consider the fact that both common and distinctive words are increasing with the size of documents, and distinctive words are what that matters. That is, larger texts are easier to distinguish.
Can I train my data together with Wikipedia articles (using unique tag
for every article) for a more accurate calculation word-embeddings, or
it can't give positive effect?
It depends and is worth the try. If Wikipedia documents are close in format and content to your documents, they could definitely help. In the Doc2Vec paper, authors used 25K labeled documents (IMDb reviews with positive and negative labels) and 50K unlabeled ones for training.
Also, this is a nice tutorial on using doc2vec. It reports 1-2 hours for 100K documents.
edited 2 days ago
answered 2 days ago
EsmailianEsmailian
1,086111
1,086111
add a comment |
add a comment |
$begingroup$
It's fine for you to use doc2vec on 20K documents(500-2000 words). However, make sure you have done proper prep-processing of text documents before you start. It might require significant parameter-tuning and iterations to train the model. Assuming you have enough computational resources, I don't see any problem trying out.
$endgroup$
$begingroup$
Thx! Could you tell more about tuning of the parameters?
$endgroup$
– r1d1
2 days ago
$begingroup$
For tuning, first comeup with a way to evaluate the output of a training session (example: desired document-pairs that should be closer to each other than others). Then perform a grid search to come up with best ones. In your case with large number of documents, you may find that quite-smallwindowandnegativevalues may perform better.
$endgroup$
– Srini
2 days ago
add a comment |
$begingroup$
It's fine for you to use doc2vec on 20K documents(500-2000 words). However, make sure you have done proper prep-processing of text documents before you start. It might require significant parameter-tuning and iterations to train the model. Assuming you have enough computational resources, I don't see any problem trying out.
$endgroup$
$begingroup$
Thx! Could you tell more about tuning of the parameters?
$endgroup$
– r1d1
2 days ago
$begingroup$
For tuning, first comeup with a way to evaluate the output of a training session (example: desired document-pairs that should be closer to each other than others). Then perform a grid search to come up with best ones. In your case with large number of documents, you may find that quite-smallwindowandnegativevalues may perform better.
$endgroup$
– Srini
2 days ago
add a comment |
$begingroup$
It's fine for you to use doc2vec on 20K documents(500-2000 words). However, make sure you have done proper prep-processing of text documents before you start. It might require significant parameter-tuning and iterations to train the model. Assuming you have enough computational resources, I don't see any problem trying out.
$endgroup$
It's fine for you to use doc2vec on 20K documents(500-2000 words). However, make sure you have done proper prep-processing of text documents before you start. It might require significant parameter-tuning and iterations to train the model. Assuming you have enough computational resources, I don't see any problem trying out.
answered 2 days ago
SriniSrini
12
12
$begingroup$
Thx! Could you tell more about tuning of the parameters?
$endgroup$
– r1d1
2 days ago
$begingroup$
For tuning, first comeup with a way to evaluate the output of a training session (example: desired document-pairs that should be closer to each other than others). Then perform a grid search to come up with best ones. In your case with large number of documents, you may find that quite-smallwindowandnegativevalues may perform better.
$endgroup$
– Srini
2 days ago
add a comment |
$begingroup$
Thx! Could you tell more about tuning of the parameters?
$endgroup$
– r1d1
2 days ago
$begingroup$
For tuning, first comeup with a way to evaluate the output of a training session (example: desired document-pairs that should be closer to each other than others). Then perform a grid search to come up with best ones. In your case with large number of documents, you may find that quite-smallwindowandnegativevalues may perform better.
$endgroup$
– Srini
2 days ago
$begingroup$
Thx! Could you tell more about tuning of the parameters?
$endgroup$
– r1d1
2 days ago
$begingroup$
Thx! Could you tell more about tuning of the parameters?
$endgroup$
– r1d1
2 days ago
$begingroup$
For tuning, first comeup with a way to evaluate the output of a training session (example: desired document-pairs that should be closer to each other than others). Then perform a grid search to come up with best ones. In your case with large number of documents, you may find that quite-small
window and negative values may perform better.$endgroup$
– Srini
2 days ago
$begingroup$
For tuning, first comeup with a way to evaluate the output of a training session (example: desired document-pairs that should be closer to each other than others). Then perform a grid search to come up with best ones. In your case with large number of documents, you may find that quite-small
window and negative values may perform better.$endgroup$
– Srini
2 days ago
add a comment |
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%2f47223%2fdoc2vec-for-text-classification-task%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