It’s Within Reach of Anyone With Computer Science Fundamentals
Facebook can now recognize friends’ faces in pictures, and suggest who you should be tagging. Online stores offer often-accurate recommendations for products you might be interested in. How do they do that?!?! How does a driverless car “teach” itself to drive? How does a computer “learn” a language. And what is this “artificial intelligence” business everyone’s talking about?
All of these technological marvels are rooted in something called machine learning. And guess what - you can give yourselves the skills to build things with machine learning yourself. I’m actually working towards that with current student of mine, a high school sophomore.
Machine learning is rooted in two core concepts. The first is branches of mathematics that pertain to optimization, statistics, and uncertainty. The second is a few choice models of decision making that attempt to mimic human decision making and learning. Think of the whole thing as trying to build a computer version of a toddler’s mind. As an example, do babies immediately know what constitutes the properties of a lion? Not immediately, they don’t. If a baby has a stuffed animal lion, he or she might initially think that the word “lion” refers to all stuffed animals, anything soft and plush-filled and inanimate. Oops! But with more data and with corrections from his/her parents (a photo of a lion with “this is a lion,” a photo of a tiger with “this is not a lion - this is a tiger”), the child quickly learns to distinguish a lion and its features, probably beginning with the most obvious, the mane.
Of course, it can quickly get far more complicated and math-heavy. But what if you aren’t a mathematical savant? Don’t worry, many of the people who now work with machine learning have little math expertise beyond what’s taught in high school. The more important practical skills are those rooted in computer science and programming.
A concrete example might help to clarify. A fun example of machine learning is when computers learn to classify images - for instance, let’s say we want a computer to learn to tell us whether a photo we’ve taken contains a horse. To begin, we get a bunch of images, some with horses and some without. In the ones with horses, we mark roughly where the horses are. Python, a popular and easy-to-learn programming language, has a number of libraries (a library is like a set of tools) for (1) translating images into features (like basic shapes and line types) and (2) building a machine learning object called a classifier that contains definitions for what would constitute a horse. With enough data (i.e. input images), the program model will eventually learn that certain shapes in certain arrangements (grossly oversimplified: 4 sets of rectangles connected with knobs, i.e. legs + curved lines in a fan-out pattern i.e. tail + curved lines along the edge of a trapezoid, i.e. mane) constitute a horse. Our model will be dependent on the quality of our data. If we feed the model images of horses only from the side, the model will become adept at recognizing horses from the side but perhaps not from in front. If we feed the model only images of brown horses, the model may struggle to classify a white horse.
In another example, consider how a product like Netflix makes recommendations. Netflix was famous some years ago on college campuses (well, really, the computer science departments of these campuses) for its Netflix Challenge, in which they offered million-dollar prizes to anyone who could best the accuracy of their recommendation engines. How does a recommendation engine work? In the simplest form, Netflix uses data it has on what films were viewed by the same customers in order to construct what are called “relationship matrices” and also various grouping models of films that are considered similar somehow. The models have no prior idea that a film is characterized as a comedy/horror/drama/etc - the groupings are based entirely on customer behavior. Similarly to the horse-identification example above, an at-home tinkerer can now use Python libraries to build a base version of this. An important note here is that the real determinant of the quality of such a model these days is less the mathematics behind the correlation models themselves (these become fairly standardized and open-sourced a few years after first being developed) and much more so the data used as input. Whoever has a better starting dataset (more complete data across a variety of customer and genre segments) will have a better correlation model. To paraphrase a number of New York Times and Wall Street Journal articles on the subject, in the 21st century data is power.
Image classification and correlation models are but two (widely employed) examples of machine learning. So many people in vastly different sectors - from analysts trying to segment their company’s user base to engineers building robotic personal assistants - are employing the power of machine learning. It’s is becoming dramatically more important every day, and it’s also becoming more and more accessible. Google, Facebook, Microsoft, and Amazon have all open-sourced large portions of their AI codebases and have also made their custom-built AI computing resources (for advanced applications) fairly accessible. You can learn to employ machine learning as well. Really, you can. All that’s required is some computer science and coding fundamentals!
-Sami Y, Instructor