How Machine Learning Classification Accuracy Changes in a Happiness Dataset with Different Demographic Groups

Research output: Contribution to journalArticlepeer-review

11 Citations (Scopus)
130 Downloads (Pure)


This study aims to explore how machine learning classification accuracy changes with different demographic groups. The HappyDB is a dataset that contains over 100,000 happy statements, incorporating demographic information that includes marital status, gender, age, and parenthood status. Using the happiness category field, we test different types of machine learning classifiers to predict what category of happiness the statements belong to, for example, whether they indicate happiness relating to achievement or affection. The tests were initially conducted with three distinct classifiers and the best performing model was the convolutional neural network (CNN) model, which is a deep learning algorithm, achieving an F1 score of 0.897 when used with the complete dataset. This model was then used as the main classifier to further analyze the results and to establish any variety in performance when tested on different demographic groups. We analyzed the results to see if classification accuracy was improved for different demographic groups, and found that the accuracy of prediction within this dataset declined with age, with the exception of the single parent subgroup. The results also showed improved performance for the married and parent subgroups, and lower performances for the non-parent and un-married subgroups, even when investigating a balanced sample.
Original languageEnglish
Article number83
Issue number5
Early online date23 May 2022
Publication statusPublished online - 23 May 2022

Bibliographical note

Publisher Copyright:
© 2022 by the authors. Licensee MDPI, Basel, Switzerland.


  • machine learning
  • classification
  • positive psychology


Dive into the research topics of 'How Machine Learning Classification Accuracy Changes in a Happiness Dataset with Different Demographic Groups'. Together they form a unique fingerprint.

Cite this