Getting Started

Photo by Emile Perron on Unsplash

First of all, what is Object-Oriented Programming? This is what is known as a Programming paradigm, which essentially means that it is a specific way of doing something or structuring your code. What OOP means is that you structure your code around objects which is good for building frameworks and tools or making the code more usable and scalable. These objects essentially store both data and methods in a single structure, which can be used again and again to create new instances of that structure so that you don’t have to repeat yourself. …

Photo by Nate Grant on Unsplash

There are plenty of articles out there that explain what a decision tree is and what it does:

So here I am going to focus on how a decision tree may be implemented using the scikit-learn library in python on the iris dataset, along with some of the functionality that is useful in analysing the performance of the algorithm.

What is a classifier?

A classifier algorithm is used to map input data to a target variable through decision rules and can be used to predict and understand what characteristics are associated with a specific class or target. This means that…

Photo by JC Gellidon on Unsplash

Admittedly I am a huge fan of the NBA even though I am based in the UK so I don’t get to see much of the games. This means that I get my fix mostly from following the stats and the highlights after the games. Although I regret that I don’t get to watch as many games as I like, the analytical side of me enjoys being able to watch and follow the stats, usually being able to roll them off my tongue to any unsuspecting victim that engages me on the topic. Given this though, I thought it would…

Photo by Ilya Pavlov on Unsplash

Atul Gawande is an American surgeon, notable for his four best-selling books of ‘Complications’, ‘Better’, ‘Being Mortal: Medicine and What Matters in the End’ and ‘The Checklist Manifesto, a MacArthur Fellowship grant, and many other accolades that if you want to know more you can read his bio from the New Yorker.

While he is indeed a surgeon, and three of his bestselling books are about medicine, in 2009 he wrote his book ‘The Checklist Manifesto’ in which he describes the usefulness of checklists and why are beneficial in a variety of complicated and complex situations. The examples he provides…

Photo by davisuko on Unsplash

In my previous medium article I introduced five different methods for Univariate outlier detection: Distribution plot, Z-score, Boxplot, Tukey fences and clustering. This highlighted the fact that several different methods can be used to detect outliers in your data, but that each of these can lead to different conclusions. As such, in selecting which method to use you should pay attention to the context of the data and what domain knowledge would also suggest would be classed as an outlier.

Often however, data is collected from multiple sources, sensors and time periods creating multiple variables that could interact with your…

Photo by Will Myers on Unsplash

Outlier detection can often be an important part of any exploratory data analysis. This is because in the real world, data is often messy and many different things can affect the underlying data. It is thus important to be able to identify different methods to be able to identify these from the underlying data.

The first thing to ask, then, is “what is an outlier?” An outlier can be classed as a data point, or several data points, that don’t fit the pattern, data structure, or within the normal bounds to what we would expect for the data that we…

Photo by Viki Mohamad on Unsplash

Convenience stores in the UK can be classed as stores that are smaller than 3,000 sqft, located close to consumers’ homes or a large daytime population, and have a wide but shallow product range¹. This means that they are mostly targeted at consumers looking to pick up extra items from their main shop, those that perform often but small shops, and consumers that may just want to pick up lunch while they are at the office.

These small stores have increasingly become the vehicle for continued expansion by grocery retail outlets in the UK because they require small threshold population…

Photo by NASA on Unsplash

Neural networks have been around for a long time, being developed in the 1960s as a way to simulate neural activity for the development of artificial intelligence systems. However, since then they have developed into a useful analytical tool often used in replace of, or in conjunction with, standard statistical models such as regression or classification as they can be used to predict or more a specific output. …

Photo by André François McKenzie on Unsplash

The story so far

In February of this year, Tesla announced that it had purchased a large amount of Bitcoins (on the order of $1.5bn) and would now allow new Tesla’s to be bought with the Cryptocurrency¹. This came at a time when confidence in Crypto has been continually increasing but it seemed like this was the boost it needed to really take off. Along with Bitcoin itself, this move appeared to grant legitimacy to many Cryptocurrencies that had started to gain ground in potential mainstream circles, but a big move by Tesla has yet to have been made by any other company to…

Photo by Kafai Liu on Unsplash

In our attempt to cluster crimes in London in the previous article, we ignored the spatial dimension of the data in performing the clustering. Thus, this article seeks to remedy this by explicitly accounting for this.

Since the objective of the clustering was to identify how different clusters manifested themselves spatially, and that the original theory was that an LSOA located next to another is likely to be related in terms of the dominant type of crime, we need to account for this potential spatial relationship. This is done by imposing spatial constraints on clusters.

In doing so, this creates…

Philip Wilkinson

CASA PhD student, Spatial Analysis, Data Science and Software development. 30,000+ views. Connect on

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store