<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Ensembles of methods for Tweet Topic Classi cation</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Gretel Liz De la Pen~a Sarracen</string-name>
          <email>gretel@cerpamid.co.cu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Center for Pattern Recognition and Data Mining</institution>
          ,
          <country country="CU">Cuba</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2017</year>
      </pub-date>
      <fpage>15</fpage>
      <lpage>19</lpage>
      <abstract>
        <p>This paper describes the system we developed for IberEval 2017 on Classi cation Of Spanish Election Tweets (COSET) task. Our approach is based on a weighted average ensemble of ve classi ers: 1) a classi er based on logistic regression; 2) a support vector machine classi er; 3) a Naive Bayes classi er for multinomial models; 4) a Guassian Naive Bayes classi er; and 5) a classi er implementing the k-nearest neighbors vote. Each such classi er was choice taking into account its contributes to the success of the system. The aim is to design a approach by using a voting method, where individual classi ers can have weaknesses. The performance of the ensemble is compared to the individual classi ers, and the experimental results show that the ensemble has better results.</p>
      </abstract>
      <kwd-group>
        <kwd>Ensemble Classi er</kwd>
        <kwd>Tweets Classi cation</kwd>
        <kwd>Spanish Election Tweets</kwd>
        <kwd>Twitter</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Nowaday, Twitter1 have become an important part of the daily life of many
of users. This microblogging services are used as communication media,
recommendation services, real-time news sources and information sharing sites. The
large amount of new data created as result makes automatic analysis essential
for processing this data. Thus, Twitter has become an attractive area for many
studies such as text classi cation.</p>
      <p>Text classi cation aims at labeling natural language texts into a xed number
of predetermined categories [1{3]. On Twitter, users post short text messages
called tweets which makes quite di cult this task because of their features.
Tweets are small (only 140 characters) and are charectized by their informal
style language, many grammatical errors and spelling mistakes, slang and vulgar
vocabulary, and abbreviations.</p>
      <p>
        The Classi cation Of Spanish Election Tweets (COSET) task, in IberEval
2017 workshop [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] has as main goal to classify a corpus of political tweets in 5
categories of classi cation: political issues, related to the most abstract electoral
1 http://www.twitter.com
confrontation; policy issues, about sectorial policies; personal issues, on the life
and activities of the candidates; campaign issues, related with the evolution of
the campaign; and other issues. This paper presents an ensemble-based approach
developed to participate in this task. The main objective is to explore and
identify the advantages for designing a better approach by using a voting method
which improves the performance of individuals classi ers.
      </p>
      <p>The paper is organized as follows. Section 2 describes our system. Next,
in Section 3, the experimental results are discussed. Finally, we present our
conclusions in Section 4 with a summary of our ndings.
2</p>
    </sec>
    <sec id="sec-2">
      <title>System</title>
      <p>Our system carries out a sequence of steps, which goes from text preprocessing
to tweet classi cation. The classi cation approach, based on the comination of
ve classi er in order to assign to a tweet a class label, is described below.
2.1</p>
      <sec id="sec-2-1">
        <title>Preprocessing</title>
        <p>In the preprocessing step, tweets are cleaned. First, taking advantage of regular
expressions, the emoticons are detected and removed from the text. Also, we
eliminate all links, urls and user names which can be identi ed because their rst
character is the symbol @. As regards the words starting with hashtags (that
is, the symbol #), we do not realize modi cations because they can be related
directly with the topic of the text. Finally, we convert the words to lowercase
and remove all non-letters characters and all stopwords present in tweets.
2.2</p>
      </sec>
      <sec id="sec-2-2">
        <title>Methods</title>
        <p>
          Classi er based on Logistic Regression (LR): Logistic regression belongs
to the family of classi ers known as the exponential or log-linear classi ers. It
works by extracting some set of weighted features from the input, combining
them linearly, and then applying an exponential function to this combination.
Thus, Logistic regression is a discriminative model that assigns a class to an
observation by computing a probability from the function of a weighted set of
features of the observation [
          <xref ref-type="bibr" rid="ref5 ref6">5, 6</xref>
          ].
        </p>
        <p>Logistic Regression is good at dealing with very high dimension data. Text
classi cation is a classic problem.</p>
        <p>Support Vector Machine classi er (SVM): Support Vector Machine uses
linear models to implement nonlinear class boundaries. It transforms the input
space using a nonlinear mapping into a new space. Then a linear model
constructed in the new space can represent a nonlinear decision boundary in the
original space. It plots each data item as a point in n-dimensional space (where
3
n is number of features) with the value of each feature being the value of a
particular coordinate. Then, it performs classi cation by nding the hyper-plane
that di erentiate the classes very well.</p>
        <p>
          Support Vector Machine classi er works really well with clear margin of
separation and is e ective in cases where number of dimensions is greater than the
number of samples [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ].
        </p>
        <p>Guassian Naive Bayes classi er (GaussianNB): Naive Bayes methods are
a set of supervised learning algorithms based on applying Bayes theorem with
the assumption of independence between every pair of features. In spite of their
apparently over-simpli ed assumptions, naive Bayes classi ers have worked quite
well in many real-world situations. They require a small amount of training data
to estimate the necessary parameters.</p>
        <p>
          Naive Bayes classi ers can be extremely fast compared to more sophisticated
methods. The decoupling of the class conditional feature distributions means
that each distribution can be independently estimated as a one dimensional
distribution. This in turn helps to alleviate problems stemming from the curse
of dimensionality [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ]. In Guassian Naive Bayes classi er the likelihood of the
features is assumed to be Gaussian.
        </p>
        <p>Naive Bayes classi er for Multinomial Models (MultinomialNB):
Multinomial Naive Bayes is used for multinomially distributed data. It is one of the
classic naive Bayes variants most used in text classi cation.</p>
        <p>
          Classi er based on k-nearest neighbors vote (KNN): Neighbors-based
classi cation is a type of instance-based learning or non-generalizing learning.
This is it does not attempt to construct a general internal model, but simply
stores instances of the training data. Classi cation is computed from a simple
majority vote of the nearest neighbors of each point, where a query point is
assigned the data class which has the most representatives within the nearest
neighbors of the point. The number of nearest neighbors taken into account can
be a constant k. In our case, we take k = 1 for its contributes to the success of
the system. Despite its simplicity, it is often successful in classi cation situations
where the decision boundary is very irregular [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ].
        </p>
        <p>
          Ensemble classi er (Ensemble): Our design of classi er is an ensemble of the
above classi ers. In this way, the predicted class probabilities for each classi er
are collected, multiplied by the classi er weight, and averaged. The nal class
label is then derived from the class label with the highest average probability.
We used scikit-learn with these purposes [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ].
        </p>
        <p>
          We nd the best setting of weights via brute force grid search, limiting the
coe cient values in the interval [
          <xref ref-type="bibr" rid="ref1">0,1</xref>
          ], and taking into account the performance
of base algorithms. Those with better results were assigned higher weights.
4
3
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Results</title>
      <p>In order to evaluate the advantages of the ensemble-based approach, we have
used the F1 macro measure. This metric considers the precision and the recall of
the systems predictions, combining them using the harmonic mean. Speci cally,
we rely on the macro for preventing systems biased towards the most populated
classes. Table 1 shows the results for the ensemble classi er we have proposed
as well as for the base classi ers on the validation set. As expected, according to
the measure, the ensemble classi er reveals a marked performance improvement
with the highest score.</p>
      <p>
        Further, we have studied the impact of other text processing beyond the
preprocessing described above. Thus, once the set of simple rules of preprocesing
has been applied, we have realized other preprocesses. We have assigned, to each
word in the text, its lemma and have tried with some feature selection methods.
Feature selection The main objective of feature selection methods is to
decrease of the dimensionality of the dataset by eliminating features that are not
related for the classi cation [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. We have tried with two methods. On one side,
we have removed features with low variance (VarSelection), speci cally all
zerovariance features. On the other hand, we have applied univariate feature
elimination (UFSSelection), which works by selecting the 10 best features based on
univariate statistical tests, the 2 test in our case.
      </p>
    </sec>
    <sec id="sec-4">
      <title>Conclusion</title>
      <p>This paper has described an ensemble-based approach for IberEval 2017 on
Spanish Election Tweets Classi cation task. We combined ve classiers by a weighted
average, with the aim of designing an approach which improves the performance
of the base classi ers. The results showed that, indeed, the ensemble classi er
reveals a remarkable performance improvement with the highest score. Also, as
part of experiments, we studied some preprocessing for texts: lemmatization and
features selection methods. We achieved the best results with lemmatized texts
and the feature selection method that removing features with low variance.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Durga</given-names>
            <surname>Bhavani</surname>
          </string-name>
          Dasari et al.
          <article-title>Text categorization and machine learning methods: current state of the art</article-title>
          .
          <source>Global Journal of Computer Science and Technology</source>
          ,
          <volume>12</volume>
          (11- C),
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Vandana</given-names>
            <surname>Korde</surname>
          </string-name>
          and
          <string-name>
            <given-names>C</given-names>
            <surname>Namrata</surname>
          </string-name>
          <article-title>Mahender</article-title>
          .
          <article-title>Text classi cation and classi ers: A survey</article-title>
          .
          <source>International Journal of Arti cial Intelligence &amp; Applications</source>
          ,
          <volume>3</volume>
          (
          <issue>2</issue>
          ):
          <fpage>85</fpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>Rajni</given-names>
            <surname>Jindal</surname>
          </string-name>
          , Ruchika Malhotra, and
          <string-name>
            <given-names>Abha</given-names>
            <surname>Jain</surname>
          </string-name>
          .
          <article-title>Techniques for text classi cation: Literature review and current trends</article-title>
          .
          <source>Webology</source>
          ,
          <volume>12</volume>
          (
          <issue>2</issue>
          ):
          <fpage>1</fpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Gimnez</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Baviera</surname>
            <given-names>T</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosso</surname>
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Llorca</surname>
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gmir</surname>
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Calvo</surname>
            <given-names>D.</given-names>
          </string-name>
          , and Rangel F.
          <article-title>Overview of the 1st classi cation of spanish election tweets task at ibereval 2017</article-title>
          .
          <source>In: Notebook Papers of 2nd SEPLN Workshop on Evaluation of Human Language Technologies for Iberian Languages (IBEREVAL)</source>
          , Murcia, Spain,
          <source>September 19, CEUR Workshop Proceedings. CEUR-WS.org</source>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Raymond</surname>
            <given-names>E</given-names>
          </string-name>
          <string-name>
            <surname>Wright</surname>
          </string-name>
          . Logistic regression.
          <year>1995</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>Alexander</given-names>
            <surname>Genkin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>David D</given-names>
            <surname>Lewis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>and David</given-names>
            <surname>Madigan</surname>
          </string-name>
          .
          <article-title>Large-scale bayesian logistic regression for text categorization</article-title>
          .
          <source>Technometrics</source>
          ,
          <volume>49</volume>
          (
          <issue>3</issue>
          ):
          <volume>291</volume>
          {
          <fpage>304</fpage>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>Thorsten</given-names>
            <surname>Joachims</surname>
          </string-name>
          .
          <article-title>Learning to classify text using support vector machines: Methods, theory and algorithms</article-title>
          . Kluwer Academic Publishers,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>Haiyi</given-names>
            <surname>Zhang</surname>
          </string-name>
          and
          <string-name>
            <given-names>Di</given-names>
            <surname>Li</surname>
          </string-name>
          .
          <article-title>Nave bayes text classi er</article-title>
          .
          <source>In Granular Computing</source>
          ,
          <year>2007</year>
          .
          <article-title>GRC 2007</article-title>
          . IEEE International Conference on, pages
          <volume>708</volume>
          {
          <fpage>708</fpage>
          . IEEE,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>Padraig</given-names>
            <surname>Cunningham</surname>
          </string-name>
          and
          <article-title>Sarah Jane Delany. k-nearest neighbour classi ers</article-title>
          .
          <source>Multiple Classi er Systems</source>
          ,
          <volume>34</volume>
          :1{
          <fpage>17</fpage>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>F.</given-names>
            <surname>Pedregosa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Varoquaux</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Gramfort</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Michel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Thirion</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Grisel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Blondel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Prettenhofer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Weiss</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Dubourg</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Vanderplas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Passos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Cournapeau</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Brucher</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Perrot</surname>
          </string-name>
          , and
          <string-name>
            <given-names>E.</given-names>
            <surname>Duchesnay</surname>
          </string-name>
          .
          <article-title>Scikit-learn: Machine learning in Python</article-title>
          .
          <source>Journal of Machine Learning Research</source>
          ,
          <volume>12</volume>
          :
          <fpage>2825</fpage>
          {
          <fpage>2830</fpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <given-names>George</given-names>
            <surname>Forman</surname>
          </string-name>
          .
          <article-title>An extensive empirical study of feature selection metrics for text classi cation</article-title>
          .
          <source>Journal of machine learning research</source>
          ,
          <volume>3</volume>
          (Mar):
          <volume>1289</volume>
          {
          <fpage>1305</fpage>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>