My first thing that learns things

Graham Paterson
5 min readAug 25, 2017

--

9 months ago I started working with an algorithmic product team — building models and algorithms that make operational decisions at Deliveroo.

I found I wasn’t picking it up as fast as I would like. I’m currently working across multiple teams so I couldn’t fully immerse myself in learning how the team works, and it’s all fairly alien to me so I subconsciously stuck to what I knew.

After 6 months I decided to change — to learn how machine learning works, rather than just knowing the dictionary definition. The best way I know how to learn is to make things.

What I want to learn from this:

  • the process around machine learning; what’s hard about, what’s easy?
  • how does the whole thing work?
  • how do you frame a machine learning problem?
  • what are the limitations to machine learning?
  • what parts are quick and simple? what’s more complicated?
  • how can I better work with people that do this every day?
  • where do opportunities lie in Deliveroo? I can’t contribute if I don’t understand the basics.
  • where do opportunities lie outside of Deliveroo? What could I build that would solve a real problem, or make me a bit of cash?

My journey here:

A few months ago I picked up four books that are helping me get my head around the whole subject (although it’s really more of an industry than a subject). Algorithms To Live By (easy read), How To Measure Anything (mid-weight read), The Master Algorithm (easy read), Reinforcement Learning (still working on, very hard read).

These books helped me think conceptually about maths, business, machines and brains. I complimented this with Andrew Ng’s Coursera Course on Machine Learning — it gets a bit mathematical but it’s generally accessible for anyone willing to put the time in.

I’ve been enjoying these, but I find learning for it’s own sake doesn’t give me energy. My concentration was wavering, and I was studying less and less. I could see myself giving up in a few months. So I decided it was time to build some stuff myself. Building crappy things is how I learned about websites, apps, design — pretty much any digital skill I’ve had has come from jumping in and doing things badly.

So I got started on a Kaggle tutorial that walks you through how to do data science. After a bit of copy-pasting I realised that the coding was a bit heavier than I could improvise, and I needed to brush up on my Python. So I picked up a free DataQuest.io course (similar to CodeAcademy but specialising in data), and spent a few weeks doing basic Python tutorials. I hadn’t finished the tutorials when I stopped, but I felt my attention waning again. I’d gone from wanting to learn how machines think to doing very basic Python on-repeat. Time to get back on track, and give my machine-learning hack a crack.

My second attempt at walking through the machine-learning tutorial (with my newfound Python skills) was more successful. I managed to copy-paste what I needed to, and get the thing working in the DataQuest browser. But the in-browser app is pre-loaded with lots of data and information that I don’t need to type; I wanted to get it working on my own computer, where it was 100% my own doing.

I downloaded some Python-specific packages into Atom (my new favourite text editor), to make things a bit easier. Then I walked through the tutorial again, line-by-line, but on my own computer. A bunch of stuff went wrong, as their code had quite a lot of bugs that their in-browser app ignored. But after 6 hours, it was working! My machine was fed data, told what to look for, and learned the odds of an outcome happening.

The machine’s job in this case is to predict the odds of someone surviving the sinking of the Titanic. I fed it data, cleaned the data a bit, and told it which data-points to look at (all steps from the tutorial). I ended up with something that can predict survival odds with 79% accuracy. The tutorial tells me that this isn’t very accurate, and there’s lots to improve but this machine taught itself, give it a break.

To me as a person, this programme wasn’t very interesting to me though — it’s not a product I could get any use from. So I added a bit of novelty — you could enter information about yourself, and then you were told the odds of your own survival.

Adding extra code myself was the most difficult part, asI’m not a developer by any stretch. But I got it working, and now I have my first thing that learns things that I’ve genuinely put a bit of originality into.

Next up, I want to work with my own code predicting the odds of something happening that has a bit more personal relevance — sports results!

What I learned from my first learner:

  • similar to other tech, copying and pasting other people’s code and changing bits here and there is simple.
  • you can get a huge amount of improvement from feature choices and pre-work on data — so don’t worry about the more complex algorithms.
  • there are different types of algorithm, and learning which one to choose is going to be a skill in itself
  • the machine can tell you how accurate it’s own predictions are, which feels weird
  • finding and cleaning data is very, very time-intensive, it’s probably the biggest time-based task. It’s also the equivalent of filling your car with petrol — the more you put in the better it’ll do the job, and you’d better fucking put in the right stuff.

That’s it. This is a big milestone for me, hopefully my next one will be more exciting for anyone else.

--

--

Graham Paterson

Working on Product at Deliveroo, created NightCapp. All my views are someone else’s.