×

Activity Summary

An introduction to Machine Learning using Machine Learning for kids, with the option of adding Python into the mix.

Activity Procedure

Preparation: 

  1. Install Python on the computers  – https://www.python.org/downloads/
  2. Install requests on the computers
    •  Go to command line or terminal and type: pip install requests
  3. Show one of youtube videos on what Machine Learning is and why it’s important. 
  4. Go to Machine Learning For Kids
  5. Click “Get Started”, the kids can sign up for an account if they want, if not, just click “try it out for now”
  6. First, go to copy template to show a tutorial on how you would use machine learning. Click on “Import Titanic Survivors”

       7. Click on Titanic Survivors, then on Train.

      8. You’ll notice there’s a LOT of data in the survived and did not survive categories. Explain that this model doesn’t            have the passengers names, just their ticket class, gender, age, siblings, parents, ticket fare and embankment area.              Based on this data, the model can predict whether a passenger survived or did not. 

     9. Go back a page and go to Learn & Test. Click on the “Train new machine learning model”. 

    10. Test out the model using the characters from 1997 Titanic movie 

              a. Jack Dawson (played by Leonardo DiCaprio)

      1.  Jack was a 20 year-old man. 
      2. He paid nothing for his third-class ticket, because he won it in a poker game. 
      3. He boarded RMS Titanic in Southampton, in England. 
      4. He had become an orphan when he was 15, and had no other family on board.

             b. Rose DeWitt-Bukater (played by Kate Winslet)

      1. Rose was a 17 year-old woman. 
      2. She had a first-class ticket. The film doesn’t mention exactly how much it cost, but based on the room that she had, we can estimate her ticket cost £450. 
      3. She boarded the ship in Southampton, England. 
      4. She came on board with her mother and her fiancé. She didn’t have any brothers or sisters on board.

      11. Go back a page and then click on Make, and then Python 

      12. Copy the code and then open up IDLE from Python 

      13. Under File, click “New File”, and then copy the code in there. 

     14. Change the “data1, data2…” to the values such as “ticket_class, gender…etc” and then put in the values for Jack

     15. Save the script and call it jack.py

     16. Select run, and run module, and it should run the python script.

Titanic code

 

  1. Now that the kids have an example of how the site works and how machine learning can look like, it’s their turn to create their own Machine Learning model. 
  2. Go back to the projects page and click “add a new project”.
  3. The models can recognize text, images, numbers and sounds. 
  4. Get the kids to pick a project of their choice, can be anything from simply recognizing dogs vs cats to sports statistics. Encourage them to create models on something they know or are interested in learning more on. 
  5. Troubleshoot any issues arising with Python. 

SAMPLE PROJECT YOU CAN GIVE THEM IF THEY’RE NOT SURE WHAT TO DO – OR ARE STILL STUCK

Ice Cream Flavour Test with Machine Learning!

Add items to your likes and dislikes. You can choose your own categories – I chose sweetness, chocOrVan, saltiness, and nuts. 

Run the following code, similar to the previous one in the tutorial above – only changes here are to include the ‘int’ -> this is so that you can use a raw_input (it prompts the question in the terminal) and still be working in the right data types (i.e. string, integer, etc.)

The latter half of the code exists to plot the datasets for ‘Liked’ or ‘Disliked’ flavours to see how scattered they are on.

 

Reflection & Debrief

Revisit ‘talking points’ – what is machine learning?

Ask students how else machine learning could be used

Extensions & Modifications

Encourage creating prediction models, or something they find useful. 

Links:

What is Machine Learning? – https://youtu.be/f_uwKZIAeM0

Mark Rober uses a phone to steal baseball signs – Up to 5:54 

  • Can also show neural networks from 8:14 – 10:05

Downloads

This website uses cookies to ensure you get the best user experience. By continuing to use this website, you consent to our use of cookies.
Accept