Bartosz Malman

My name is Bartosz, I am living in Lund, Sweden, where I am currently working towards a PhD degree in mathematics at Lunds Universitet, sitting in the Matematikcentrum. A preliminary version of my PhD thesis can be found here.

My mathematical research is focused on the subjects of operator theory and complex analysis. You can read more about my mathematical work here or in the introductory sections of the thesis linked above. I also like pure and applied computer science and programming, you can find some samples of my work here on this webpage.

Previously I have obtained Master's degree in Computer engineering at E-Huset, and then my adventures took me all the way to Matematikcentrum at the other side of the lake on the same campus, where I obtained a Master's degree in mathematics.


Address: Vikingavägen 20c,
22477 Lund,
Phone: +46730561902


Address: Sölvegatan 18,
Box 118,
221 00 Lund,
Office: 512, fifth floor
A pdf version of my CV is here.

Accepted publications


I have coded a small drawn digit recognition tool in Python, Javascript and PHP. The idea was to learn a bit about this new fashionable concept of artificial neural networks, and not use any machine learning libraries but instead get a feeling for the subject by deriving the equations and building every piece from scratch. I have used the excellent book by Michael Nielsen as my knowledge source. The mathematical theory requires not more than a university course in multivariable calculus, and perhaps a bit of linear algebra, to understand.

I have used the simplest fully-connected neural networks, with the cross-entropy cost function and L2 weight regularization techniques, as well as some hard-to-justify improvisations that I thought might help. The code for learning was written in Python and can be found here. It is not optimized in any particular way, but runs fast enough to train the networks in reasonable time on my cheap personal laptop. A learned network was then ported to PHP, and the app below does some necessary pre-processing of the input image in Javascript.

I have trained several networks. The first two, which I call B1 and B2, will be used if you press the blue buttons below. They are both trained using the classical MNIST database of 60000 scanned images of handwritten digits. The first network one consists of two hidden layers, 100 neurons in the first and 10 in the second. I've achieved a 98.01% accuracy on the MNIST test data set. The network B2 consists of 150, 200 and 100 hidden neurons in the three hidden layers. It incidentally achieved the same 98.01% accuracy as the simpler B1. The two networks B3 and B4 will be used if you press the green buttons below, and these networks are trained using the EMNIST database . This data set is much larger than MNIST as it consists of 240000 images of handwritten digits. The corresponding article describes the structure of the data in EMNIST in detail. B3 consists of one hidden layer of 250 neurons, while B4 is a bit deeper. It has three hidden layers of 300, 250 and 200 neurons in the layers. I've achieved 98.95% and 99.19% accuracy on the EMNIST test data set using the networks B3 and B4 respectively.

I have also trained a convolutional neural network K1 using the Python library Keras, the architecture can be inferred from my script here. The network was trained in Python and then ported to Javascript using TensorFlow.js. Unsurprisingly it is a bit better than my own fully-connected networks, and reaches as much as 99.5% accuracy on EMNIST test set.

In the drawn digit recognition below, the estimates of the networks do sometimes differ. When one fails, sometimes some other succeeds, suggesting that an ensamble of networks could probably improve the results. An average of the networks estimates will be displayed after pressing the vote button below. The pie chart appearing on the right side represents some sort of confidence in the decision that the network made, in the sense that it displays the "probabilities" that the input image is a certain digit. Check yourself how it recognizes digits drawn by you. When I draw the digit, first two networks seem to have some trouble with detecting my "8s", and they often think it is a "3". My "4" sometimes kind of looks like a "9", then this is evidenced in the probabilities in the pie chart. I find that if I put in minimal effort into drawing the digit, the recognition works great except for 8s. Of course, the data used for learning was actual scanned human-handwritten digits, while here we input something drawn on a computer screen, so certain difficulties are understandable.

Draw in the left box.
Some time ago I decided to stop wasting time watching the English Premier League every weekend, and instead wanted to do something more productive with my free time. So I learned a bit of web application development through coding of a training log application which I needed at the time and which I to this date use. It has a stupid name, it is based on Laravel framework and is thus written in PHP. Here is my own profile where I log all my training, body weight and other things. I use it mainly to keep myself accountable and to collect data to be able to compute all sorts of statistics that I find interesting. It has a stock Laravel login and registration feature, but the application is not particularly useful for anyone except me, since the exercise list is static and cannot be modified by other users (perhaps I'll fix that in the future, I continuously develop the app whenever I find motivation). The application works fine at least on latest versions of Google Chrome and Mozilla Firefox, and it looks fine in Safari on my iPhone. I have not tested it on other platforms.