Posts Tagged ‘mlforkids-tech’

Explaining machine learning with decision trees

Sunday, August 18th, 2019

Machine Learning for Kids now includes interactive visualisations that explain how some of the machine learning models that children create work.

The tool lets children learn about artificial intelligence by training machine learning models, and using that to make projects using tools like Scratch. I’ve described how I’ve seen children learn a lot about machine learning principles by being able to play and experiment with it. But I still want the site to do more to explain how the tech actually works, and this new feature is an attempt to do that.

(more…)

Using OpenWhisk in Machine Learning for Kids

Sunday, July 28th, 2019

I’ve moved a couple of bits of Machine Learning for Kids into OpenWhisk functions. In this post, I’ll describe what I’m trying to solve by doing this, and what I’ve done.

Background

I’ve talked before how I implemented Machine Learning for Kids, but the short version is that most of it is a Node.js app, hosted in Cloud Foundry so I can easily run multiple instances of it.

The most computationally expensive thing the site has to do is for projects that train a machine learning model to recognize images.

In particular, the expensive bit is when a student clicks on the Train new machine learning model button for a project to train the computer to recognize images.

(more…)

The Scratch coordinate system

Tuesday, July 23rd, 2019

In Scratch 3, the stage in the top right where your sprites live is implemented as an HTML canvas. Unfortunately the internal coordinate system used by Scratch logically to maintain state, and the coordinate system used by HTML canvases both work very differently.

For some of the Scratch blocks I’ve written for Machine Learning for Kids, I need to be able to convert between coordinates and sizes between the two different coordinate systems.

For example, my ML blocks can let a student use an image classifier they’ve trained to recognise what is on the background behind a certain Sprite in their project. To do that, the backdrop image block needs to:

  1. get the location of the Sprite (which will be returned using the Scratch coordinate system)
  2. get the image data of what is rendered on the canvas at that location (using HTML canvas APIs – using the HTML coordinate system)

I couldn’t find a way to convert between the two documented anywhere, and it was a tiny bit fiddly, so I’m documenting it here for the next time I need it!

(more…)

Curated sample training datasets for Machine Learning for Kids

Wednesday, June 26th, 2019

Machine Learning for Kids now includes support for a curated collection of training data sets, to enable children to create different types of machine learning projects.


Click to enlarge

The tool lets children make things using machine learning. The principle I’ve worked to is that children train their own machine learning models, as doing this is a great way to teach them about how this tech works.

Preparing their own training data is a useful exercise, but it is time-consuming. Project worksheets I’ve written so far have all been written with the assumption that the student will prepare the training data within a single lesson. This has been a limiting factor on the kinds of ML projects I’ve been able to include.

(more…)

Using nginx to enable custom domains in Auth0

Sunday, December 2nd, 2018

In this post, I’m sharing the nginx config needed to set up a reverse proxy for enabling custom domains in Auth0.

I’ll start by explaining why I needed this, but if you don’t care about that, you can just skip straight to the code.

I’ve mentioned before that I use Auth0 for authentication and authorization in Machine Learning for Kids. (And I’ve mentioned before that the developer experience using Auth0 is generally fantastic).

But I’ve had one auth-related complaint from schools since launching the site. And it’s been increasing in the last couple of months:

Users who have their web browsers set to block third-party cookies weren’t able to log in.

This is because the cookies were coming from an auth0.com domain, and not machinelearningforkids.co.uk.

(more…)

Running a multi-region Cloud Foundry application in IBM Cloud

Sunday, June 3rd, 2018

A few technical details on how I’m implementing global load balancing to improve the availability of Machine Learning for Kids.

This wasn’t a great week for Machine Learning for Kids. I think the site was unavailable for a couple of days in total this week, spread across a few outages – the worst one lasting over twelve hours. I know I’ve lost some users as a result – a few teachers / coding group leaders did email me to say (not at all unreasonably) that they can’t use a tool that they can’t rely on.

I wrote in my last post that I would be making changes to prevent this sort of thing from happening again. Now that I’ve done it, I thought it’d be good to share a few details on how I did it.

(more…)

Explaining crowd-sourcing in machine learning

Wednesday, January 31st, 2018

I pushed a new feature to Machine Learning for Kids last night: “class projects”. Now a whole class of students can work on a project together – all helping to train a shared, group machine learning model.

I’ll write some proper documentation for it, but in the meantime I thought I’d share a few quick thoughts on how this works and what it’s for.

(more…)

How I ended up making MachineLearningForKids

Sunday, October 29th, 2017

I write a lot about what I’m doing with machine learning for kids, but in this post, I want to share a little about how I ended up doing it and why.

I tend to write about *what* I’ve done. I rarely write how things happened though, or what made me do them. I just assume that people would be less interested in that.

But, if I think about what I find interesting, it tends to be the backstory to projects. To use Nick as an example, I’ve seen him give loads of talks about Node-RED. And I’ve enjoyed the ones where he talks about how Node-RED happened more than where he gives demos of what Node-RED is.

Inspired by that, I thought I should at least try to capture a few breadcrumbs for how I ended up where I am now with machinelearningforkids.co.uk.

(more…)