Högskolan i Skövde

his.sePublications
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • apa-cv
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Prediktiv analys av sjukfrånvaro bland skolpersonal: En jämförelse mellan Random Forest och XGBoost
University of Skövde, School of Informatics.
2025 (Swedish)Independent thesis Basic level (degree of Bachelor), 20 credits / 30 HE creditsStudent thesisAlternative title
Predictive analysis of sick leave among school staff : A comparison between Random Forest and XGBoost (English)
Abstract [sv]

Sjukfrånvaro bland kommunalt anställda inom skolor och förskolor är ett problem som påverkar både undervisningens kontinuitet och arbetsmiljön. Denna studie syftar till att undersöka om prediktiv analys kan med hjälp av maskininlärning användas för att prognostisera sjukfrånvaro hos denna yrkesgrupp. Två modeller jämförs: Random Forest och XGBoost och datasetet omfattar personal och sjukfrånvaro data från en svensk kommun under åren 2018-2020.

Studien har en kvantitativ och experimentell ansats där modellerna först tränades på data från 2018-2019 och testades på data från året 2020. Prestandan utvärderades med precision, recall, f1-score och visualisering av prediktionerna över tid. Resultaten visar att båda modellerna lyckades att identifiera individer med låg sjukfrånvaro medan XGBoost uppvisade en bättre balans och träffsäkerhet. Modellerna prioriterade olika typer av inmatningsvariabler, ålder var den viktigaste variabeln för Random Forest och föregående sjukdagar i XGBoost, vilket kan ha implikationer för hur modellerna tolkas och används. 

Slutsatsen är att prediktiv analys kan bidra till insikter om sjukfrånvaromönster men att datakvalitet, klassobalans och val av algoritm påverkar resultatens tillförlitlighet. Studien understryker också att mer forskning behövs och ett bättre dataunderlag för att skapa användbara verktyg inom kommunal HR-analys.

Abstract [en]

Sick leave among municipal employees in schools and preschools is a problem that affects both the continuity of education and the work environment. This study aims to investigate whether predictive analytics, using machine learning, can be used to forecast sick leave within this occupational group. Two models are compared: Random Forest and XGBoost, based on personnel and sick leave data from a Swedish municipality covering the years 2018–2020.

The study follows a quantitative and experimental approach, where the models were trained on data from 2018–2019 and tested on data from the year 2020. Model performance was evaluated using precision, recall, F1-score, and visualization of predictions over time. The results show that both models were able to identify individuals with low levels of sick leave, while XGBoost demonstrated better balance and predictive accuracy. The models prioritized different input variables: age was most important for Random Forest, while previous sick leave was most important for XGBoost, which may have implications for how the models are interpreted and applied.

The conclusion is that predictive analytics can contribute to insights about sick leave patterns, but that data quality, class imbalance, and choice of algorithm affect the reliability of the results. The study also highlights the need for further research and improved data foundations in order to develop useful tools for municipal HR analytics.

Place, publisher, year, edition, pages
2025. , p. 53
Keywords [en]
sick leave, machine learning, predictive analytics, XGBoost, Random Forest, HR analytics, municipal sector, school staff
Keywords [sv]
sjukfrånvaro, maskininlärning, prediktiv analys, XGBoost, Random Forest, HR-analys, kommunal sektor, skolpersonal
National Category
Artificial Intelligence Information Systems
Identifiers
URN: urn:nbn:se:his:diva-25457OAI: oai:DiVA.org:his-25457DiVA, id: diva2:1982468
External cooperation
Hypergene
Subject / course
Informationsteknologi
Educational program
Information Systems
Supervisors
Examiners
Note

Det finns övrigt digitalt material (t.ex. film-, bild- eller ljudfiler) eller modeller/artefakter tillhörande examensarbetet som ska skickas till arkivet.

There are other digital material (eg film, image or audio files) or models/artifacts that belongs to the thesis and need to be archived.

Available from: 2025-08-04 Created: 2025-07-08 Last updated: 2025-09-29Bibliographically approved

Open Access in DiVA

fulltext(801 kB)197 downloads
File information
File name FULLTEXT01.pdfFile size 801 kBChecksum SHA-512
ca47c6aa8e4670b5fdaaf0560a6e89d2cc30b8e3462445deea3dae91f0ef303d1e19a90081124c41a448a4bf4e638201433d69fa8274ac218144eedc417a3e9e
Type fulltextMimetype application/pdf

By organisation
School of Informatics
Artificial IntelligenceInformation Systems

Search outside of DiVA

GoogleGoogle Scholar
Total: 198 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 505 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • apa-cv
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf