18 Feb 2021 · 1 min read

The True & False Paradox

Consider the following statement:

07 Feb 2021 · 7 mins read

EI: Ethical Intelligence (Philosophy Olympiad)

Last week I had the pleasure to take part in the national Philosophy Olympiad and write an essay discussing one of 4 quotes. I am proud that my essay on ethical artificial intelligence was selected by the judges as the best essay. I have pasted my essay with some very minor typo fixes below. I should note that we had only three hours to write the essay, so in retrospect I would have done a few things differently.

03 Aug 2020 · Published on Heartbeat

Building a Multi-platform App with SwiftUI

At WWDC 2020, Apple introduced a bunch of great new updates to SwiftUI to make it even easier for developers to write apps for Apple platforms. In this tutorial, you’ll learn how to use those new features to make your app work on both iOS and macOS. By the end of this tutorial you will have created a fully functional HackerNews reader.

07 Jul 2020 · 3 mins read

Why school sucks

I’m a high school student, and like most students I studied from home for the last 4-ish months. I study in my bedroom which is similar to my future workplace, or maybe it even is. My bedroom is equipped with a computer with an internet connection, same setup as my working parents. Since school is meant to prepare us for our careers, my bedroom seems to be the perfect place to pursue an education.

29 Feb 2020 · 12 mins read

An Intuitive Guide to Neural Networks

In this post you will build a classifier model to classify images of handwritten digits. This may sound like a rather complicated problem to solve (what is “the number 5”?). However, by using the power of machine learning we do not have to define each number; it will learn by itself. Along the way I will introduce you to the most powerful classifier yet: neural networks. Entering deep learning for the first time.

22 Feb 2020 · 5 mins read

Softmax Regression from Scratch in Python

Last time we looked at classification problems and how to classify breast cancer with logistic regression, a binary classification problem. In this post we will consider another type of classification: multiclass classification. In particular, I will cover one hot encoding, the softmax activation function and negative log likelihood.

19 Feb 2020 · Published on Heartbeat

Generating docs for your Swift Package and hosting on GitHub Pages

Swift Packages are one of the most exciting applications of the Swift programming language. Packages allow for development beyond your usual app — it even works on Linux!

08 Feb 2020 · 10 mins read

Logistic Regression from Scratch in Python

Classification is one of the biggest problems machine learning explores. Where we used polynomial regression to predict values in a continuous output space, logistic regression is an algorithm for discrete regression, or classification, problems.

23 Jan 2020 · 7 mins read

Google Code In 2019/2020 (TensorFlow) - A Review

Each year Google organizes Google Code-In: a programming competition for teenagers aged 13 to 17. Different organizations offer a wide variety of tasks for students from all around the world to complete. These tasks take 3 to 10 hours to complete, depending on the requirements and creativity of the student. They receive feedback from mentors and get a chance to incorporate the feedback in their work. When they are done the mentors can accept the task. Now the student can claim another task. And repeat! And repeat!

22 Jan 2020 · Published on Heartbeat

Speech recognition and speech synthesis on iOS with Swift

Everyone knows Siri, and many people use it every day. Why? Because Siri provides a very fast and user-friendly way of interacting with an iOS device.

22 Dec 2019 · 13 mins read

Polynomial Regression from Scratch in Python

Machine learning is one of the hottest topics in computer science today. And not without a reason: it has helped us do things that couldn’t be done before like image classification, image generation and natural language processing. But all of it boils down to a really simple concept: you give the computer data and the computer then finds patterns in that data. This is called “learning” or “training”, depending on your point of view. These learnt patterns can be extrapolated to make predictions. How? That’s what we are looking at today.

20 Dec 2019 · Published on Heartbeat

Deploying Core ML models using Vapor

Core ML is Apple’s framework for machine learning. With Core ML, everyone can use machine learning in their apps—as long as that app runs on an Apple platform, and Apple platforms only. Core ML cannot be used with Android, Windows, or on websites. This is very unfortunate because Core ML is such a great piece of technology.

06 Dec 2019 · 13 mins read

An introduction to Generative Adversarial Networks (in Swift for TensorFlow)

Generative adversarial networks, or GANS, are one of the most interesting ideas in deep learning. Using GANs computers get a sense of imagination, they can create their own “things”. But how do they do that? It’s easy to have a computer generate random data, but that’s of low value to us, humans. How does a computer generate something that looks like items in the dataset?

04 Dec 2019 · Published on Heartbeat

An Empirical Comparison of Optimizers for Machine Learning Models

At every point in time during training, a neural network has a certain loss, or error, calculated using a cost function (also referred to as a loss function). This function indicates how ‘wrong’ the network (parameters) is based on the training or validation data. Optimally, the loss would be as low as possible. Unfortunately, cost functions are nonconvex — they don’t just have one minimum, but many, many local minima.

03 Dec 2019 · 11 mins read

Your first Swift for TensorFlow model

Swift for TensorFlow is TensorFlow, implemented in Swift. Its Python counterpart (“TensorFlow”) is one of the best deep learning libraries ever made, but it’s hitting its limits. Python, being interpreted, is quite a slow language. Python is also limiting in many other ways, it lacks features that could make your life, as a programmer, much easier.

14 Nov 2019 · Published on Heartbeat

Benchmarking deep learning activation functions on MNIST

Over the years, many activation functions have been introduced by various machine learning researchers. And with so many different activation functions to choose from, aspiring machine learning practitioners might not be able to see the forest for the trees. Although this range of options allows practitioners to train more accurate networks, it also makes it harder to know which one to use.

13 Oct 2019 · Published on Heartbeat

Building a Barcode Scanner in Swift

Barcodes are everywhere. They provide a uniform interface for machines to identify real world items. Thanks to the decimal code underneath the bars, barcodes are also interpretable by humans, which makes them wildly used virtually everywhere.

13 Aug 2019 · 5 mins read

Linear Regression in Swift with Tensorflow

Swift is a new programming language introduced by Apple in 2014. Despite being so young compared to other languages, it is already widely used in industry. It is mostly used to develop apps for Apple’s platforms. Recently however, after Apple making Swift open source, Swift was ported to linux and now Google is taking an interest in Swift by writing large parts of its deep learning library, TensorFlow, in Swift.

12 Aug 2019 · 3 mins read

Label Smoothing

Working in machine learning includes dealing with poorly labelled datasets. Very few companies can afford hiring people to label the huge amounts of data required for large scale projects. Luckily, high quality datasets are available for practise projects. In production however, one will most likely need a custom dataset. With applications such as BeautifulSoup and Scrapy it’s easy to collect large amounts of data from the internet. Labelling the data is a common pain-point. Luckily there are other solutions available than annotating the data yourself or hiring people to do it for you. Label smoothing is a mathematical technique that...

08 Aug 2019 · 4 mins read

Numpy vs PyTorch for Linear Algebra

Numpy is one of the most popular linear algebra libraries right now. There’s also PyTorch - an open source deep learning framework developed by Facebook Research. While the latter is best known for its machine learning capabilities, it can also be used for linear algebra, just like Numpy.

07 Aug 2019 · 7 mins read

GANs for Watermark Removal

Generative Adversarial Networks, or GANs, are a new machine learning technique developed by Goodfellow et al. (2014). GANs are generally known as networks that generate new things like images, videos, text, music or nealry any other form of media. This is not the only application of GANs, however. GANs can be used for image reconstruction as well as you’ll see in this post where we’re building a watermark remover tool.

28 Jul 2019 · 5 mins read

Introduction to natural language processing in Swift

As computers get smarter, the communication between machines and humans becomes more of a bottleneck. While humans are socially smarter, computers have surpassed us in many ways in areas like math and science. Perhaps the most important side of this bottleneck is communicating emotions. Although emotions are a fundamental part of human communications, computers often fail to comprehend. Luckily, there are people who are researching ways to use machine learning techniques to help computers understand humans emotions.

23 Jul 2019 · 7 mins read

Compressing images using Python

Compressing images is a neat way to shrink the size of an image while maintaining the resolution. In this tutorial we’re building an image compressor using Python, Numpy and Pillow. We’ll be using machine learning, the unsupervised K-means algorithm to be precise.

10 Jul 2019 · 4 mins read

Training Drawings.mlmodel

For my WWDC Scholarship submission I used a custom machine learning model that I trained using CreateML. In this blogpost I will be explaining how I went from binary data to a state of the art machine learning model.

10 Jul 2019 · 9 mins read

Creating PictionARy

On April 16th, 2019 an email landed in my inbox. The subject line read: “You’ve been awarded a WWDC19 Scholarship.” What?! Because this was my first time taking part in a programming competition, I didn’t expect to win at all.