diff --git a/publication/samples/article.pdf b/publication/samples/article.pdf index dfa21bc..3032fac 100644 Binary files a/publication/samples/article.pdf and b/publication/samples/article.pdf differ diff --git a/publication/samples/article.tex b/publication/samples/article.tex new file mode 100644 index 0000000..98a6368 --- /dev/null +++ b/publication/samples/article.tex @@ -0,0 +1,282 @@ +%% +%% This is file `sample-sigplan.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% samples.dtx (with options: `sigplan') +%% +%% IMPORTANT NOTICE: +%% +%% For the copyright see the source file. +%% +%% Any modified versions of this file must be renamed +%% with new filenames distinct from sample-sigplan.tex. +%% +%% For distribution of the original source see the terms +%% for copying and modification in the file samples.dtx. +%% +%% This generated file may be distributed as long as the +%% original source files, as listed above, are part of the +%% same distribution. (The sources need not necessarily be +%% in the same archive or directory.) +%% +%% +%% Commands for TeXCount +%TC:macro \cite [option:text,text] +%TC:macro \citep [option:text,text] +%TC:macro \citet [option:text,text] +%TC:envir table 0 1 +%TC:envir table* 0 1 +%TC:envir tabular [ignore] word +%TC:envir displaymath 0 word +%TC:envir math 0 word +%TC:envir comment 0 0 +%% +%% +%% The first command in your LaTeX source must be the \documentclass +%% command. +%% +%% For submission and review of your manuscript please change the +%% command to \documentclass[manuscript, screen, review]{acmart}. +%% +%% When submitting camera ready or to TAPS, please change the command +%% to \documentclass[sigconf]{acmart} or whichever template is required +%% for your publication. +%% +%% +\documentclass[sigplan,screen]{acmart} + +%% +%% \BibTeX command to typeset BibTeX logo in the docs +\AtBeginDocument{% + \providecommand\BibTeX{{% + Bib\TeX}}} + +%% Rights management information. This information is sent to you +%% when you complete the rights form. These commands have SAMPLE +%% values in them; it is your responsibility as an author to replace +%% the commands and values with those provided to you when you +%% complete the rights form. +\setcopyright{acmcopyright} +\copyrightyear{2023} +\acmYear{2023} +\acmDOI{XXXXXXX.XXXXXXX} + +%% These commands are for a PROCEEDINGS abstract or paper. +\acmConference[SIGBOVIK '23]{The conference of the ACH Special Interest Group on Harry Quartet Bovik}{April 1, 2023}{Pittsburgh, Pennsylvania} +%% +%% Uncomment \acmBooktitle if the title of the proceedings is different +%% from ``Proceedings of ...''! +%% +%%\acmBooktitle{Woodstock '18: ACM Symposium on Neural Gaze Detection, +%% June 03--05, 2018, Woodstock, NY} +\acmPrice{0} +\acmISBN{978-1-4503-XXXX-X/18/06} + + +%% +%% Submission ID. +%% Use this when submitting an article to a sponsored event. You'll +%% receive a unique submission ID from the organizers +%% of the event, and this ID should be used as the parameter to this command. +%%\acmSubmissionID{123-A56-BU3} + +%% +%% For managing citations, it is recommended to use bibliography +%% files in BibTeX format. +%% +%% You can then either use BibTeX with the ACM-Reference-Format style, +%% or BibLaTeX with the acmnumeric or acmauthoryear sytles, that include +%% support for advanced citation of software artefact from the +%% biblatex-software package, also separately available on CTAN. +%% +%% Look at the sample-*-biblatex.tex files for templates showcasing +%% the biblatex styles. +%% + +%% +%% The majority of ACM publications use numbered citations and +%% references. The command \citestyle{authoryear} switches to the +%% "author year" style. +%% +%% If you are preparing content for an event +%% sponsored by ACM SIGGRAPH, you must use the "author year" style of +%% citations and references. +%% Uncommenting +%% the next command will enable that style. +%%\citestyle{acmauthoryear} + +\usepackage[binary-units]{siunitx} +\usepackage{listings} + +%% +%% end of the preamble, start of the body of the document source. +\begin{document} + +%% +%% The "title" command has an optional parameter, +%% allowing the author to define a "short title" to be used in page headers. +\title{Superseeding Public Transport Timetables With AI} + +%% +%% The "author" command and its associated commands are used to define +%% the authors and their affiliations. +%% Of note is the shared affiliation of the first two authors, and the +%% "authornote" and "authornotemark" commands +%% used to denote shared contribution to the research. +\author{Robert Bendun} +\email{robert@bendun.cc} +\affiliation{% + \institution{Adam Mickiewicz University} + \city{Poznań} + \country{Poland} +} + +%% +%% The abstract is a short summary of the work to be presented in the +%% article. +\begin{abstract} + A clear and well-documented \LaTeX\ document is presented as an + article formatted for publication by ACM in a conference proceedings + or journal publication. Based on the ``acmart'' document class, this + article presents and explains many of the common variations, as well + as many of the formatting elements an author may use in the + preparation of the documentation of their work. +\end{abstract} + +%% +%% The code below is generated by the tool at http://dl.acm.org/ccs.cfm. +%% Please copy and paste the code instead of the example below. +%% +\begin{CCSXML} + + + 10003456.10003457.10003567.10003569 + Social and professional topics~Automation + 500 + + +\end{CCSXML} + +\ccsdesc[500]{Social and professional topics~Automation} + +%% +%% Keywords. The author(s) should pick words that accurately describe +%% the work being presented. Separate the keywords with commas. +\keywords{neural networks, public transport} +%% A "teaser" image appears between the author and affiliation +%% information and the body of the document, and typically spans the +%% page. +\begin{teaserfigure} + \includegraphics[width=\textwidth]{tablica-informacyjna} + \caption{Information table with nearest departures} + \Description{Enjoying the baseball game from the third-base + seats. Ichiro Suzuki preparing to bat.} + \label{fig:teaser} +\end{teaserfigure} + +\received{20 February 2007} +\received[revised]{12 March 2009} +\received[accepted]{5 June 2009} + +%% +%% This command processes the author and affiliation and title +%% information and builds the first part of the formatted document. +\maketitle + +\section{Disclaimer} +This article is written for educational purpose. Any and all opinions and information listed in this article should be considered as not representative of me, my university and my employer. Reader discretion is advised. + +\section{Introduction} +Public transportation systems are an essential part of modern city infrastructure, providing reliable and efficient transportation for millions of people every day. +However, the reliability of public transport services can often be compromised due to a variety of factors such as traffic congestion, weather conditions, and unexpected events. + +Devices showing nearest public transport arrivals on given stop (like one on figure \ref{fig:teaser}), often require Internet access, introducing unnessesary network traffic and increasing city carbon footprint. +To combat climate change and reduce noise introduced by network traffic with devices syncing current tram and bus positions, change is required. + +We propose to replace network-enabled embeded systems with networkless devices that contain prediction model described by this paper. +By reducing complexity of device by reduction of it's capabilities we can reduce production costs and availability of new devices. +We can additionally reduce device shown on figure \ref{fig:teaser} by displaying only the direction for the nearest tram or bus arrival. +This allows to reduce problem into multiclass classification. + +\section{Related work} +Most of AI usage inside the public transportation context is concerned with optimization of schedules. +Searching for work that uses AI in interaction between passenger and public transport system is rather difficult. + +Strongest connection can be found with general AI in public transport articles, especially ones overwieving applications of AI in public transport \cite{ai_in_transport}. + +\section{Method} + +\subsection{Dataset} + +Dataset from which train and test data were created is publicly accessible public transport schedule information of ZTM Poznań \cite{ztm_dataset}. +Due to storage limit, few files from last few months are selected, resulting in \SI{400}{\mebi\byte} initial dataset size. +Then data is transformed from CSV format to TSV format, which is more suitable for standard shell text utilities consumption. Utility is written in Go for both performance and ease of use thanks to builtin CSV parser \cite{go_csv}. + +Next, data is normalized using hand-written tool in C++: data notation is changed from \texttt{HH:MM} format to floating point representation when span from \texttt{00:00} to \texttt{23:59} is mapped to span $ \left[0, 1\right] $. +If row doesn't contain all required information then it's rejected. +All columns that are not nessesary are removed. +This results in \SI{176}{\mebi\byte} (originally \SI{400}{\mebi\byte}). + +Training, validation and test data are extracted from normalized file using scikit-learn \cite{scikit_learn} function \texttt{train\_test\_split}. +All classes in dataset are extracted from normalized dataset using standard POSIX utilities: \texttt{cut}, \texttt{uniq}, \texttt{sort}. + +\subsection{Model} + +Model is implemented using Tensorflow \cite{tensorflow2015-whitepaper} framework, both to develop and evaluate. +Design of the model is driven by the computational capabilities of Lenovo Thinkpad x270 with i5-7300U processor and 8GB of RAM. + +Model is constructed as shown below: +\begin{lstlisting}[language=Python] +from tf.keras import Sequential +from tf.keras.leyers import Input, Dense + +model = Sequential([ + Input(shape=(2,)), + Dense(4*num_classes,activation='relu'), + Dense(4*num_classes,activation='relu'), + Dense(4*num_classes,activation='relu'), + Dense(num_classes,activation='softmax') +]) +\end{lstlisting} + +Notable used activation function is softmax, defined as: $ \sigma(z)_i = \frac{e^{z_i}}{\sum_{j=1}^{K} e^{z_j}} $ for $ i = 1, \dots, K$ and $z = (z_1, \dots, z_K)$. + +\section{Results} + +Accuracy while training for 2 epochs, epoch size is 1024. + +\begin{table} + \caption{Accuracy of trained model} + \label{tab:freq} + \begin{tabular}{c} + \toprule + Accuracy\\ + \midrule + $0.20598010947207804$ \\ + $0.20598010947207804$ \\ + $0.18560214941090175$ \\ + $0.19518890350138754$ \\ + $0.19516771079968306$ \\ + \bottomrule +\end{tabular} +\end{table} + +Further evaluation and model training is required. + +\section{Conclusions} + +Due to available computational power (or lack there off) any conclusions about the solution are limited. +However, with model defined as above we can efficiently compress information - timetables storing required information for a month are \SI{62}{\mebi\byte} and stored model occupies only \SI{19}{\mebi\byte}. +Due to greater space-efficiency of AI powered solution, test deployment may be tested in the near future. + +%% +%% The next two lines define the bibliography style to be used, and +%% the bibliography file. +\bibliographystyle{ACM-Reference-Format} +\bibliography{article} + + +\end{document} +\endinput