You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E." -- Tom Mitchell (1998): Machine Learning book.
Example: classifying images of dogs and cats.
E = Watching you classify images as dogs or cats.
T = Classifying images as dogs or cats.
P = The % of images correctly classified.
Classification and Regression
Classification and regression both involve making a "prediction" based on input data.
Classification refers to predicting an output with a discrete set of possibilities like a set of categories or labels. For example: "Given an input image, is it a dog or cat?"
Regression refers to predicting an "continuous" output (a fancy way of saying number). For example: "Given the number of bedrooms, what is the price of a house?" or "Given an input image of a cat, how much does the cat weigh?"
Explore ImageNet. What surprises you about this data set? What questions do you have? Thinking back to last week’s assignment, can you think of any ethical considerations around how this data was collected Are there privacy considerations with the data?
Using the ml5.js examples above, try running image classification on a variety of images. Pick at least 10 objects in your room. How many of these does it recognize? What other aspects of the image affect the classification, including but not limited to position, scale, lighting, etc.
Document your thoughts on MobileNet and image classification in a blog post and add a link to the Assignment 2A Wiki.
Session B: Transfer learning
Objectives:
Diagram and define the layers of a neural network, introducing the concept of a “convolutional layer.”
Distinguish between a “feature vector” (aka logits) and the last layer (aka softmax probabilities) of a classification network.
From Andrew Ng: "In supervised learning, we are given a data set and already know what our correct output should look like, having the idea that there is a relationship between the input and the output."
Adapted from Nature of Code Chapter 10: Supervised Learning is a strategy that involves a "teacher" that trains the learning system. For example, consider facial recognition. The "teacher" shows the network a bunch of faces (the teacher already knows the names associated with each face). The learning system makes its guesses and the teacher provides the answers. The learning system can then compare its answers to the known “correct” ones and make adjustments according to its errors.
Train your own image classifer using transfer learning and ml5.js and apply the model to an interactive p5.js sketch. You can train the model with Teachable Machine (see links provided over e-mail) or with your own ml5.js code. Feel free to try sound instead of or in addition to images. You may also choose to experiment with a "regression" rather than classification.
Document your exercise in a blog post and add a link to the post and your p5 sketch on the Assignment 2B Wiki. In your blog post, include visual documentation such as a recorded screen capture / video of your training session and sketch running in the browser.