<!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>Celebrity Profiling using TF-IDF, Logistic Regression, and SVM</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>FM I at University of Sofia</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Victor Radivchev</institution>
          ,
          <addr-line>Alex Nikolov, Alexandrina Lambova</addr-line>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2019</year>
      </pub-date>
      <abstract>
        <p>This paper aims to describe a TF-IDF approach based on word bigrams and n-grams at a character level used in the Celebrity Profiling competition at PAN CLEF 2019. 1 Copyright (c) 2019 for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). CLEF 2019, 9-12 September 2019, Lugano, Switzerland.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>This paper will take a look at different approaches towards the 2019 Celebrity
Profiling competition at PAN CLEF1. The task is defined in the following way: Given
a set of tweets for a user, one has to classify the user in four categories: gender, fame,
occupation and age. There are three classes for gender and fame, eight for occupation
and the age range is from 1940 to 2012.</p>
    </sec>
    <sec id="sec-2">
      <title>2 Related Work</title>
      <p>
        Previous related work on the subject of gender classification includes an SVM
classifier with different types of word and character n-grams as features, along with
dimensionality reduction using Latent Semantic Analysis (LSA) [
        <xref ref-type="bibr" rid="ref2">4</xref>
        ]. On the subject of
age classification, numerous techniques have been attempted such as concatenating
text mining features, sociolinguistic and content-based features and classifying them
using the Random Forest algorithm [
        <xref ref-type="bibr" rid="ref3">5</xref>
        ].
      </p>
    </sec>
    <sec id="sec-3">
      <title>3 Preprocessing</title>
      <p>The applied preprocessing involved the following techniques:</p>
      <p> Removing all retweets of the user
 Removing all symbols except for letters, numbers, @, and #
 Replacing all hyperlinks with a special &lt;url&gt; token
 Replacing all user tagging with a special &lt;user&gt; token
 Substituting multiple consecutive spaces with a single one
 Adding a special &lt;sep&gt; token at the end of each tweet in order to
distinguish between each tweet’s beginning and end.</p>
      <p>Two additional ways of preprocessing were tested but proved to have poorer
results on a baseline model, which used logistic regression, taking TF-IDF vectors
with 10,000 features, the first one tried preserving the retweets of the users, the
second one substituted happy and sad emojis, such as ‘:-)’, ‘:)’, ‘:D’, ‘:S’, ‘:(‘, ‘:&lt;’
amongst others, with special &lt;happy&gt; and &lt;sad&gt; tokens.</p>
      <p>We chose to split the provided data into a training and validation se t in a ratio of
80:20.</p>
      <p>Discarding retweets 0.5483 0.3597
and emojis
Preserving retweets 0.5237 0.5331 0.3675 0.3600 0.3564 0.3488
Replacing emojis 0.5233 0.5326 0.3670 0.3600 0.3569 0.3491
Table 1 - Different preprocessing results on a baseline tf-idf model with logistic regression
Gender F1
score on
training set</p>
      <p>Gender F1
score on
validation
set
0.5514</p>
      <p>Fame F1
score on
training
set
0.3818</p>
      <p>Fame F1 Occupation
score on F1 score on
validation training set
set
0.3687</p>
      <p>Occupation
F1 score on
validation
set
0.3529</p>
    </sec>
    <sec id="sec-4">
      <title>4 Submitted model</title>
      <p>The submitted approach used the described above preprocessing on a subset of all
tweets per user. The subset for each user was chosen randomly and had a maximum
cardinality of 500. The users’ tweets were vectorized with a TF-IDF vectorizer, taking
into account the top 10,000 features from word bigrams. A combination of logistic
regression and SVM were used as models for each different task. Different class
weights were used for each task based on the number of labeled examp les from each
class – the more examples a particular class has, the lower the class weight assigned
to that class will be. The computed class weights were directly supplied to each tested
algorithm as a parameter (class_weights). For the task of identifying the users’
gender, the following class weights were used:</p>
      <p>Male – 0.46586179, Female – 1.17494337, Nonbinary – 428.12698413
The class weights used for the fame task are as follows:</p>
      <p>Rising – 7.52987159, Star – 0.44780927, Superstar – 1.57703327
For the occupation task the following class weights were used:</p>
      <p>The res ults from tests on different models using different hyperparameters are
described below.</p>
      <p>We can see that logistic regression with hyperparameters multiclass=multi and
solver=newton_cg achieved the best results on the test set – 0.71714</p>
      <p>Fame training set F1
0.75532
0.71992</p>
      <p>For the task of identifying a person’s age, the range of years were divided into
eight classes (subranges) and each time the model predicted the mean year for an
interval. The intervals were constructed in such a manner, that assuming the true age
of a user lied within an interval, predicting the interval’s mean would result in a
correct guess due to the amount of error the contestants are allowed when predicting a
user’s birthyear.</p>
      <p>Interval range
1940-1955
1965-1969
1970-1980
1981-1989
1990-1997
1998-2004
2005-2009
2010-2012</p>
    </sec>
    <sec id="sec-5">
      <title>Methods: An Analysis of Negative</title>
      <p>In this section we will discuss other attempted techniques, which did not
prove to be as successful as the one mentioned above.</p>
    </sec>
    <sec id="sec-6">
      <title>5.1 Using character n-grams</title>
      <p>Our team also attempted to represent each user as a TF-IDF vector of the top
10,000 features using n-grams on a character level, the chosen range was 3- and
4grams. Once again, we sampled 500 tweets for each user before attempting to
vectorize the user. The achieved results were poorer than those achieved from the
TFDF based on word bigrams.</p>
    </sec>
    <sec id="sec-7">
      <title>5.2 More complex models</title>
      <p>This section examines the multi-layered neural network approaches we
attempted.</p>
    </sec>
    <sec id="sec-8">
      <title>5.2.1 Regular feed forward neural networks</title>
      <p>We tried replacing the Linear SVM and Logistic regression with other
models, having more capacity. One such is the multilayer perceptron. In order to
protect against overfitting (which could be a serious problem when having 10 000/20
000 features and 27 000 examples) we used a relatively shallow model with 2 hidden
layers, PRELU activation and dropout of 0.5, train ed with Adam optimizer. We also
used balanced class weights. We experimented with only TF-IDF features and a
concatenation of TF-IDF and character n-grams. However, the inability to mid a
global optimum seems to have had a more detrimental effect than a po sitive one from
the deeper model.</p>
      <p>Fame training set F1 Fame validation set F1
T f-idf 0.82197 0.58564
Tf-idf + character n-grams 0.83256 0.59131</p>
      <p>Table 7 - Results from experiments on Fame using different MLP models</p>
    </sec>
    <sec id="sec-9">
      <title>5.2.2 GloVe embeddings and 1D CNN</title>
      <p>With the recent advances in natural language processing embeddings and deep
learning become increasingly more attractive. However, due to the big size of
information per person, their usage is not straightforward. In order to handle that, we
used the following model:






</p>
      <p>
        First we removed all retweets
In order to equalize the number of tweets per person we selected only the
first 1000 for each
We used GloVes’s default preprocessing and TweetTokenizer
We averaged Glove’s embeddings for each tweet
For each person we constructed a 200 * 1000 matrix (padded with 0 if the
person has less than 1000 tweets) which we used as the input of our model
The model was DPCNN [
        <xref ref-type="bibr" rid="ref4">6</xref>
        ].
      </p>
      <p>We also tried training each task individually and all of them together with a
multihead classifier.</p>
      <p>Unfortunately, this did not produce satisfactory results. There was no real difference
between individual models and the multihead one. Accuracy -wise the models were
slightly behind the logistic regression, but their F1 score was underwhelming. Using
class weights severely impacted the training process, leading to very low scores.</p>
      <p>Fame training set F1 Fame validation set F1
GloVe + DPCNN 0.68427 0.39955</p>
      <p>Table 8 - Results from experiments on Fame using GloVe and DPCNN</p>
    </sec>
    <sec id="sec-10">
      <title>6 References</title>
      <p>[2] Potthast, M., Gollub, T., Wiegmann, M., Stein, B.: TIRA Integrated Research
Architecture. In: Ferro, N., Peters, C. (eds.) Information Retrieval Evaluation in a
Changing World - Lessons Learned from 20 Years of CLEF. Springer (2019)</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Wiegmann</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stein</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Potthast</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Overview of the Celebrity Profiling Task at PAN 2019</article-title>
          . In: Cappellato,
          <string-name>
            <given-names>L.</given-names>
            ,
            <surname>Ferro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            ,
            <surname>Losada</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            ,
            <surname>Müller</surname>
          </string-name>
          , H. (eds.)
          <article-title>CLEF 2019 Labs and Workshops, Notebook Papers</article-title>
          .
          <source>CEUR-WS.org (Sep</source>
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Daneshvar</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Inkpen</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Gender identification in Twitter using N-grams and LSA, Notebook for PAN at CLEF</article-title>
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Simaki</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mporas</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Megalooikonomou</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <article-title>Age Identification of Twitter Users: Classification Methods and Sociolinguistic Analysis</article-title>
          .
          <article-title>(</article-title>
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Rie</given-names>
            <surname>Johnson</surname>
          </string-name>
          and Tong Zhang.
          <year>2017</year>
          .
          <article-title>Deep pyramid convolutional neural networks for text categorization</article-title>
          .
          <source>In ACL.</source>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>