Math student’s machine learning research makes a splash Nathan Kohls just wanted to pay his rent without having to work at the campus IT desk. When he heard that students could receive funding from the Office of Undergraduate Research for helping faculty members conduct their research, he jumped at the chance. Now, his work has the potential to change the way scientists study water quality. “One of my math professors emailed me and said, hey, you do computer science stuff too, right? Want to get in on this project?” Kohls said. “And so here I am in biological pattern recognition.” Kohls, who is majoring in both mathematical sciences and computer science, works under mathematical sciences professor Peter Hinow. Together, they’re developing a tool to help biological sciences professor Rudy Strickler wade through the data collected in the course of his research. Strickler is working with high-speed video observations of animals and algae patches during predator-prey interactions in the water. Patterns in the water can be disrupted quickly as these organisms and the water itself move around. The Mathematical sciences and computer science major Nathan Kohls is using machine learning to videos generate thousands of frames during fast changes help researchers study water quality. Photo by Sarah Vickery. of distribution patterns. The black-and-white video would take countless hours to analyze, so Kohls was tasked with teaching a computer algorithm to recognize the patterns found in the video so it can identify the exact frame where changes take place. The algorithm sorts the images into two categories: Unexcited, where the image is static and no activity is happening, and excited, where the image grows dynamic and “jumps” and “wiggles,” as Kohls describes it. “I break the video down into individual frames and then I train this program to sort those images into what it should be,” Kohls explained. “At first, it’s super-ineffective. The algorithm doesn’t know anything.” So he has to teach it. He feeds the computer program image after image. The machine guesses which category the picture should be grouped in – unexcited or excited. It does so by looking for specific nuances in each frame, like the amount of pixels of a certain color or the presence of curving lines. As the machine learns which images it categorized correctly and incorrectly, it begins to learn the hallmarks of an unexcited or excited image. “It’s basically like spraying a cat with a water bottle. No. Bad algorithm. Shift whatever is happening inside of you around so that this picture is grouped with the ‘boring’ pictures,” Kohls said with a laugh. “And then you do that over and over and over again with a ton of different images. And at the end, it starts getting good classifications.” Of course, the algorithm can’t really “see” the images, and it can be hard to discern what parameters the program is working with. If it’s using too few or too narrow criterion, that could mean it will mis-categorize images in the future. It’s slow, detailed work, but Kohls said that the algorithm he’s helped to develop has the potential to help other researchers in the future. “The idea is that we can get a procedure going so that people can adapt this algorithm and transfer our idea over to other experiments easily,” he said. “With this, you would still need training data on the new data sets, but it’s going to be a lot easier for other people to use this to speed up their research.” Kohls says he’s just about finished teaching the algorithm how to categorize the images. The next step is to transfer the program to a computer in Strickler’s lab so that it can analyze video in real time. Kohls is also planning to present his work at the Office of Undergraduate Research Symposium later this month. By Sarah Vickery, College of Letters & Science 8 • IN FOCUS • April, 2019