Latest / Talk Python To Me / #135: Capturing human moments with AI and Python
Transcript
- 0:00We all have smartphones these days, and we take them with us everywhere we go.
- 0:03How much could you infer about a person, their stage in life, their driving style,
- 0:08their work-life balance, based on just a phone's motion and GPS data?
- 0:13With the right mix of analytics and machine learning, it turns out you can learn a lot
- 0:17about a person. Are they a dog-owning workaholic or an early rising parent of young children?
- 0:23This week you'll meet Vincent Spert, who is the chief data scientist at Sentience,
- 0:28a company building an SDK to answer these exact questions. You'll learn how they're using Python
- 0:34to make this happen and how they think this data could be used for the greater good.
- 0:37This is Talk Python To Me, episode 135, recorded October 25, 2017.
- 0:56Welcome to Talk Python To Me, a weekly podcast on Python, the language, the libraries, the
- 1:02ecosystem, and the personalities. This is your host, Michael Kennedy. Follow me on Twitter,
- 1:07where I'm @mkennedy. Keep up with the show and listen to past episodes at talkpython.fm,
- 1:12and follow the show on Twitter via at Talk Python. This episode is brought to you by Datadog and
- 1:18GoCD. Please check out what they're offering during their segments. It really helps support
- 1:21the show. Vincent, welcome to Talk Python.
- 1:24Thank you.
- 1:24It's great to have you here. You guys have a super cool platform. You're doing some seriously
- 1:29deep learning and AI and machine learning, and I think everyone's going to get a pretty cool look
- 1:35at what you guys are doing and how you're doing it. There's a bunch of cool algorithms going on here.
- 1:39But before we get into all that detail, let's talk about how you got into programming and Python,
- 1:44things like that.
- 1:45Yeah, sure. Cool. It started when I was about 14, and I started hacking around with some web design.
- 1:50Remember those days where everyone used those marquee banners? There was no CSS and stuff like
- 1:55that.
- 1:56Like the blink tag. Yeah, yeah, that was wonderful. Those were good days.
- 1:58Exactly. So over the years, I went more into network security and hacking, started a company
- 2:03when I was around 18, and converted more to languages like Java and C++ throughout my PhD.
- 2:09What was the company you started when you were 18?
- 2:11It was a network security company, so quite different from what I'm doing today. It was
- 2:14a lot about the... You know, back then, the internet was more or less the Wild West. Everything
- 2:20was wide open, so interesting times.
- 2:22Yeah, I remember back then that things like Windows XP was the most popular operating system,
- 2:28and it had no firewall at all.
- 2:31Yeah, yeah, exactly.
- 2:32Right?
- 2:32Exactly.
- 2:33Exactly.
- 2:33No, it was right on the internet. It was really bad. Yeah, cool. Okay, so yeah, those were interesting
- 2:38Wild West days for sure. And then you said you moved on to...
- 2:41C++ and Java?
- 2:42Yeah, so during my PhD, I was mostly working on computer vision, machine learning, so that
- 2:48was heavily focused on real-time processing, so most of the work was done in C++. And then
- 2:54I joined Sentience about three years ago to start out a data science team. So back then, Sentience
- 2:59was quite small. I think we were with five people. And we had to choose a main programming language
- 3:04for the machine learning stuff, the data science part. And so I guess, coming a bit from an academic
- 3:09background, I was looking for a language that both had the ease of use as that MATLAB or
- 3:15R has. But on the other hand, also is a language that allows us to go to production and build
- 3:21scalable systems. That's how we came up with Python. And so since then, Python has been
- 3:25my go-to.
- 3:26Yeah, that's really great. Three years ago, I think it was probably on the border of whether
- 3:30Python was going to be one of the really dominant machine learning languages. I mean, now it's
- 3:37like really a clear choice. But three years ago, it was just starting to be a clear choice,
- 3:42right? What other things did you consider? And why, in the end, did you choose Python?
- 3:46The thing is that obviously you don't want to use MATLAB in a production system. So then I guess the
- 3:53choice was whether or not we would want to use a programming language like Java for the data science
- 3:59work. And there has been some discussion around that because the data engineering team here at
- 4:04Sentience does most of the stuff in Java, you know, making sure everything is scalable, all the
- 4:09infrastructure stuff is Java. But for us, we noticed that although we love Java, doing rapid prototyping,
- 4:16quickly coming up and testing your models, it's just much easier in Python. And actually,
- 4:20although there is a lot of discussion on whether or not Python is a production-friendly language,
- 4:25if you look at, for example, YouTube, they also use mainly Python for their whole platform. So
- 4:30it's quite powerful.
- 4:31Yeah, it's incredibly powerful. You look at some of the people or some of the companies doing
- 4:36really interesting things. YouTube is a great example. YouTube handles like a million requests per
- 4:41second. So that's a pretty insane level of web traffic right there. And yeah, there's some other
- 4:48really cool use cases like that as well. So I guess the main takeaway is sort of the combination of
- 4:55it's quick and easy, but also you can go fully to production, like all the way to like real scalable
- 5:01levels of running and production, right?
- 5:04Yeah, indeed. And of course, the machine learning communities is, these days is growing. And I mean,
- 5:09the amount of libraries and support you have for machine learning in Python is just huge compared to
- 5:14almost any other language.
- 5:15Yeah, absolutely. So what do you do at Sentience now?
- 5:18So I'm the chief data scientist at Sentience. So basically, my job is mostly focused on the research
- 5:24part and on building the algorithms together with the team, of course. So Sentience is an AI company
- 5:30first. So we are currently with about 50 people, and about 40 of them are actually technical, half of
- 5:36them data engineering, and half of them data science. And with data science, we mostly mean, you know,
- 5:41machine learning, signal processing, building the actual algorithms there.
- 5:45Okay, that sounds, that sounds pretty awesome, like a pretty fun job to be part of, I'm sure.
- 5:50So I guess, you know, probably a lot of the listeners don't know about Sentience, maybe give us
- 5:55like a high level idea of what you guys do. I mean, you have this specific SDK that people can plug into
- 6:03their mobile apps. And then you look at the behaviors and stuff. Tell us what the big idea is.
- 6:10Well, the idea is that these days, I mean, everyone has a smartphone, to that extent that the
- 6:15smartphone is almost like an extension of your body, you continuously use it. And every smartphone
- 6:20is packed with sensors, you have accelerometer sensors measuring every small vibration of the
- 6:24phone, you have the gyroscope, of course, you have the location subsystem. So what we do is we have an
- 6:29SDK that plugs in into the app of our customers, which are companies. And once the SDK is in the app,
- 6:34we start logging all that sensor data, accelerometer, gyroscope, location, we send that to our backend,
- 6:38running on Amazon Cloud. And there we have a bunch of machine learning algorithms that extract behavioral
- 6:43intelligence from it. So we learn about your behavior. What is your home? What is your work
- 6:46location? What do you do every day? Why do you do it? Can we predict your future behavior, etc?
- 6:50Wow. Okay. So I totally agree that, you know, it's a crazy world where we always have our phones with us.
- 6:59Like I would rather accidentally leave my keys at home and leave my house unlocked and leave my house
- 7:04without my phone. You know what I mean?
- 7:06So if you can take this information about what people are doing just ambiently, I do more with it. That sounds
- 7:12pretty cool. So you take all the sensor data, orientation, accelerometer, location, things like
- 7:19that. And you say you extract intelligence from it. So I watched there's a video on your homepage,
- 7:25I'll link to it in the show notes where you have these different layers, right? Like one layer comes in and
- 7:31just takes in this ambient deformation. One tries to understand what you're doing. And then the other,
- 7:39what's the final one to try to create like these moments or something? Tell us about that.
- 7:43We start with a low level sensor data. And based on that, we do what we call event detection. So we
- 7:49have a whole bunch of classifiers that take in the sensor data and for example, try to classify your mode
- 7:55of transport. Based on the vibrations of the phone, you can figure out is this person walking,
- 7:59biking in a train, on a subway, in a car, or for example, given your location, your current location,
- 8:05we want to figure out where are you? I mean, are you visiting the bus stop that is five meters from
- 8:10your location? Or maybe if you're there in the middle of the night for five hours in a row,
- 8:14you're not visiting the bus stop, you're actually in the bar that is like 50 meters further, right?
- 8:18And so we end up with this whole timeline of human behavior. But of course, then you know what the
- 8:22user is doing, but not why he's doing it. So we feed this event timeline into our deep learning
- 8:28based prediction model, we can predict what you're going to do next. And that allows us to explain why
- 8:32you're doing something, you know, is this are you in a car because it's your commute or because it's
- 8:36your shopping routine? Is this a business trip? Is it a leisure trip, etc. And then finally, indeed, we
- 8:41aggregate all that data, all those timelines over weeks. So we can come up with with more like a profile.
- 8:47Are you a shopaholic, a workaholic? Are you an aggressive driver? Do you have children? And that data we then
- 8:52expose back to our customers.
- 8:53That's pretty wild. It sounds really challenging, because like you said, there could be a bar and
- 8:58then right outside the bar could be, you could be sitting like right in the front, you know, with
- 9:03like maybe on a beautiful day, like the windows are open or something. And then right next to that is a
- 9:07bus stop. And so determining whether you're trying to go on the bus, or you're trying to relax after
- 9:13work. That sounds like a real interesting challenge.
- 9:15Yeah, exactly. Even more, I mean, you can be in a bar because you work there, you can be in a bar because
- 9:20you just like to go for a drink, you can be there because you live in the apartment on top of it. So
- 9:24trying to figure out why a user is doing something is pretty cool.
- 9:28Yeah, that's definitely taking it to another level. So what is your day to day look like? Do you do a
- 9:36lot of research? What kind of tools do you do to come up with some of these models? Do you write
- 9:40production code? What are you doing?
- 9:42It's a mix of both research and actually writing production code indeed. So most, most of the time when we start
- 9:47on a project, there is a research phase. I mean, there's a lot of reading papers, experimenting, usually just in
- 9:52iPad and notebooks, you create your models, you validate them. But then at some point, indeed, we have to convert
- 9:58this code into something that is production ready. So then it actually comes or boils down to cleaning up the code,
- 10:04creating a nice object oriented framework. Do you need testing, regression testing, you know, performance profiling,
- 10:10make sure that everything is scalable, and then encapsulate it into an API so that we can deploy
- 10:16this as a microservice. And finally, try to get a microservice running in a Docker image. And that is
- 10:22actually then when the data engineering team comes in. So the data engineers take this Docker image,
- 10:26refine it, basically, they built a base Docker image. So we just customize it a little bit for our specific
- 10:31projects. And they help us to make sure that we can deploy it in a scalable manner.
- 10:35That's cool. And do you guys deploy it to your own system? Or do you deploy,
- 10:38I forgot what AWS is container service is called? But do you deploy it to the container service? Or do
- 10:44you have more control over where it lives and runs?
- 10:46It's our own system. So we try, I mean, we love AWS, but we try to be not too dependent on their
- 10:53specific services, mainly because we need to be able to move to different cloud infrastructures if needed.
- 10:58Isn't that an interesting struggle? Like, there's so many features and AWS and Azure, those are the two that
- 11:05have like, a ridiculous number of things that the cloud can do. But the more that you like, put those
- 11:12hooks into your system and those dependencies, like the more you're locked in, I mean, people used to talk
- 11:18about lock in like with Windows or with Mac or with iOS or whatever. But like, the cloud lock in is a whole
- 11:23another level if you go all in, right? Yeah, exactly. And of course, that's their business model. I mean,
- 11:27they try to get you to use those specific services.
- 11:31Yeah. Yeah, that's cool. Okay, so go with your own container service. That makes a lot of sense.
- 11:37And for the tooling for R&D stuff, this is like IPv3 notebooks. And what are the notable packages and
- 11:45libraries using there? It depends on the project, I guess. Obviously, we just use a lot of typical
- 11:50libraries like scikit-learn for most of the modeling. When we talk about deep learning,
- 11:54it's usually TensorFlow and some Keras. For performance and memory profiling, we create
- 12:00things like flame graphs. For unit testing, we use a pytest or nosetest. Yeah, nice. Are you using
- 12:05like GPU clusters in AWS or is this pure CPU-based? For deployment at inference time, it's usually CPU-based.
- 12:13For research, I mean, like training the models, we indeed use GPU machines because it can take a few
- 12:18weeks before a model is trained. So that really speeds it up. Yeah. And how fast is it if you use
- 12:23GPUs? Also weeks. And if it's not GPUs, it's even worse. Yeah, exactly. So the last model I trained a
- 12:28few weeks ago, I started using, I started out using an AWS machine that was just a CPU machine with 36
- 12:35cores. And eventually, I moved to a GPU machine where I trained about two weeks. And the training there,
- 12:42I mean, the loss went down about 10 times as fast as when I was using the CPU machines.
- 12:46Wow, that's really awesome. Yeah. And for performance and stuff, you just get that
- 12:51basically dialed in, I guess. There's two parts, right? There's training and then there's answering
- 12:56the question, the inference bits. How do you sort of balance those things? Like obviously,
- 13:00you're just going to train as much data as you need. But then what do you do for performance at
- 13:06that point? I mean, once you have the model built and you kind of have the library, you're using
- 13:10TensorFlow or whatever, you kind of like how much flexibility do you have to make it go faster?
- 13:14Well, that's a good question. And usually, it's really just trying to balance performance and
- 13:20cost, I guess. I mean, you can have a model with 3 million parameters and have a gain of 1% in
- 13:26accuracy compared to a model with 300,000 parameters, right? While the latter, of course, is much cheaper
- 13:31to be used in production. So a lot of the time, it's just balancing out those two.
- 13:36Okay, that's interesting. Do you sometimes build like super detailed models in the research phase and go,
- 13:42I think we can take it down to 100,000 or whatever levels and then run that in production and get good
- 13:49enough answers? Yeah, we do. Especially, of course, if you, some of our models started out on the cloud,
- 13:54and then at some point, we realized, you know, we could actually deploy those on the mobile phone
- 13:59itself. So then it's very important to reduce the number of parameters as much as possible without
- 14:03losing too much accuracy. So yeah, that's really cool. And that's definitely a trend in the space to
- 14:09not have these tremendously powerful cloud infrastructures, but to push it to the edge, right?
- 14:14To the devices.
- 14:15Yeah, indeed, indeed. It's especially with, you know, Apple in the new iPhone has this X11 chip that is like a
- 14:23dedicated coprocessor for these kind of things. And at the same time, Google with the Pixel 2, they have this
- 14:28separate chip specifically for like image processing, computer vision. So more and more phones will have
- 14:34coprocessors that allow us to do edge computing without draining the battery too much.
- 14:38Yeah, that's more or less like running on GPUs, right? Like these specialized hardware are way more efficient and
- 14:44quick. So more reasonable to run it on these wimpy devices.
- 14:47Exactly.
- 14:47Yeah, yeah. Cool. So you said that you guys were about 50 people. What is the and if I remember the breakdown, right?
- 14:5420 or so data scientists, 20 or so sort of data software website of things.
- 15:01What's the team structure? Like how do you guys work together and things like that?
- 15:05We have a model that is that is like loosely based on the Spotify model. They work with a or we work in a kind of a
- 15:10matrix structure where horizontally, we have a set of functional teams. So there is a data science team, there is a data
- 15:15engineering team, then there is a mobile SDK team, and then there is a solutions team. But we quickly realized as those
- 15:21teams grow bigger and bigger, that it's very difficult to isolate. You don't want to want to be isolated in your team, you want
- 15:27to work together with people from different backgrounds. So that's why vertically over those
- 15:32teams, we define cross functional teams that we call squads. So cross functional team has a quite a
- 15:37specific focus, it's kind of a of a mini startup. And it consists of a few data scientists, few data
- 15:43engineers, few mobile guys, they build stuff from from concept to actually build, bringing it into
- 15:48production.
- 15:49That sounds really like a cool way to work, actually. So there's some new major feature or new
- 15:56library you guys want to build and you put together these cross functional teams to build it, huh?
- 16:00Yeah, and usually cross those cross functional teams or those squads are long lift. So it's not like they
- 16:05are created and then and then disbanded quickly, because of course, we continuously try to improve
- 16:11our products. So we have like a mob sense, what we call a mob sense squad, the squad that focuses on
- 16:15everything around signal processing, and you know, the deep learning directly on the sensor data,
- 16:19then we have like a lifestyle squad that focuses more on the moments in the segments. So there we use more
- 16:23like NLP related techniques. And of course, we try to move people around. I mean, you don't stay in a
- 16:29single squad forever.
- 16:29Of course. That sounds really cool. So let's dig into the three layers of your SDK, the event
- 16:36acquisition, the moments and segments, you call them, right? So there's some pretty interesting
- 16:42algorithms and libraries you're using. So the first level is this idea of events. And the basic
- 16:50question you're trying to answer is what is the user doing? So maybe we could talk about some of the
- 16:55some of the algorithms and techniques you're using to determine like, are they driving? Are they walking?
- 17:00Are they at a bar? Whatever.
- 17:02Yeah, yeah, cool. Well, so transport mode detection itself is a is a cool problem. You know, both both
- 17:08iOS and Android already have what what they call motion activities. So they give you an idea already about
- 17:13transport mode, but it's quite limited. I think they support walking, biking, vehicle and idle,
- 17:19something like that. Also, the occurrences are quite low, usually. So indeed, we had to build our
- 17:23own model to get better occurrences, and especially to extend the number of transports we support like
- 17:28bus and subway and running and stuff like that.
- 17:31Sure. Can you still leverage these like motion chips at a lower level and not just ask like,
- 17:37what are they doing? But you know, give me the actual measurements that you were going to use to
- 17:41make that assessment?
- 17:42Currently, we get 25 hertz accelerometer and gyroscope data from the phone. And based on that data,
- 17:47well, first, of course, there is some pre processing, some signal processing, you have
- 17:50to interpolate the samples because they don't come in on a regular on a regular grid, let's say,
- 17:56you have to do some bandpass filtering to remove the high frequency components that usually contain
- 18:01a lot of noise. And then after that, when you have like a signal that is more or less clean,
- 18:05what we do then is a lot of data augmentation, we add some noise, you know, additive noise,
- 18:09multiplicative noise. And that is mainly because every phone has different noise characteristics. And we
- 18:14don't want our machine learning models to learn to recognize specific phones. So to undo those noise
- 18:20characteristics, we basically deliberately add noise to our data, so that the classifiers learn to
- 18:25generalize. And what we then do is we feed that sensor data. Well, maybe it's interesting to have a look at
- 18:31the evolution. So today we use a neural net, a conf net, but we started out in a completely different
- 18:35way. In the beginning, we actually chopped our sensor stream into pieces of several seconds. Those pieces for
- 18:41those pieces of or segments of sensor data, we did a lot of manual feature engineering, like some Fourier
- 18:46coefficients, like frequency domain features, time domain features. Those were fed into a random forest
- 18:52back then. And the random forest then outputs class probabilities.
- 18:54Maybe quickly define what a random forest is for people.
- 18:57Yeah, yeah. So random forest is basically an ensemble of decision trees. So you can,
- 19:02one of the most simple classifiers is a decision tree where it's just like a binary search tree where
- 19:07you say, okay, if this feature is higher than a certain value, go to the left node, otherwise go
- 19:12to the right node, and you go through the whole tree until you have a decision on what is the transport
- 19:16mode. Problem is that decision tree is not very powerful. It quickly overfits to your data. So what
- 19:21you can do is just build, you know, a thousand decision trees, all a little bit different, all on
- 19:26different subsets of your data and your features, and then you end up with a random forest. So it's kind of
- 19:31averaging out all those predictions.
- 19:33Right. So it kind of somewhat combats against the overfitting problem you would run into.
- 19:37Exactly. Exactly.
- 19:38Okay.
- 19:39The thing, of course, is by chopping up the sensor stream into pieces of several seconds,
- 19:43you completely lose the temporal dependencies. It could be that one piece is correctly classified
- 19:48as car, and the next piece maybe is incorrectly classified as walking. So you still want to do some
- 19:53temporal smoothing. So what we did back then is we fed that information, those segments,
- 19:57or actually the class probabilities, into a hidden Markov model. And a hidden Markov model,
- 20:01is able to learn short-term temporal dependencies and kind of smooth out the end results. So that
- 20:06was our first version of the transport classifier. And then over the past three years, we went through
- 20:11several iterations. So the Renov Forest was replaced by boosted trees, XGBoost, which is used a lot,
- 20:16for example, these days in the Kaggle competitions you read about. And now recently, we figured out that
- 20:22actually just using a convolutional neural net with one-dimensional convolutions, because of course you don't have
- 20:28images. It allows us to not only get an improved accuracy, but also come up with much smaller models
- 20:34that more easily feed in memory compared to this huge random forest.
- 20:37Okay. Yeah, that sounds really interesting. Thanks for sharing the evolution. I think that's pretty cool.
- 20:42And so you've got all these events. Okay. Users driving, users at work, users walking, users at restaurant, users walking, users at work, things like that.
- 20:54And then you try to create what you guys call moments, which is why are they doing this? Like, why are they walking? Oh, they're walking to lunch, things like that, right? So maybe talk about the analysis that you guys do there.
- 21:05Well, similarly, there was an evolution on that level too. So the main idea is that if you can predict what users will be doing next, you can use that indeed to explain why he's doing what he's doing. So if, for example, the user is predicted to go to work, then the fact that he's in a car means he's in a commute.
- 21:21While if he's predicted to go to a shop, the fact that he's in a car means he's probably in a shopping routine, right?
- 21:26So the first step is to teach a model to be able to predict your next event. And there we started out with a Markov Chain-like approach.
- 21:33Markov Chain basically just tries to learn transition probabilities. It just learns a distribution over, learns to predict the probability of your next event being event A, given your previous events.
- 21:47So it learns very short-term dependencies. We quickly saw, though, that those short-term dependencies were not able to model complex human behavior.
- 21:55So it worked in simple cases, like, especially if you include features like time and day, it worked in simple cases like going to work and going back home.
- 22:03But what if suddenly, you know, you wake up an hour later than normally and your whole day shifts a little bit,
- 22:09then suddenly the Markov Chain model completely kind of blacks out.
- 22:12Hey, everyone. This is Michael. Let me tell you about Datadog. They're sponsoring this episode.
- 22:17Performance and bottlenecks don't exist just in your application code.
- 22:21Modern applications are systems built upon systems.
- 22:24And Datadog lets you view the system as a whole.
- 22:27Let's say you have a Python web app running Flask.
- 22:29It's built upon MongoDB and hosted and scaled out on a set of Ubuntu servers running Nginx and Microwisgi.
- 22:35Add Datadog and you can view and monitor and even get alerts across all of these systems.
- 22:40Datadog has a great getting started tutorial that takes just a few moments.
- 22:44And if you complete it, they'll send you a sweet Datadog t-shirt for free.
- 22:47Don't hesitate. Visit talkpython.fm/Datadog and see what you've been missing.
- 22:52That's talkpython.fm/Datadog.
- 22:56What we use today there is, again, deep learning.
- 22:59We use an LSTM.
- 23:00What's an LSTM? Long, short-term memory?
- 23:03Yeah, exactly. Exactly.
- 23:04So an LSTM is a recurrent neural network that is able to...
- 23:08So when you think about deep learning, convolutional neural nets, for example,
- 23:13they are deep because you have a lot of layers.
- 23:15LSTMs, or recurrent neural networks, they are deep not because you have, per se, a lot of layers,
- 23:21but because they learn deep in the time dimension.
- 23:24They learn a lot of temporal dependencies.
- 23:25As opposed to a Markov chain where you only have a dependency on the previous event,
- 23:30an LSTM can depend on 20, 30, 50 events back in the past, right?
- 23:35It can say, okay, you know, 50 events ago, the user was in a car, and 20 events ago, he was at a shop.
- 23:40And given all that behavior, the user is probably going to do this next.
- 23:44That's cool, yeah. The longer you go without shopping, the more likely you are to shop.
- 23:49And things like that for groceries, right?
- 23:51Yeah, indeed, indeed.
- 23:52And the cool thing is also that the Markov chain model, by nature,
- 23:56had to be trained specifically for each user, separately, on the user's data.
- 24:00While the LSTM, we trained differently.
- 24:02We trained one global LSTM, feeding it thousands and thousands of different timelines of different users.
- 24:08The LSTM thereby kind of learned about general human behavior,
- 24:13and it learned what events from the past it has to pay attention to to predict something in the future.
- 24:20And then, for a specific user that was never seen in a training set before,
- 24:24we don't have to fine-tune or retrain the LSTM.
- 24:26We just feed the past three weeks of events into the LSTM,
- 24:30and the LSTM already learned during the training phase how it should use that pass to predict the next event.
- 24:36So the nice thing is that you don't...
- 24:37I mean, if you have a million users on your platform,
- 24:39you cannot have a million deep learning models, right, that you have to retrain every second.
- 24:43Yeah, of course.
- 24:44And how do you mark them, right?
- 24:47Like, all this stuff is happening without necessarily going,
- 24:51yes, I'm shopping now.
- 24:53Yes, I'm doing this.
- 24:54And then eventually it learns, okay, you're shopping, so I know what that means, right?
- 24:57This is sort of all inference-based.
- 24:59It's a combination.
- 25:00So on the event level, on the lowest level, we do have a lot of labeled data.
- 25:04So we spend a lot of time with customers or even, I mean,
- 25:08we paid a lot of students to go out on the road, take trains and trams and bus,
- 25:13label the data.
- 25:15And then internally we build some tools to clean up the data and make labels more accurate.
- 25:19So we do have labeled data on that level.
- 25:21Of course, when we go more to moments and segments,
- 25:24it becomes very difficult to get your hand on labeled data indeed.
- 25:27So there we focus a lot on semi-supervised learning and things like transfer learning.
- 25:32For example, using triplet loss function,
- 25:34we can learn this kind of high-dimensional feature space
- 25:38in which two users with similar behavior are close to each other
- 25:41and two users with different behavior are far from each other.
- 25:44And then in that feature space, you can build very simple classifiers using limited labeled data
- 25:49to actually come up with user segments.
- 25:51So that's kind of a transfer learning approach that allows us to cope with limited amounts of labeled data.
- 25:56Sure.
- 25:56Oh, okay.
- 25:57That sounds like it's working out really well.
- 25:58I've definitely been part of projects where it's like,
- 26:01all right, we're going to hire 100 students to do this for an hour.
- 26:05Yeah.
- 26:06And, you know, sometimes that's just what you got to do, right?
- 26:09Yeah, exactly.
- 26:09That's how we got started.
- 26:10Yep.
- 26:12But you can't pay a million students.
- 26:14Well, not much anyway.
- 26:15So, all right.
- 26:17So, that's moments.
- 26:18And you have your LSTM deep learning model there.
- 26:21And then the final, like, the real end goal is to, I guess moments is already probably an end goal.
- 26:26Like, they're at this store because also you want to classify people into groups, right?
- 26:31What type of driver are they?
- 26:32Do they work a lot?
- 26:33Are they parents?
- 26:34Are they teachers?
- 26:36Why are they at the school?
- 26:37Are they at the school?
- 26:37Because they're teaching there?
- 26:39Because they're a student?
- 26:39Because they're a parent dropping off a kid?
- 26:41Things like that, right?
- 26:42So, tell us about the algorithms and stuff and segments.
- 26:45That's a bit of what I was talking about earlier.
- 26:47So, this feature space.
- 26:48I think with segments is you, of course, some segments can be business rules, right?
- 26:53I mean, you're a workaholic if you work more than a specific number of hours, right?
- 26:56Right.
- 26:57But some segments, like, are you a parent, for example?
- 26:59That is less obvious.
- 27:00Being a parent definitely influences your behavior.
- 27:04I became a parent six months ago, and I'm a completely different person.
- 27:06But how do you capture that behavior?
- 27:10I mean, you cannot put that in a business rule, right?
- 27:13Yeah.
- 27:13So, tell us how you can determine someone is a parent, for example.
- 27:17That's pretty interesting.
- 27:17So, what we did there is we used deep learning to analyze, to compare, actually, the behavior of different people and to learn a feature representation,
- 27:27like a feature vector consisting of 50 floating point numbers, where each dimension, each floating point number, encodes a different characteristic of the person.
- 27:36Maybe the first number encodes your demographics.
- 27:39Maybe the second number encodes how many times you go to sport.
- 27:44The difference with traditional machine learning is that, in this case, we didn't manually define the meaning, semantic meaning of each of those 50 numbers.
- 27:52Instead, we let our neural network figure out on itself which dimensions it should learn to capture human behavior.
- 28:00And once you have that, you can actually take this timeline of events and code the whole event timeline into 50 floating points.
- 28:08And then you have a rather small feature space with only 50 features on which you can easily build, you know, even linear classifiers, very simple classifiers,
- 28:18using limited amounts of labeled data, people, for example, from which we know they are parents.
- 28:23And it generalizes extremely well because your feature space is so expressive and because the feature space was learned using unsupervised learning.
- 28:30So we can use all the data we gathered in the past to learn that representation.
- 28:34Okay.
- 28:35So you have these 50 classifiers or points that are sort of grouping people together.
- 28:42How did you determine, like, this grouping means it's a parent?
- 28:46Did you find some people you knew were parents and say, oh, they also have this feature that must mean they're a parent?
- 28:51Or how did you, like, assign values to that?
- 28:53Yeah, exactly.
- 28:54So it's kind of the feature space just allows us to do user similarity modeling.
- 28:58And then, indeed, we do still need labeled data, just not a whole lot of it.
- 29:02We can find, we can ask 100 users to install our demo app, walk around with the data for a few weeks, with a SDK for a few weeks, tell us whether or not they are a parent.
- 29:11And then in this feature space, if we look at those people, well, other parents will be very close to them.
- 29:18And that's how we can then build a classifier to detect parents.
- 29:22That's pretty awesome.
- 29:23Do you feel like there are pieces that are missing?
- 29:26Like, there's dimensions of human behavior that are not captured?
- 29:31Probably.
- 29:31Up till now, it works.
- 29:33It's also all very, very new to us, because we started out also here with mostly business rules on top of our event sequences.
- 29:40So most of the machine learning in the past was on the bottom layer, on the event layer.
- 29:43It's only since recent times that we're also doing this unsupervised and semi-supervised learning on the segments and the moments.
- 29:51But yeah, probably the difficulty, indeed, if you use representation learning, is that it's very difficult to control which dimensions the deep learning thinks are important to capture human behavior.
- 30:00So I can imagine that not everything is captured there.
- 30:05But in the end, you can easily solve that by fixing some of the bottom layers of the pre-trained network and then training it a little bit more on a smaller set of labeled data, fine-tuning the upper layers.
- 30:17And that way, it still is able to learn those things.
- 30:20Yeah.
- 30:20Okay.
- 30:21Very interesting.
- 30:21The dependency that you're talking about here sounds like it could be really tricky.
- 30:25Like, suppose you guys redesign your transportation mode detection.
- 30:32And it turns out, some of the time you thought people were walking, they're just in traffic, but really slow traffic, or something like this, right?
- 30:40Instead of every day taking a walk down I-5, the interstate highway, they're actually just driving in really bad traffic.
- 30:47And that probably has knock-on effects for moments, which has knock-on effects for segments.
- 30:51So how much of, like, if this training of networks takes weeks, potentially, how bad is it if, you know, you change the bottom layer?
- 30:59That's indeed a very actual problem we encountered.
- 31:02Especially now that we are more and more using, you know, representation learning to learn these feature spaces on the bottom layer.
- 31:09Indeed, if you retrain one of the models, the resulting feature space could have a completely different meaning, which means that all the consuming models that follow in the cascade would have to be retrained.
- 31:19And, of course, you don't want that.
- 31:20We solve this, I guess, in different ways.
- 31:22On the one hand, there is a decision you have to make between deploying a trained model as a microservice that is then consumed by other models in the cascade, versus actually just using the pre-trained model and fine-tuning it in a model that consumes that information.
- 31:39If you do it the first way, if you put it in a microservice, then, indeed, if you retrain the first model, you have to retrain the second.
- 31:45But if you do it in the other way, if you just combine both machine learning models eventually into one model, then, of course, you don't have this dependency.
- 31:53So in this sense, we actually try to just use pre-trained models and fine-tune them and embed them into the next model as much as possible, and only go to a microservice if there is good reason for it.
- 32:06If your model, for some reason, needs, for example, huge amounts of memories or a large amount of SQL queries to a database or something like that, then that is a good reason to actually put it in a microservice.
- 32:15That's one way we try to solve it.
- 32:17Another way, that's something we're still working on, we don't have it today, is that we're trying to create a model that basically learns a locally linear mapping from your previous feature space to the new feature space after retraining, or actually the other way around.
- 32:33So if you retrain a model, but you put a mapping layer after it, then that mapping layer can actually make sure that even if the model is retrained, the new feature space is mapped to the same semantics as the old feature space.
- 32:44I see.
- 32:45So the inputs to the next level model basically are literally transformed to look the same as they would have before.
- 32:52Exactly, exactly.
- 32:53Okay.
- 32:54Yeah, that sounds like a pretty interesting set of challenges and some good solutions.
- 32:58But yeah, definitely it seems like that's something that's always going to be a bit of a tension.
- 33:04Yeah, exactly.
- 33:05And we're also, I mean, we're continuously trying to figure it out ourselves.
- 33:08I mean, there is also, of course, versioning, because if you deploy a new model, there is at least some period in which you're going to have to run both the old model and the new model in parallel,
- 33:17because not all the consumers will be updated at the same time.
- 33:20It's getting complicated quickly, but luckily we have an awesome data engineering team there to help us solve all that.
- 33:27Yeah, that's cool.
- 33:28So one of the things I was wondering as I was looking through all this, like there's a lot of statistics and statistical inference and understanding these models.
- 33:37So somebody who works on your team as a data scientist, like what's their general skill set?
- 33:42Like how much programmer versus how much statistician versus some other skill I'm not thinking of?
- 33:48It's a bit mixed.
- 33:49So in general, we say that everyone at Sentience is a software engineer.
- 33:52So that means that every data scientist has to have good software engineering skills, not just some, you know, some MATLAB scripting experience or something.
- 34:01You have to be a software engineer.
- 34:02That's for sure.
- 34:02And then, of course, most people, we put a lot of emphasis on the machine learning background.
- 34:07So most people in the data science team, they either have a, you know, PhD in machine learning or computer vision or something, or they have a background in physics or mathematics.
- 34:16They need an analytical mindset, let's say.
- 34:19And then finally, there is the signal processing, which is kind of a specific field.
- 34:24So people coming from robotics or from speech recognition or also image processing often have a good signal processing background.
- 34:30Yeah, it's quite challenging to find people that combine all three of them.
- 34:35Yeah, I'm sure.
- 34:36Definitely sounds fun in terms of projects you get to work on.
- 34:39You guys don't build apps, right?
- 34:41You basically provide this SDK or this API to customers who themselves build apps, right?
- 34:48Well, actually, we just hired a designer, but ourselves, we're not the best in creating very fancy apps or something.
- 34:56We are really a tech company.
- 34:58And indeed, we have an API through which we expose all this information back to our customers.
- 35:03But the customer still needs a tech team.
- 35:05They need data scientists or developers to be able to do stuff with it.
- 35:11This portion of Talk Python is brought to you by GoCD.
- 35:14GoCD is an on-premise, open-source, continuous delivery tool to help you get better visibility into and control of your team's deployments.
- 35:23With GoCD's comprehensive pipeline modeling, you can model complex workflows for multiple teams with ease.
- 35:30And GoCD's value stream map lets you track changes from commit to deploy at a glance.
- 35:36Say goodbye to deployment panic and hello to consistent, predictable deliveries.
- 35:39We all know that continuous integration is super important to the code quality of your applications.
- 35:44Choose the open-source local CI server, GoCD.
- 35:47Learn more at talkpython.fm/gocd.
- 35:51That's talkpython.fm/gocd.
- 35:55All this sounds so cool and powerful and useful.
- 36:00But at the same time, it also feels like it could be a little bit invasive into people's lives and into their privacy.
- 36:07So what's the story around trying to strike that balance?
- 36:10That's a question we get a lot.
- 36:11And indeed, it is a balance we have to maintain.
- 36:14There is a lot of information you can extract from the sensor data.
- 36:18I mean, even your personality and your mood at something that's on our roadmap, something we're looking into, not something we per se have today completely.
- 36:25But your personality influences how you behave and how you behave influences the motion of your phone.
- 36:31So there is a lot of stuff you can do with it.
- 36:33And indeed, then privacy becomes an important question for us.
- 36:37On the one hand, there is a GDPR, so like the recent European privacy legislation.
- 36:42If you look at the GDPR, Sentience is a data processor, not a data owner.
- 36:47What actually means that compared to, let's say, Facebook or Google or something, we never claim that the data is ours.
- 36:54The data is still owned by the customer, which means we cannot combine the data with other data.
- 36:59We cannot sell the data.
- 37:00And the data is siloed.
- 37:01That's one thing.
- 37:02On the other hand, and probably much more important, is that we explicitly force our customers to ask consent to their users.
- 37:10So it cannot be that they use our SDK and put something in a small privacy statement, you know, hidden in the app or something.
- 37:17Our customers really need to be very upfront with their end users, tell them what kind of data they gather, why they do it.
- 37:23And as long as those customers provide enough value to the end users, that works.
- 37:27I mean, it won't work for, let's say, advertising solutions.
- 37:30Nobody wants to give consent to gather all this data to have better advertisements.
- 37:34But it does work for, let's say, health and lifestyle coaching.
- 37:37I mean, if we can help you live a healthier life, if we can contextualize your heart problems, or maybe even for insurance, if we can model your driving behavior.
- 37:46And by that, by doing so, reducing the amount of money you have to pay to an insurance company.
- 37:51Well, there is enough added value for most users to actually give that consent.
- 37:55Yeah, that's a good point.
- 37:56Yeah, I guess it's all about the trade-off for the benefit, right?
- 38:01Like you said, no one's going to go, I would love to see better banner ads in my, like, Candy Crush app or whatever.
- 38:08Yeah, indeed.
- 38:09The tagline of Sentence, or at least what our CEO often says is, we want to make sure that AI improves people's life.
- 38:17And it might sound a bit cheesy, but imagine indeed a world where you don't have to adapt to all your surroundings.
- 38:24But instead, you know, your phone knows who you are, knows what you feel, knows what you want.
- 38:28And the whole world adapts to you, not to spam you or manipulate you, but just to make your life easier and healthier and improve your quality.
- 38:36That's the promise, right?
- 38:37Exactly.
- 38:38So, you talked about being an SDK.
- 38:41Can you give us some examples of some of the apps that are using you guys as a service?
- 38:45Yeah, sure.
- 38:46There are different components, of course, in what we do.
- 38:48One of the components I quickly mentioned before is driving behavior, where we, in a detailed manner, model, you know, how aggressively you drive, how do you take your turns, what is your driver DNA?
- 38:58And that is currently being used by, I'm not allowed to name them, but let's say by the biggest ride-hailing company in the world to actually model the safety of their drivers.
- 39:08So, not the passengers, but the drivers themselves, so that they can coach them and make sure that the riders are safe when they take the gap.
- 39:16Another example is, for example, one of the biggest brand loyalty companies in the UK.
- 39:21So, they have a huge user base of users that installed their app because they want to get the latest coupons and that kind of stuff.
- 39:30And so, there they use our SDK to just personalize their communication with their users and to make sure that, you know, the user is not spammed with information that they don't care about.
- 39:40But instead, it's a very personalized communication and increases engagement.
- 39:44Right. So, maybe if you could tell them, like, this person is a parent versus this person is a workaholic, or if they're both, you know, that they might treat them differently, right?
- 39:54Yeah, exactly. Exactly.
- 39:55I mean, if you know that someone is sportive, you can propose more interesting stuff than if you know, okay, this person never sports and indeed is a workaholic or something like that.
- 40:03And I guess maybe the most interesting use cases, to me at least, are in health and insurance.
- 40:08So, in health, for example, we work with Samsung, who is also one of our main investors, on detection of heart arythemia.
- 40:14So, problems with, I mean, if you have heart fibrillations and you want to contextualize that, you want to know why it happens, when it happens, and you want to expose that to your doctor.
- 40:23So, your doctor can say, okay, we see that if you work late, and I see that you're a workaholic in general, and if you eat a lot of fast food that week, that is a time when you usually have your heart problems.
- 40:33So, that's one of the use cases.
- 40:35How does it know?
- 40:36Do you have to, like, do you have a different device that detects the arrhythmia and, like, flags it in time, and then you can overlay it on your timeline or something like that?
- 40:44Yeah, exactly. Exactly.
- 40:44Okay.
- 40:45Yeah, and you said you're also working with another company doing something similar?
- 40:48Yeah, so there is, in the health space, we work with some smaller companies also from Europe and Belgium and the Netherlands more specifically.
- 40:54So, there is FibriCheck, for example.
- 40:57FibriCheck, they have a mobile app where you can put your finger on your camera, and the app will use the camera and the flashlight to extract your heart rhythm from the blood flow to your fingertip.
- 41:08And so, there also, they use our SDK to contextualize that, to predict when you're probably going to have heart problems, why it's happening, and to expose this to a doctor.
- 41:18And then there is another example, Medup.
- 41:20Medup is a company in the Netherlands.
- 41:22They have an app for care adherence, medical adherence.
- 41:26So, a lot of people have to take a lot of pills, and a lot of people actually forget to take their pills.
- 41:30And that's a huge problem.
- 41:32So, what they did is they developed an app that reminds users to take their pills on time.
- 41:37But, of course, if you just get such a reminder, you know, an alarm on your phone right before you have to go to work, or maybe even when you're in the car,
- 41:45then you just snooze the alarm or dismiss it, and you forget about it altogether.
- 41:49So, they use our SDK, again, to tailor those alarms to make them contextual aware and remind users at the right time.
- 41:56Right.
- 41:57Like, if you're driving, it makes no sense to remind you, so wait until you get to work.
- 42:00Exactly.
- 42:00Or wait until you return home if it knows you're coming home or something like that.
- 42:03Yeah, indeed.
- 42:03Or if we predict you will probably be leaving for work in 10 minutes, then this is the time to remind you, and don't wait 10 minutes.
- 42:10Yeah, that'd be even better.
- 42:11Cool.
- 42:12So, those sound all really interesting.
- 42:13We talked a lot about your architecture already, actually, but there's a few things that we haven't touched on that I think are worth covering.
- 42:19One of the things you guys use is something called DevPy.
- 42:23It's sort of an alternative local PyPI.
- 42:26Tell people what DevPy is, and how is it helping you guys?
- 42:29The problem we had with Python and PyPy as a package server is that you quickly end up in kind of a dependency hell.
- 42:37You develop your project, put it in a repo, you have a setup.py to easily install it, and as a requirement, you list, let's say, NumPy version X, but also you list package Y as a dependency, but package Y actually depends on NumPy version Z.
- 42:54So, you have this whole conflicting set of dependencies which quickly becomes very difficult to manage.
- 43:01And how we actually did versioning of our own packages, so our repositories, is in the past we specified a version attribute in the setup.py and used git tags on BitBucket, so on our git repositories.
- 43:15And those tags also contain a version number, and that kind of allowed us to pull the correct version and try to get everything installed as it should be.
- 43:24But then you have to make sure that you maintain a setup.py.
- 43:27Don't forget to increase the version number there.
- 43:30Make sure the tags are in sync, and it really becomes messy quickly.
- 43:33So, how we solve this is, indeed, we use DevPy these days.
- 43:36We have our own package server, our Jenkins server.
- 43:39So, Jenkins basically is our build server.
- 43:41Everything gets built into packages automatically there.
- 43:44Jenkins builds wheels from our internal repositories, builds those wheels both for Mac, for the developers, and for Linux, for actual production.
- 43:53And it stores that with a version number.
- 43:55And then if we do pip install something, then first our DevPy is consulted.
- 44:00It fetches the correct version, the package with the correct version and correct dependencies.
- 44:04And only if it cannot find it there, it goes further to PyPy.
- 44:08Yeah, that's really cool to be able to control it like that.
- 44:11Do you distribute your own packages for use on other projects within your own DevPy?
- 44:18Everything we build is contained in like a functional repo, let's say, with an API.
- 44:24And then we always have a microservice wrapper repo that just uses that functional repo as a dependency.
- 44:31So, the functional part is always built by Jenkins, put into DevPy, and can then be used by different other projects as a dependency.
- 44:39Yeah, okay.
- 44:39That sounds like a really good setup you guys have going there.
- 44:42Another thing that you talked about is pragmatic use of deep learning.
- 44:48Tell us what do you mean by pragmatic use.
- 44:51What are some of your recommendations?
- 44:53Deep learning is cool.
- 44:54And especially if we hire new people and they hear that we do deep learning, we use it a lot actually.
- 44:59They are eager to also start using it for the problems they start working on.
- 45:03But of course, we have to be pragmatic indeed in the sense that a lot of problems just don't need deep learning.
- 45:09For example, if I talked earlier about detecting what is your home location and what is your work location, you can solve that without deep learning.
- 45:17You just do some feature engineering, gather a little training data, and train a linear support vector machine on top of it or something.
- 45:24It's important, I think, to use deep learning if it really solves your problem, if it makes your product better.
- 45:31But indeed, don't just follow the hype.
- 45:32Don't just do it because it's a buzzword.
- 45:34Yeah, exactly.
- 45:35More VC money because of it.
- 45:37Indeed.
- 45:38Yeah, yeah, that's really cool.
- 45:39Like sometimes just standard algorithms and, you know, if cases effectively, right, are all you really need sometimes.
- 45:47It is true that these days with VCs and even for customers, for some reason, it sometimes almost sounds embarrassing if you have to tell them that for a part of your product, you use traditional machine learning.
- 45:59It's like, why don't you use deep learning?
- 46:00But it's a matter of cost.
- 46:02It's a matter of accuracy and also maintainability.
- 46:05I mean, if you have a very simple – actually, I think it goes even further than the simplest example I gave.
- 46:11If you can solve a problem by a simple business rule, then that's the way you should go.
- 46:14Right.
- 46:15Absolutely.
- 46:16Let's take just a moment and, like, take a step sort of up this higher level, not anything that you guys are doing in general, not referring to your product or your mission, but just in general.
- 46:28Like there's some people like Elon Musk, who I'm a big admirer of in general and others saying, like, we should be really worried about AI and machine learning.
- 46:38And other people saying, no, this will make things lots better.
- 46:40And you've given us some definite examples where it is going to be better for people, right, with, like, health, for example.
- 46:47But where do you land in this debate?
- 46:49And do we live in a simulation?
- 46:51First, the extreme example or the extreme case that you sometimes read about, about, you know, AI taking over the world and stuff like that.
- 46:58Well, an interesting quote there.
- 47:00I think it's from Andrew NG, so one of the big deep learning guys who used to be head of AI at Baidu.
- 47:07And I think today he's still head of AI at Stanford.
- 47:09He said at some point, you know, that the fact or talking about AI taking over the world is a little bit like talking about overpopulation on Mars.
- 47:16It might happen at some point.
- 47:18It probably will.
- 47:18But there is still no clear path to it, right?
- 47:21So that's one thing.
- 47:24Of course, it is true that AI or machine learning, which I like more as a term, actually, is becoming very powerful.
- 47:32And in that sense, like any powerful tool, it can be used for the good and the bad.
- 47:36So I do agree that we need politics.
- 47:40We need legislation to be ready for this.
- 47:42We need to make sure that governments are limited in what they can do, you know, that they cannot force you to install an app that tracks your every movement so that they can then control your future or something like that.
- 47:54So I do agree with Elon Musk on that point that it's time for government officials to take this serious and to work on the legal aspect there.
- 48:02Sure.
- 48:03I totally agree.
- 48:04And there's other interesting knock-ons.
- 48:06I think the EU is working on this.
- 48:08You know, when we get to things like driverless cars, if the driverless car is in an accident and it turns out the driverless car was at fault, who is responsible and how do you address that?
- 48:20And if it's pure, totally unsupervised learning that made the car drive, like how do you know why it crashed?
- 48:34We're going to be able to do that.
- 48:36So first, a whole transformation in the mobility sector, in the insurance sector has to happen so that cars are actually seen as a service where you insure a service.
- 48:57It's a different mindset.
- 48:58Yeah, and I think we're going to have to get used to pushing the benefits in an aggregated way instead of a specific individual's responsibility way.
- 49:06For example, yeah, the self-driver car did something really bad and it crashed into some people on the sidewalk.
- 49:11But if you look at it as a whole, half a million fewer people were killed in car accidents this year.
- 49:17So this is a horrible news story and we're really, you know, it's really bad.
- 49:20But taken as a whole, self-driving cars are doing better for people.
- 49:24That's like a theory I'm imagining, right?
- 49:26But I can see the world struggling with those sort of ethical trade-offs.
- 49:30Yeah, indeed.
- 49:30You know, it's a little bit, I know maybe it's not a very good comparison, but if you think about the Industrial Revolution, there was a lot of people that were so scared about all the millions of jobs that would be lost if cars would not be made by hand anymore, but if machines would be used, you know.
- 49:44But in the end, when we look back, I do think that most people agree that the Industrial Revolution made our life healthier.
- 49:51We live longer, made it easier, we're happier.
- 49:54And the same thing is going to happen with the AI revolution.
- 49:57Yeah, I think that in the long term that that's definitely true.
- 50:00Like I definitely wouldn't want to live pre-Industrial Revolution myself.
- 50:03I wouldn't trade my spot in it now.
- 50:05All right.
- 50:06Well, Vincent, I think we're going to have to probably leave it there for our topics.
- 50:10But that was a super interesting look inside what you guys are doing with machine learning and things like that.
- 50:15So let's get to the two questions.
- 50:19First one, favorite Python editor.
- 50:21What do you open up if you're going to write some Python code?
- 50:23By charm, for sure.
- 50:25I love the JetBrains product in general.
- 50:27You know, DataGrip for database stuff, IntelliJ for Java, PyTron for Python, yeah.
- 50:31Yeah, awesome.
- 50:32Yeah, me as well.
- 50:33That's my favorite.
- 50:33All right.
- 50:34And notable PyPI package?
- 50:36I've been thinking about this for a long time.
- 50:38I think it would be Python Flame Graph just because it's a very cool way to do memory and performance profiling, create Flame Graph, see which methods in your code are the bottlenecks, and optimize them.
- 50:48Yeah, I looked at that just a little bit.
- 50:49And it looks like a very powerful way to quickly visualize where your performance problems are.
- 50:55Yeah, exactly.
- 50:56Exactly.
- 50:56And to actually dig deeper into the stack of method calls and figure out what's happening.
- 51:00Yeah, that's cool.
- 51:01So I'll put a link to the GitHub repo for Python Flame Graph, which has a bunch of nice pictures.
- 51:05Awesome.
- 51:06Awesome.
- 51:06Yeah, yeah.
- 51:07So, all right, final call to action.
- 51:09People are excited about deep learning.
- 51:11They're excited about what you guys are doing.
- 51:13What do they do to get started?
- 51:14We're expanding.
- 51:15We're continuously expanding.
- 51:16This year, or coming year, we should grow from 50 to 80 people.
- 51:19So we're always looking for passionate Python developers, machine learning guys.
- 51:23Can they just reach out to you, like, on Twitter or something like that if they want to get more information?
- 51:26Or how do they find out?
- 51:27Yeah, yeah, definitely.
- 51:28Just, you know, ping me on Twitter or LinkedIn or go through our website where there is a more official channel.
- 51:34Maybe you can refer to podcast so we have an idea where you're coming from.
- 51:38Don't focus too much on the machine learning part either.
- 51:40If you're very good at Python or very good at machine learning or signal processing, we should talk.
- 51:45Okay, awesome.
- 51:46And then you guys have an app.
- 51:47Even though you said you don't build apps, you have an app.
- 51:49What's the story with this app?
- 51:52Yeah, it's a demo app because our product is quite technical.
- 51:55And so, of course, customers ask, like, okay, how does it look like?
- 51:58What can I do with it?
- 51:59So, indeed, we built a small demo app.
- 52:00It's called Journeys.
- 52:01You can find it on our website or on the App Store.
- 52:03Our Play Store.
- 52:04And Journeys, basically, when you install it, after a while, it will learn about your behavior.
- 52:08After one week or two weeks, you will see pop up a whole set of segments that we assign to you.
- 52:12Your moments, your home and work detections.
- 52:14So, yeah, check it out.
- 52:16Download it.
- 52:16It's pretty cool.
- 52:17And there is also a way to give feedback.
- 52:19So, if something is wrong and you decide to give feedback, well, that helps us to retrain our models.
- 52:24Oh, beautiful.
- 52:24All right.
- 52:25Well, thanks for sharing your story and what you guys have to.
- 52:26It was great to chat with you.
- 52:27Thanks a lot, Michael.
- 52:28This has been another episode of Talk Python To Me.
- 52:32Our guest has been Vincent Spurt.
- 52:34And this episode has been brought to you by Datadog and GoCD.
- 52:37Datadog gives you visibility into the whole system running your code.
- 52:41Visit talkpython.fm/datadog and see what you've been missing.
- 52:46Don't even throw in a free t-shirt for doing the tutorial.
- 52:49GoCD is the on-premise, open-source, continuous delivery server.
- 52:52Want to improve your deployment workflow but keep your code and builds in-house?
- 52:57Check out GoCD at talkpython.fm/gocd and take control over your process.
- 53:03Are you or a colleague trying to learn Python?
- 53:05Have you tried books and videos that just left you bored by covering topics point by point?
- 53:10Well, check out my online course, Python Jumpstart, by building 10 apps at talkpython.fm/course
- 53:16to experience a more engaging way to learn Python.
- 53:19And if you're looking for something a little more advanced, try my Write Pythonic Code course
- 53:23at talkpython.fm/pythonic.
- 53:26Be sure to subscribe to the show.
- 53:29Open your favorite podcatcher and search for Python.
- 53:31We should be right at the top.
- 53:32You can also find the iTunes feed at /itunes, Google Play feed at /play,
- 53:37and direct RSS feed at /rss on talkpython.fm.
- 53:41This is your host, Michael Kennedy.
- 53:43Thanks so much for listening.
- 53:45I really appreciate it.
- 53:46Now get out there and write some Python code.
- 53:48I'll see you next time.