Machine Learning and Neural Networks for High School Students

I hope this question is appropriate for this forum.

In this summer I am giving a 3-day workshop on machine learning and neural networks for advanced and very enthusiastic high school students which all know at least one programming language.

Typically a day consists of 2 hours lecture in the morning and later the students should solve a given problem (with help, of course).

For the first day we are going to sove a simple pixel counting problem in a picture (Or do you know any simpler interesting example)

For the second and third day I wanted to give them a more challenging problem: Consider the set of binary $$3\times 3$$ matrices. One can imagine every matrix as a chessboard like picture where every $$1$$ corresponds to a black field and every $$0$$ to a white field. The objective is to count the connected components.

I allready produced the matrices and computed a neural network. It seems to work (training set 50%), however I am not an expert in machine learning so my solution is most likely not good!

So my questions are:

Has anybody allready computed a neural network for the problem above and is willing to share his data?

Do you know similiar problems accessible for high school students which are better suited for this occasion?

• These are two very separate questions. (Also, why use a neural network for this?) – Raphael Aug 5 '14 at 11:55
• I just want to illustrate how neural networks can work and how thy can be trained. However, if you have a better example I would be happy to hear about it – Oliver Straser Aug 5 '14 at 12:20
• I don't. However, if you want to create/extend curiosity and enthusiasm in kids, using an example that can clearly be solved in a much simpler way strikes me as a bad strategy. Just saying. – Raphael Aug 5 '14 at 14:34
• the connected component counting is much better done with an algorithm, right? doesnt seem like a ML problem at heart to me. – vzn Aug 5 '14 at 14:57
• I think going with something like matching an image to a color is a good one. Simple enough to fit into one layer of neural network. – InformedA Aug 5 '14 at 18:44

For high school kids, I think the most important goal is to make sure they're impressed by what they've accomplished. To do that the task needs to be inherently useful. Classic things like the XOR problem or pixel counting aren't going to do the trick, because you're relying on the students to connect the dots and realize that this means you can build it into something cool. You need them to build a system

• that does something cool,
• which can't easily be accomplished with a handbuilt algorithm,
• that seems to behave intelligently.

A few ideas:

• Make an environment where agents play a game. Something like tic-tac-toe or rock-paper-scissors is probably best. At the end of the course, you can let the agents that the students have made battle each other in a tournament.
• Create a simple a-life environment with 2D creatures with simple sensors and joints. Let students create the neural network for the creatures, so they learn to walk. You can also let them evolve the network topology when creatures mate.
• A car driver. Again, this is best with an artificial environment, but you can probably get a dataset somewhere too. This is an example from Tom Mitchell's machine learning where they did this with an actual car and a human driver for the network to learn from.

For the second question, I think it is interesting to do some work on face recognition from Tom Mitchell's Machine Learning. (There are available code framework and image data for downloading)

The dataset is small and you don't need to do much code work except parameter tuning. You can even train variant networks for expression, pose, user and eyes classification. I tried to classify users with this framework and it produced a very accuracy result. So you can have a try!

NNs are fairly complicated to understand. Your class might be better off starting with a simpler ML algorithm, like a Monte Carlo simulation of a genetic algorithm. Virtually any optimization problem is suitable for a genetic algorithm. Genetic algorithms work by combining a large set of possible solutions in random ways to find good solutions, so there's no math or feedback functions, very easy to understand what it's doing and how it works.

An example problem might be training a tic-tac-toe playing AI. In that case, the genome would represent the tic-tac-toe board and the desired move. "Players" compete directly against each other in successive generations. Losers don't get to breed. Winners breed the next generation of players.

It should be relatively easy to get convergence and demonstrate that generation 0 is terrible while generation 1 million is nearly optimal.

here is one classic ML question that is easy to understand and interpret, the so-called "two spiral separation" problem and lends itself to many different approaches eg NNs as one of the early approaches. two separate intertwined spirals are given in 2d and the classification task is: given an (x, y) pair, determine which spiral it belongs to. this paper can serve as a moderately recent survey.

How about teaching them how to create a Neural Network model for computer viruses. Find sample computer viruses of a particular file type (pdf, exe, etc.), as well as benign uninfected files of the file type. Train the models, and now you can determine with some level of confidence if a file is infected with a computer virus or not.

Being a high school student, I had the exact same problem at one point in time - however, through guidance from older peers, I managed to gain a solid understanding.

To rectify this issue, I decided to compile a learning path for high school students: kjaisingh/high-school-guide-to-machine-learning

Do let me know if you have any questions or suggestions to this, and best of luck!

• Welcome to CS.SE! I don't quite understand this answer. Is that supposed to be a link to an external resource? First, the link didn't seem to come through. Second, more importantly, we discourage link-only answers. We don't want to be just a collection of links to external resources; we want questions to have useful content that stands on their own. Also, if the link stops working, we want the answer to remain useful. Can you edit your answer to summarize your suggestions here, making sure to answer the question that was asked? Thanks! – D.W. Feb 18 '18 at 6:23