Vector databases: What are they and how do they work?


2024-02-11

The recent and ever continuing advances in the quality of text, image, and audio transformers have given us access to numeric representations of these data formats that are well beyond what we could have even imagined a decade ago. Platforms like [Hugging Face](https://huggingface.co/) and others have made accessing these models easier than ever before and have enabled AI practitioners to…

Working with datetimes in pandas


2021-12-12

In this blog post I will be summarising some of the more useful datetime functions in pandas. In my current job, I often find myself dealing with time series datasets which require various datetime transformations. Initially I found myself spending a lot of time jumping around the [datetime](https://docs.python.org/3/library/datetime.html) and [pandas](https://pandas.pydata.org/docs/user guide/index.html) documentation trying to find out how to perform some…

Deep learning: Activation functions


2021-07-23

In this blog post I will be discussing activation functions for deep neural networks. I will begin by explaining what an activation function is and how they carry information through the network before taking a closer look at some of the more commonly used activation functions, and when they are best deployed. What is an activation function? In a neural…

Building a simple expected pass completion (xP) model using Keras


2021-07-03

In this blog post I will be going through how we can train a deep learning model, using passing event data from the [StatsBomb open data repository](https://github.com/statsbomb/open data) to develop a simple expected pass completion model. I will begin by stepping through the data preparation process before getting stuck into the modelling side of things and discussing some of the…

Cryptography: Implementing a Vigenère cipher in python


2021-04-07

In this blog post I will be discussing how we can implement a Vigenère cipher in python to encode and decode messages you may want to send to a friend. Before getting stuck into the coding aspect of this tutorial, I will give a brief overview of the history of the Vigenère cipher and how it works. Before finishing up…

Creating and working with map polygons using Google’s My Maps and Python


2021-02-27

In this (very) short blog post I will be discussing how we can use [Google’s My Maps](https://www.google.com/maps/about/mymaps/) to draw a polygon on a map and export it. I will then show you how to load this exported map polygon into python and check if a given point lies within the polygon (a point in polygon calculation) calculation. This sort of…

Using Siamese neural networks to create a simple rhyme detection system


2021-02-14

A couple of weeks back I was toying around with the idea of a project relating to ranking hip hop lyrics. While planing out what that would involve I got the idea of using a Siamese neural network to train rhyme detection system using character based on level encodings of song lyrics. In this blog post I will talk you…

Using general linear models to simulate Gaelic football matches in python


2020-10-16

In this blog post I will describe how we can use our understanding of the normal and poisson probability distributions to simulate Gaelic football matches for Dublin’s division 1 adult football league and determine the probability of either team winning the match. I will begin by briefly summarising the rules of the game and how we can download the data…

Using network analysis and eigenvector centrality to identify Arsenal’s most influential invincibles


2020-08-24

In this blog post I will discuss network analysis and in particular the idea of eigenvector centrality before demonstrating how it can be used to identify the most influential players in Arsenal’s undefeated team from the 03/04 premier league season. The dataset I will use for this tutorial will be a subset of data from the [StatsBomb open data repository](https://github.com/statsbomb/open…

An introduction to non-linear programming in python


2020-08-03

In this blog post I will discuss non linear programming – what it is, some of the challenges, and how we can solve a non linear problem using python. This blog post builds upon the learnings from my previous post on linear programming. If you are unfamiliar with the idea of linear programming, I would recommend starting with that post…

An introduction to linear programming in python


2020-07-20

In this blog post I will be discussing linear programming, a mathematical method used to determine the optimal solution to a linear equation subject to linear constraints. I will begin by introducing the idea of linear programming and what a typical linear programming problem looks like. From here I will work step by step through a simple profit maximisation problem…

Using the Rasa framework to implement a simple medical diagnosis bot


2020-04-26

While in lockdown, and after stumbling across a number of tweets and blog posts discussing how effective it is, I decided to spend some time getting familiar with the [Rasa conversational AI framework](https://rasa.com/). I understood that Rasa was capable of intent classification and entity extraction within conversational text and I was keen to understand how I could implement a simple…

Using the Hugging Face BART model to summarise match reports from the 2019 All-Ireland Championship Finals


2020-03-28

In this short blog post I will demonstrate how we can easily implement the new BART model (from [Hugging Face](https://huggingface.co/)) to summarise the match reports from the 2019 All Ireland Football and Hurling Championship Finals. The two match reports we will be summarising can be found on the RTE website [here](https://www.rte.ie/sport/gaa/2019/0914/1075925 five alive o dublin dominate kerry to make gaa…

Telegram API: Building a weather bot in 30 lines of code


2020-03-22

Over the last few months I have been playing around with the Telegram API for a couple of personal projects and I’ve been really impressed with how easy it is to set up and how handy it is receiving custom notifications and messages delivered automatically to my telegram inbox. In this post, I will show you how to create a…

Data integration, transformation, and visualisation using pandas


2020-01-12

In this post I will demonstrate how to we can use Python’s go to data manipulation module pandas to join multiple data sources, perform some basic transformations (aggregation, pivots, etc.), and visualise the data. For each example, I will provide a sample code snippet. However if you would like to see the code and data for this tutorial in full,…

An introduction to cosine similarity and sentence vectorisation


2019-09-29

In this post I will summarise and compare sentence similarity scoring using both bag of words and word embedding representations of the text. I will begin by introducing the idea of cosine similarity, a method for computing the similarity between two sentences. From here, I will walk through the steps involved (with code) in creating sentence vectors, first using bag…