###Devlog 5
You might wonder why random red dots are flying to heaven.
Short story: It’s one of my most annoying failures.
You see, I’m building TerrorPredictor, a linear regression model that predicts terror attacks in different countries.
Yes, this is AI but it’s old school.
Anyway, over the last few devlogs (go check them out!) I’ve collected data to feed to the model (so that it can learn). You see, terror attacks are driven by many things including the living conditions of the population. Or so I thought. This graph shows me that’s not true, at least in my data.
———–Long Story————
Over the last few days I’ve been learning statistics. I’ve mostly spent time on theory, which is why only 3 hours of work is shown here. I’ve learnt a lot, and made some mistakes too.
First of all, I learnt about variance, standard deviation and other metrics that we use to study data. It turns out my data is not uniform, because some terrorist attacks have thousands of victims, while most kill nobody. This spelled trouble for my analysis, because the most common analysis method, linear regression, requires the data to be more or less uniformly distributed. But this is an issue which can be fixed.
——What’s the graph?——
I’ll answer that soon. After looking at metrics, I started looking at statistical distributions. I plotted my data, and found this graph. At first glance, it looks like there is some sort of relationship between HDI and number of victims of attacks. Notice the floor of values near y=0. It tells me that it’ll be very difficult to predict anything using HDI. I’m not getting rid of HDI data yet, though things don’t look good for it. (HDI is the human development index - a metric quantifying living conditions)
I learnt a painful lesson though - before spending effort cleaning data (other than the bare minimum of course), first check that the data has a relationship at all.
——What Works?——
I did have some success - civilian deaths in a country seem to have a power-law relationship with number of casualties, so I do have one successful parameter. I can easily convert this to linear through log-log scaling.
I’ll try to look for more parameters - probably already found one too. I won’t make the same mistake again.
PS: The reason the dots are reaching for heaven is because they are outliers and don’t follow the typical pattern.