Chris Yip 0:01 Welcome to Tell Me More: Coffee with Chris Yip, the official podcast of the Faculty of Applied Science and Engineering at the University of Toronto. Each month, I sit down with someone from our vibrant global community to talk about what places them at the heart of designing bold solutions for a better world. You'll meet students, professors and alumni who are making a difference across a range of fields, including some where you may not expect to find them. My guest today is Eric Khoury. Eric is a double alumnus of U of T engineering, having graduated from our Engineering Science program and from our Institute of Aerospace Studies [UTIAS]. He's then made a career pivot and the word pivot is a really good one to use here as well, taking his analytics prowess to the Toronto Raptors organization where he eventually joined the coaching team. In fact, earlier this year, he was named the head coach of Raptors 905, the Toronto Raptors' NBA G League affiliate, this makes him the youngest head coach in the team's history. Eric, welcome to the podcast. Eric Khoury 1:07 Thank you for having me. Excited to be here. Chris Yip 1:09 No, I'm looking forward to this conversation. This is going to be fun. I think we're going to hear today a little bit about taking chances and trying out some cool stuff. We're going to talk basketball for sure but first, we always sort of start this out a little bit with where you grew up and how did you figure out that engineering was for you? Eric Khoury 1:27 I grew up in Toronto, never really have left Toronto. So I grew up here, my parents moved to Toronto, in their mid 20s from Egypt and we're first generation here and I never really knew what I wanted to do. I always thought that engineering kept the most doors open so that's why I went into engineering. I thought it would give me a lot of good problem solving skills, skills that I can apply to multiple fields and that's that's what drew me to engineering science the most. The first two years obviously being general and you get to try on a bunch of different types of engineering courses, everything from mechanical engineering to focuses in bio, I think we had a relativity course back then as well. So you have to try everything and then after two years, I still didn't know what I wanted to do so I thought Aerospace kept the most doors open again and to me it kind of sounded the coolest anyway so I said, let's do that. And so went with Aerospace engineering and after that didn't feel like I was ready to start working just yet. And you know, aerospace engineering can be - there's a lot of theoretical stuff - I thought grad school might help me get a little more practical, get in the lab start working a little bit and that's kind of how I ended up at UTIAS doing fluid dynamics over there. So it's nothing I planned out, put it that way, but kind of stumbled into one step after another and that's how I got to grad school. Chris Yip 2:44 I love stories where it's sort of not quite sure what I want to do but I'm going to take advantage of all these opportunities. Our Engineering Science program is so broad, at the beginning you mentioned sort of, from quantum to biology to mechanical stuff, and then you sort of get to pivot into options in third year and so you picking Aerospace and so on. I probably taught you that, right? In engineering biology, probably. Eric Khoury 3:05 Yeah, certainly, I think that was my toughest course. My brother and my sister both ended up in medicine so I knew going into biology I should pay extra attention if I ever wanted to do what they were doing and that did not work out. Chris Yip 3:18 That's okay. It's all about learning and learning what you may not necessarily want to follow up on. Eric Khoury 3:23 Exactly, yeah. Chris Yip 3:24 Nothing to do with the instructor at all Eric Khoury 3:26 No, not in the slightest. Chris Yip 3:27 I mean, Aerospace is cool and it's one of our more popular options and UTIAS is an amazing place to do projects and it's an amazing resource for a lot of, even our listeners, even our own students didn't even know that we have this fourth campus in a sense, right? That's up in Dufferin-Steeles. Eric Khoury 3:45 Yeah, I've never been there until my first day of being at UTIAS! Because it's such an amazing canvas, like you're saying, and it's so much fun out there. I mean, like every lunch break, we would be playing a different sport, basketball or frisbee or football or soccer or whatever. So the campus is awesome and it's like its own little community where everybody gets along with everybody and the summer times up there were so much fun. Chris Yip 4:09 Yeah, so everybody's so used to being downtown campus and the campus life and then it's like, where's Aero? When you were taking undergrad courses I guess everybody came down to teach you downtown and then you realize there's this entire research center with arguably large - like big - equipment to do cool stuff related to Aero, right? And that leads me into my next question, which is, I think your project was in this kind of a little bit esoteric field, right? Computational Fluid Dynamics. Can you tell me a little bit more about that, what the application actually was? Eric Khoury 4:39 Yeah, I did more on the experimental side, like even within Professor Ekmekci's lab. I worked with the water channel a lot so like you said, there's lots of big labs up there. We needed the extra space obviously. So the lab I was working in had this massive water channel and you would put whatever model you were interested in the water channel. You would put these particles in that were the same buoyancy as water so the particles wouldn't mimic what the water would be doing. My models were mainly a cylinder, I would mainly put a cylinder in and look at different endplate configurations so we were trying to model a long infinite cylinder, but obviously, it's not an infinite water channel so you're trying to put in endplates in to get rid of as many three dimensionalities as possible. Chris Yip 5:20 You were talking about sort of infinite cylinders and endplates and particles going around it. Was there an end-use application for that? Eric Khoury 5:28 As the vortices are being shed behind, let's say a cylinder in this case, it oscillates back and forth, so it gets shut from one side, and then the other as the boundary layers are being shed and it can start to make an object wobble back and forth, it's kind of like if somebody was on a swing. If it's at the right frequency and you keep pushing, it's just going to amplify it back and forth, and back and forth and it can lose some of the structural integrity. So we're talking about a cylinder, but this could be say, like, you're digging for oil in the middle of the ocean and your pipes are going all the way down and as the waters flowing by due to currents or whatever it can start to oscillate back and forth. So that's why we were trying to figure out how to best model a infinite cylinder and then from there you might wrap wire around it in a certain way to break the way the filaments are being shed. And you see it in trees where in windy conditions, the trees will snap. Smokestacks were another example and that's just different examples of why we were trying to analyze that, what we were looking for with the particles. You would get your data in multiple ways. The way I mainly did it was using something called PIV, particle image velocimetry. You would light up a plane using - I think we had like a laser sheet is where we would call it, light up a plane and you'd have the cameras that were then tracking the particles and taking pictures of the particles as they move by the model. You're watching the particles go by and seeing how often the vortex filaments are being shed, and what angles and how they ever splitting, and so on. Take thousands and thousands of pictures, 25 times a second and get a whole bunch of data, either analyze it in a bunch of different ways and use that data, use your knowledge of the physics, and come up with more insights about which endplate configurations were the best at getting rid of three dimensionalities and how should you position them and watch the leading edge shapes should you have and so on and so forth. Chris Yip 7:12 Obviously in Aero, you're looking at everything from sort of how planes are flying, and things like that, and landing gear and all sorts of things like generating noise, and there's a whole aeroacoustics group up at UTIAS. So what point during your time in the lab and imaging this that did you realize there was a link? I mean, you talked about soccer and basketball being played at lunch of the UTIAS. Did you ever think that you would like...wait a sec, I could see an analogy here. Eric Khoury 7:39 Yeah, so as you would put the model in and you would take all those pictures, it would take a little bit of time, this is probably aging myself 10-15 years ago now. It wasn't automatic, like it would take a little bit of time to analyze all the data to spit out some velocity vectors and so on. So while I was waiting for all the images to process, I was just kind of perusing the web, looking at what's going on in sports and they talked about this new camera system that was going up in some of the NBA arenas. I think they started with six of the arenas, Toronto being one of them. they were putting three cameras on each half of the court up top in the rafters, and they were using the cameras to do player tracking. So seeing how the players in the ball move on the court, and it was 25 times a second as well. And I was like, hey, this sounds really similar. Particle tracking, player tracking. In one instance, you're using your knowledge of physics, one area using knowledge of basketball. Let me see if there's anything there so that's when I started to think like I wonder if I could do some similar tracking stuff in the NBA as opposed to doing it at the engineering level. And that's kind of when I started thinking about it. I was still say midway through writing up my thesis, so it wasn't anything concrete yet, but that's when that kind of seed was planted in my head of, "Maybe I won't go straight into engineering for the rest of my life. Let's see if I have some basketball in me first." Chris Yip 9:00 So let me cycle back a little bit. How long have you been a basketball fan? You were looking at it, obviously, in grad school as like something that to do in the background, but did this go all the way back? Eric Khoury 9:12 Oh, yeah, all the way back. My older brother is such a big basketball fan and my older cousins and stuff so I just copied whatever he did. And he loved it so I loved it. We play basketball in the driveway everyday kind of thing, me and my cousins and my brother and stuff like that. I think I peaked. I won MVP in under-10 and I don't think I won an MVP again after that. So I played all the way through high school, I was on my high school team, played intramurals, I was on the Engineering intramural team back at U of T, but I didn't play very high level or anything like that but I always loved the game. Practically I love any sport or any team, especially any team sport. It's so cool how you can't put a whole bunch of individuals together but the teams that win are teams that play together and play the right way and I always loved it. So it's a sport - I mean I was a huge Raptors fan before joining the team so definitely love basketball. Chris Yip 10:03 I think I was reading some of the background about how you got yourself connected with the Raptors. Give our listeners a little bit about how that transpired. Eric Khoury 10:11 Yeah, well, there's definitely no phone number to just call the Raptors and say, "Hey, I'm interested in working for you." You need to find someone to connect to so I was kind of stuck but luckily one of my good friends was following someone on Twitter, Alex Rucker, who was doing analytics for the Raptors at the time. He was a consultant. They had no one in house, they were using Keith and Alex as consultants. He said, he's pretty active on Twitter so maybe try and reach out through there. So I opened a Twitter account and started tweeting at him. First couple of tweets didn't get much of a response, but finally tweeted something that caught his attention and was able to get his email from there and we exchanged an email or two, emails turned into coffee, and then coffee turned into an internship and then internship turned into a full-time job. So you kind of have to make your own path sometimes and I mean, nowadays, it's pretty formal applications and all that jazz but luckily, when I was doing it, it was a little bit more informal. Chris Yip 11:04 And that's, I guess, early, right? In kind of the sports analytics framework, right? And sort of now it's just exploded. Eric Khoury 11:13 For sure. I mean, back then, there would be one or two people on some teams. Not even every team would have someone analytics related. So my timing was very fortunate to be getting in there. Now, I think about if I was trying to apply to an analytics position today, I might not be qualified. You know, it's gotten so intense. There are so many applicants trying to do so many amazing things and you have to be really niche. Back then I had, I mean, I guess player tracking and particle tracking is pretty niche but even by that standards, it's such a big organization now. Every team's got multiple people working on it, you have people who are focusing in so many different areas, and there's some really skilled people doing it. Definitely in basketball and when I talk to people in other sports, there's a lot of buy-in nowadays, people realize they're not just gonna live by it, but it's a really good extra tool to help understand the game better. Chris Yip 12:06 Yeah, so in the context of your use of it right now, is it more from the strategic perspective, sort of like, how do I lay up plays? How do I know where people are going to be? Or is it also from, and I guess, training as part of that to sort of how you do set plays, but there's there anything about sort of player behavior or reaction times and mapping it? Do you map the other players, I guess, your competitors, as well? Eric Khoury 12:30 For sure, there's lots of that. I would say, for our own self, there's a lot of use, but probably where it's strongest, a lot of it is the scouting aspect of it, like you were saying. So before we play the next opponent, we might get five or six of their games and we'll watch those games and kind of get a sense for their style of play and tendencies, both the team level and individual level. But I mean, with the data, the player tracking, you can watch all 82 or their games from the season and there's no way a human can watch that many games. It's not going to give you all the solutions, don't get me wrong, but if it can get you 90% of the way there and then now you're watching it, and you're saying, "Well, the data is saying this and my eyes are telling me the same thing. Okay, I trust it." Or when it differs, though, 10% of the time it differs, now you really dive in and you say, "Okay, was I being fooled because I've only watched a few games? Let me watch a little bit more," or is it, "Oh, you know what? The data might have been misinterpreting something here but this is what we're looking at." Actually in the other area where it's awesome is not necessarily on the coaching side, but also on the player acquisition side. So giving you a sense for which young players are taking a leap and studying the play better and which players might be a little overrated leaguewide and are not as interesting just because maybe they've been running hot for a little bit, but you can see in their underlying data that a lot of that might just be noise that's going to regress back to their normal play. Chris Yip 13:53 Cycle back to your particle tracking from the water, the particles are all the same effectively, right? They're all the same densities just moving around. But in this context, they are people so they're kind of like smart particles, in a sense, right? So you end up with, you know, who works well with who, right? So then does that become part of the analytics as well as like, this is the team I need to set up? Eric Khoury 14:14 For sure and that's, I would say, that's something that we've been working on a lot lately. That's a very difficult problem to solve. Right now, when we're always talking about evaluating players, it's trying to break it down to each person's individual contribution but for anybody who has played a sport knows that there's certain people/teammates that you play better when you're together and there's certain teammates that you just can't find that chemistry with. And at the end of the day, basketball is a five-man game so figuring out which lineups are the best, it's not always going to be the - I mean, we know for a fact it's not the best five individuals, there is some sort of overlay of having different positions together are better and so you'll see when you watch the Raptors playing now, there's a whole bunch of 6 foot 8, 6 foot 9 guys and we're saying it's okay to have a bunch of those guys but maybe if you played a whole bunch of guys who are five foot 10 it might not work and if you played a whole bunch of guys who were some 7 foot 2 together it might not work. So we're trying to find out which positions we want to really hammer home on and I think it's been helpful so far. Chris Yip 15:09 You can certainly say you don't want to answer this question, but how proprietary is this stuff? Because you've got film, I guess, or you've got systems that are out in arenas filming all this. That means all the other teams have it as well, how does one manage that? Eric Khoury 15:23 So every arena now in the NBA, and I believe in the G League next season too, is going to have the tracking. So you get the data from every arena. So if Atlanta is playing Chicago, in the middle of February, we're getting the data as well. Now what you do with it and what models you've built and what models you put in place that's on you. So there are companies that will do it for you. They might have 20 teams or so as paid subscribers and that's because they don't want to deal with the raw data themselves. We decided to do everything in house and I think part of that is, we started so early that we felt like early on, we had a head start, and then we're gonna keep it that way and anytime we wanted to look at something new or solve a new problem, we could go and write the code ourselves. Now, I would say there's probably a lot of overlap between what we do and what a lot of the companies out there do but still, we can customize it for ourselves. They really focus on the coaching side, and the coaching support so here's a pick and roll and here's the the players efficiency when he goes left versus when he goes right, so that kind of coaching stuff is really important but we focus a lot also on the management side, so the player acquisition and training plan, and more assigning credit and blame so okay, the team got a layup but how did we get the layup? Was it two passes removed that was kind of the reason that we we were able to create an advantage and assigning it throughout the possession? So it's not just going to be the end result, it's looking at, how did we get to that end result? So that stuff that we can really focus on that I don't think as much is done in the subscription services. Chris Yip 16:55 It's nice to - I think you said - in house it, right? Because you've got all the raw data, it's not filtered by the time you get it, and you have a little bit more control over it. This may be again a loaded question, but in the analytics space, how much of this is sort of left to automation in a sense, or AI sort of looking at stuff and machine intelligence going after it versus a coach looking at it themselves to say, "Okay, I think this is what I should be looking for." Eric Khoury 17:23 Yeah, the humans won't look at any of the raw data, that's for sure. So we'll, we'll put it through multiple layers. Early on, when I started, there was very little machine learning so if you saw the code that I was writing, it was unbelievable. My own logic that was ugly as could be. When I have to go back and kind of tweak something I said, "What was I doing here? This is chaos." A whole lot of spaghetti code. But yeah, lesson learned, comment your code well, put it that way. And whitespace is your friend, you don't need to write everything all in one line. So a lot of it was logic based. But we would then get it to a point where we could spit out some reports. And then my early job I was writing code, but then I was also writing analytical or data driven scouting reports for the coaching staff. So still, with that report, I would, I would have thousands of different data points for each player but I didn't want to just hand that over to the coaching staff because I don't need to say, "Oh, this player is averaging this doing this, and average doing that." Well it doesn't mean too much for them, right? They want the extremes, they want the outliers. So then I would sift through that and I would try and write a code that would kind of pick out the outliers but still, there was too many and I needed to have some basketball sense as well to realize what I can contribute to a coaching staff. So I would still then go through it. Having putting on my coaching hat as opposed to my analytics hat but knowing what's signal, knowing what's noise, having dealt with the data enough and then put together a report that might only have seven or eight bullet points for each player as opposed to hundreds or thousands of data points that we could have just spat out automatically. Chris Yip 18:53 Do you think that because the Raptors and because of your efforts, you're ahead, or how can you even tell? Eric Khoury 18:59 Yeah, it's so tough to tell. Like we know roughly what the data providers can give, because instead of just giving the raw data, they will analyze it for you but they do kind of a general thing for all the teams. So they've obviously pitched us trying to get us to jump on board and we recently hired somebody who is really high up there to join our analytics staff. So we have a good sense of what they're doing. Obviously, they're doing amazing things. They've got like teams of engineers working on it but for the Toronto Raptors, we would prefer obviously to have our stuff and their stuff just because it's more catered to us. It's using our terminology, the coaches know how to use it, and so on and so forth. And it's just stuff that we find interesting, we really delve deeper into. They probably have some stuff that we don't have and vice versa. We have stuff that they don't have. Their interface is definitely a little prettier. When you got a team of engineers versus a few people working on it, it tends to be that way but we figured out a way to make it work, that's for sure. So we're really happy with where we're at and definitely the guy who runs the department, Keith Boyarsky, he's got such a great vision for where it's going. And so he's been working on the right stuff for years and it kind of keeps us a step ahead, which is nice. He's been working a lot, I introduced him to a few of the professors at U of T. So he's been working with a couple of the professors at U of T to kind of take those next steps and he was really on top of the machine learning thing a few years back, knowing that with the amount of data we have, we can probably get more insights if we use that. So he's really been diving into that for a whole bunch of different really interesting areas, and just being able to work with them and the Vector Institute, it's really given us a leg up, I think. Chris Yip 20:39 Yeah, that's awesome. My next question, which was how do we get the Raptors 905 to collaborate, partner with Engineering? We've got a whole new data analytics research center, right? Including somebody who's very interested in sports science. And so how do we do more? Eric Khoury 20:57 Well, we worked with a PhD student a few years back as well. And Jackson, I used to play volleyball with - intramural volleyball as well - I think it was an the Engineering team as well. So he reached out, and we reconnected, which was awesome and he was able to help us out a bunch with some really cool stuff. It's such a nice data set and for anybody who's in data analytics realizes, there's a lot more work actually getting the data in a way that's usable than it should be. The whole, like designing models and all that is, it sounds fun, and it's the sexy part but in reality, you're spending most of your time kind of cleaning up the data and putting it in the form where you can actually do something with it. The tough part is, obviously PhD students want to publish, and we want to keep everything as top secret as possible. So it's, it kind of goes back and forth but we were able to find the right areas of, "Okay, you can publish this by leave this part," just to not give away the full competitive advantage. Chris Yip 21:52 Yeah, this is a multivariable data set and I will describe 4 of the 400 variables. The rest we'll leave for you to figure out what I'm monitoring. Eric Khoury 22:03 Right, exactly. That's a good way of putting it. Chris Yip 22:05 Of all the sports, which do you think is leading the fray, as it were, in terms of analytics? Eric Khoury 22:09 The easiest, not the easiest, they're all very difficult, but the one that's cleanest is baseball, just because there's so many demarcations that it's not as fluid. In basketball, all five guys are kind of impacting it at any one moment. Whether a player standing in the corner or standing five feet in from the corner, it's gonna affect the spacing, then the defense is going to play a different style, because they can pinch in a little bit more, and then they can rotate easier. So there's so many more variables in basketball. And then when you talk to football, it's the same idea of it breaks every feels like every two seconds, but probably a bit more than that in NFL. But now there's so many players on the court - or on the field, sorry. So that makes it a bit trickier too. And then I think soccer is probably the most difficult, soccer and hockey because it's so fluid like it almost never stops. So it's all about increasing your goal chances but I think baseball is the cleanest one to analyze and they're also the furthest ahead in terms of player development analytics, which is kind of the next step, I think for everyone. And then after that, I would think basketball is next. Chris Yip 23:08 Let me cycle back to the Raptors 905. So you're the youngest head coach in the history. How does that feel? Eric Khoury 23:15 It's definitely interesting. I mean, most people talk about age, and it goes hand in hand with experience but I've been kind of in the industry for 10 years now. So I've got some of the experience, even even if the age is young, I've been around with the team for a long time, there's not a lot of people who have been with the team longer than I have, put it that way. So it's cool. Age-wise, I'm more excited to use the experience I've gained over the years to really get to work and see what I can do. Chris Yip 23:42 It just like I said before, it's so amazing to see where people's fundamental training have taken them. I'm always struck when I'm talking to undergrads in second year trying to decide which option to go into, right? Even high school students saying well, "I want to go to engineering because I want to do this and this and this." And I always say, "You know, leave those options open. Undergrad in particular is all about kind of exploring different things." Taking part in stuff like you said, like volleyball, and basketball and doing all these other things while you're here. You've got to keep that that part of your life going as well because it's not all about problem sets and really bad engineering biology (laughing). Eric Khoury 24:23 It's so early to decide what you want to do and I it's tough because I know at some point you have to decide like out of high school. But like I said, I chose engineering science just because I thought it was the most doors open and having no idea what I wanted to do about taking the widest variety of courses would probably leave the most options open. So it's tricky, like you said, and I would say to anybody who's still uncertain, just don't close any doors, try and figure out a way to keep as many doors open. Chris Yip 24:51 Well, Eric, this has been such a fun conversation. It's so much fun to hear where our alumni have gone, how they've taken their their engineering training and I found a passion in a different space and really pursued it. This has been so terrific. Eric Khoury 25:07 Yeah, I think what I would say is get your skills from Engineering, get your problem solving ability and Engineering Science at U of T is so great for that. And then just try and look around the world and see how you can apply it to something you're passionate about. And if you can do that, then doors are just going to open. There's some fields like basketball that probably haven't had a bunch of U of T Engineering alumni in the past but if you can show that you can contribute and bring a new perspective and a cool perspective. And as long as you're helping making the team better or helping whatever your passion is better than then they'll probably be a door open for you. Chris Yip 25:40 Yeah, and thanks so much for being here today. Eric Khoury 25:42 My pleasure. Chris Yip 25:45 Thanks again for listening to Coffee with Chris Yip. If you want to catch up on past episodes, or make sure that you don't miss the next one, please subscribe. We're on Apple Podcasts, Spotify, and more. Just look for Coffee with Chris Yip. You can also check out @uoftengineering on Twitter, Facebook, Instagram and LinkedIn for more stories about how our community is building a better world. And finally, if you'd be inspired to join us we'd love to welcome you. Whether you're thinking of taking a degree or working with us on a research project, you can find us online at engineering.utoronto.ca or you can visit our beautiful campus in Toronto, Ontario, Canada. I hope I can join you for coffee soon.