IDEAS home Printed from https://ideas.repec.org/a/plo/pone00/0194317.html
   My bibliography  Save this article

How to evaluate sentiment classifiers for Twitter time-ordered data?

Author

Listed:
  • Igor Mozetič
  • Luis Torgo
  • Vitor Cerqueira
  • Jasmina Smailović

Abstract

Social media are becoming an increasingly important source of information about the public mood regarding issues such as elections, Brexit, stock market, etc. In this paper we focus on sentiment classification of Twitter data. Construction of sentiment classifiers is a standard text mining task, but here we address the question of how to properly evaluate them as there is no settled way to do so. Sentiment classes are ordered and unbalanced, and Twitter produces a stream of time-ordered data. The problem we address concerns the procedures used to obtain reliable estimates of performance measures, and whether the temporal ordering of the training and test data matters. We collected a large set of 1.5 million tweets in 13 European languages. We created 138 sentiment models and out-of-sample datasets, which are used as a gold standard for evaluations. The corresponding 138 in-sample datasets are used to empirically compare six different estimation procedures: three variants of cross-validation, and three variants of sequential validation (where test set always follows the training set). We find no significant difference between the best cross-validation and sequential validation. However, we observe that all cross-validation variants tend to overestimate the performance, while the sequential methods tend to underestimate it. Standard cross-validation with random selection of examples is significantly worse than the blocked cross-validation, and should not be used to evaluate classifiers in time-ordered data scenarios.

Suggested Citation

  • Igor Mozetič & Luis Torgo & Vitor Cerqueira & Jasmina Smailović, 2018. "How to evaluate sentiment classifiers for Twitter time-ordered data?," PLOS ONE, Public Library of Science, vol. 13(3), pages 1-20, March.
  • Handle: RePEc:plo:pone00:0194317
    DOI: 10.1371/journal.pone.0194317
    as

    Download full text from publisher

    File URL: https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0194317
    Download Restriction: no

    File URL: https://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0194317&type=printable
    Download Restriction: no

    File URL: https://libkey.io/10.1371/journal.pone.0194317?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Mariana Oliveira & Luís Torgo & Vítor Santos Costa, 2021. "Evaluation Procedures for Forecasting with Spatiotemporal Data," Mathematics, MDPI, vol. 9(6), pages 1-27, March.
    2. Wang, Chao & Zhang, Xinyi & Wang, Minggang & Lim, Ming K. & Ghadimi, Pezhman, 2019. "Predictive analytics of the copper spot price by utilizing complex network and artificial neural network techniques," Resources Policy, Elsevier, vol. 63(C), pages 1-1.
    3. Zhang, Tingting & Tang, Zhenpeng & Wu, Junchuan & Du, Xiaoxu & Chen, Kaijie, 2021. "Multi-step-ahead crude oil price forecasting based on two-layer decomposition technique and extreme learning machine optimized by the particle swarm optimization algorithm," Energy, Elsevier, vol. 229(C).
    4. Philip Ndikum, 2020. "Machine Learning Algorithms for Financial Asset Price Forecasting," Papers 2004.01504, arXiv.org.
    5. Igor Mozetiv{c} & Peter Gabrovv{s}ek & Petra Kralj Novak, 2018. "Forex trading and Twitter: Spam, bots, and reputation manipulation," Papers 1804.02233, arXiv.org, revised Apr 2018.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:plo:pone00:0194317. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: plosone (email available below). General contact details of provider: https://journals.plos.org/plosone/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.