Mid Sweden University

miun.sePublications
Planned maintenance
A system upgrade is planned for 17/11-2026, at 12:00-13:00. During this time DiVA will be unavailable.
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • 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
Forecasting Environmental Reports forVehicles Using Machine Learning: Predicting Fuel Consumption from buses data Using KNNand ANN Models
Mid Sweden University, Faculty of Science, Technology and Media, Department of Computer and Electrical Engineering (2023-).
2025 (English)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE creditsStudent thesis
Abstract [sv]

Att korrekt prognostisera miljödata är inte lätt för kollektivtrafikföretag som försöker nå hållbarhetsmål och framtida planering. I detta projekt användes maskininlärning för att förutsäga månatlig bränsleförbrukning baserat på planerad resedata. Två modeller testades: K-Nearest Neighbor (KNN), känd för sin enkelhet, och ett artificiellt neuralt nätverk (ANN), som kan lära sig mer komplexa mönster. Fem olika inmatningskonfigurationer skapades för att utvärdera hur olika kombinationer av funktioner påverkar prestandan. Modellerna utvärderades med hjälp av bestämningskoefficient (R²) och förklaringsmetoder användes för att bättre förstå resultaten. Permutationsviktighet användes för KNN och Shapley Additive ExPlanations (SHAP)-värden tillämpades på ANN. Resultaten visade att ANN presterade något bättre än KNN i de flesta fall, med jämnare träningsbeteende och bättre förmåga att fånga icke-linjära samband. Men KNN presterade också bra i enklare uppsättningar med starka funktioner vad gäller noggrannhet. De mest användbara indatavariablerna var de utvecklade funktionerna PlannedDistance, PlannedDrivingTime och StartHour.BProjektet visade att noggranna förutsägelser kan göras med endast data från det planerade schemat, vilket innebär att lösningen kan integreras i befintliga system. Detta gör den till ett praktiskt verktyg för att förbättra hållbarhetsrapportering och ruttplanering inom kollektivtrafiksektorn.

Abstract [en]

Accurately forecasting environmental data is not easy for public transport companies seeking to reach sustainability goals and future planning. In this project, machine learning was used to predict monthly fuel usage based on planned trip data. Two models were tested: K-Nearest Neighbor(KNN), known for its simplicity and an Artificial Neural Network(ANN), which can learn more complex patterns. Five different input configurations were created to evaluate how different combinations of features affect performance. The models were evaluated using Coefficient of determination(R²) and explainability methods were used to better understand the results. Permutation importance was used for KNN and Shapley Additive exPlanations(SHAP) values were applied to ANN. The results showed that ANN slightly outperformed KNN in most cases, with smoother training behavior and better ability to capture non-linear relationships. But KNN also performed well in simpler setups with strong features in terms of accuracy. The most useful input variables were the engineered features PlannedDistance, PlannedDrivingTime, and StartHour. The project showed that accurate predictions can be made using only data from the planned schedule, which means the solution can be integrated into existing systems. This makes it a practical tool for improving sustainability reporting and route planning in the public transport sector.

 

Place, publisher, year, edition, pages
2025. , p. 55
Keywords [en]
Machine Learning, K-Nearest Neighbor, Artificial Neural Network
Keywords [sv]
Maskininlärning, K-närmaste granne, artificiellt neuralt nätverk
National Category
Software Engineering
Identifiers
URN: urn:nbn:se:miun:diva-54854Local ID: DT-V25-G3-028OAI: oai:DiVA.org:miun-54854DiVA, id: diva2:1978123
Educational program
Computer Science TDATG 180 higher education credits
Supervisors
Examiners
Available from: 2025-06-27 Created: 2025-06-27 Last updated: 2025-09-25Bibliographically approved

Open Access in DiVA

fulltext(2173 kB)89 downloads
File information
File name FULLTEXT01.pdfFile size 2173 kBChecksum SHA-512
6781c0a46a44a0408dbce490af9cddb402bb44ec1606a904b8be4449f150e392f8087c4f506add85b9f860df0d4291084b609778c39ebf77225aacfc618fabe4
Type fulltextMimetype application/pdf

Search in DiVA

By author/editor
Bodin, Måns
By organisation
Department of Computer and Electrical Engineering (2023-)
Software Engineering

Search outside of DiVA

GoogleGoogle Scholar
Total: 90 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: 159 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • 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