Prototype Learning Lab

Email your completed assignment yourlastnameProt.doc along with your code lastnameProt.py to marctomlinson@mail.utexas.edu.

In this lab, you will build and explore a prototype category learning model. We will discuss what a prototype is in class. Basically, a prototype is the the average of the members of a category. For example, the prototype for the bird category is small, has wings, eats worms, and flies. Novel items can be classified by which prototype they are the most similar. For example, a random cow will be closer or more similar to the mammal prototype than the bird prototype.

This assignment should be easier than the last. We will try to walk you through the necessary functions to a greater degree. Before beginning the assignment, read this short paper.

1. Write a function that takes two lists as input and returns the euclidean distance between them.

2. Write a function that takes a list, the number of items that were averaged together to form that list, and a list to be incorporated into the average. Have the function return a new list that is the new average after incorporating the second list. For example, Question2([2,4,1],2,[5,4,1]) should return [3,4,1].

3. The function you wrote in question 2 is a prototype learning rule while the function you wrote in question 1 is the prototype activation rule (less distance means more activation). Using lists containing two elements, define 10 points centered around a prototype. Do not include the prototype in the list of ten points. You can think of the two elements as being psychological dimensions, like width and height. Make a plot of the 10 points and include the prototype. Any observations about how the prototype gets updated during learning? In particular, how does the sequence of training examples affect the prototype's location during learning and its final position at the end of learning. Would the unseen prototype or one of the original 10 experienced items be a better example of the category? Why?

4. Create two categories of 10 points each like that shown in Figure 2 of the above paper. Explore the behavior of the model for novel items lying between the two categories. How does the model handle these border cases? Include some results and at least one plot.

5. Create a category structure like that shown in Figure 3 with 10 points per category (5 points for each of the four subgroups) such that the prototypes of the two categories are identical. How does this model perform at classifying novel items? How about the points it has been trained on? What is going on? Please provide results and plots.

6. Come up with a way to address the problems experienced by the prototype model in question 5. I suggest forming a second prototype for the category when the current item is far away from the current prototype (i.e., categories can have multiple prototypes).

7. Explore some facet of prototype models on your own and tell us what you found.