Doc2vec for text classification task












2












$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?










share|improve this question









$endgroup$

















    2












    $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?










    share|improve this question









    $endgroup$















      2












      2








      2





      $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?










      share|improve this question









      $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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 2 days ago









      r1d1r1d1

      374




      374






















          2 Answers
          2






          active

          oldest

          votes


















          2












          $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.






          share|improve this answer











          $endgroup$





















            0












            $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.






            share|improve this answer









            $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-small window and negative values may perform better.
              $endgroup$
              – Srini
              2 days ago











            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
            });


            }
            });














            draft saved

            draft discarded


















            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









            2












            $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.






            share|improve this answer











            $endgroup$


















              2












              $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.






              share|improve this answer











              $endgroup$
















                2












                2








                2





                $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.






                share|improve this answer











                $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.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 2 days ago

























                answered 2 days ago









                EsmailianEsmailian

                1,086111




                1,086111























                    0












                    $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.






                    share|improve this answer









                    $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-small window and negative values may perform better.
                      $endgroup$
                      – Srini
                      2 days ago
















                    0












                    $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.






                    share|improve this answer









                    $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-small window and negative values may perform better.
                      $endgroup$
                      – Srini
                      2 days ago














                    0












                    0








                    0





                    $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.






                    share|improve this answer









                    $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.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    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-small window and negative values 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$
                      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$
                    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


















                    draft saved

                    draft discarded




















































                    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.




                    draft saved


                    draft discarded














                    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





















































                    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







                    Popular posts from this blog

                    Callistus I

                    Tabula Rosettana

                    How to label and detect the document text images