On this episode, you'll meet Francesca Lazeri and hear her story how she went from research fellow in economics at the Harvard Business School
to working on the AI and data science stack on the Azure team at Microsoft.
This is Talk Python to Me, episode 220, recorded June 20th, 2019.
Welcome to Talk Python to Me, a weekly podcast on Python, the language, the libraries, the ecosystem, and the personalities.
This is your host, Michael Kennedy. Follow me on Twitter where I'm @mkennedy.
Keep up with the show and listen to past episodes at talkpython.fm and follow the show on Twitter via at Talk Python.
This episode is brought to you by Linode and Talk Python Training.
Be sure to check out what the offers are for both of these segments. It really helps support the show.
Hey, everyone. Before we get to the interview, I want to quickly tell you about a new course we just launched.
It's our first major Flask course, and it's called Building Data-Driven Web Apps in Flask and SQLAlchemy.
This one's a deep dive into Flask. We cover things like routing models, templates, databases, and migrations, and even deployment and security.
And we do all of this in the context of building a clone of the pypi.org website.
Check it out over at training.talkpython.fm.
If you're not sure if you want to choose Flask just yet for your web app, then give our 100 Days of Web course a look.
We cover many frameworks and programming models in 25 four-day projects, so you get a super wide view of what's out there.
Then you could pick Flask or Django or Pyramid or something else.
Thanks for checking it out. Now let's get to the interview.
Francesca, welcome to Talk Python to Me.
Hi, thank you. Thank you for having me.
It's really great to have you on the show.
We got a chance to meet at Microsoft Build where I was walking around the expo hall floor,
and you're doing really cool stuff with AI and Python, and I'm just happy to have you here.
Thank you so much. I'm very excited for being here.
Yeah, so we're going to dig into this whole machine learning thing that you're working on,
and just the industry in general, and machine learning at Microsoft as well.
And that's going to be a lot of fun, but before we get to all those things, you know,
let's get started with your story. How did you get into programming and Python?
Yeah, that's a great question. I ask myself this question all the time.
I have to say, before joining Microsoft as a data scientist, I was a research fellow in business
economics at Harvard Business School, and over there was in charge of performing statistical
and econometrics analysis within the technology operation management unit.
So at that time, really, my title wasn't a data scientist, but it wasn't, as I said, a research fellow.
But I had to work with a massive amount of data from different data sources, such as patent, publication data, social network data.
The goal of my research was to investigate and measure the impact of external knowledge networks.
And that's why we were using that specific type of data on companies' innovation.
Is that like social media or what's an external source of data that you might be looking at?
Patent data, publication data, and social network data.
These three were the main three sources of data.
And we were trying to understand if these knowledge networks were also localized from a geographical point of view,
or they were more like global networks of knowledge.
And how these networks, both local and global, could affect a company's innovation.
As you might know, like, for example, Cambridge, Massachusetts, that is where I'm working from,
and where my office is at Microsoft Cambridge.
It's a very powerful tech cluster and also pharma cluster.
Okay, well, that sounds like a really cool thing to study there.
So you're studying this data, you're studying these projects at Harvard Business School.
And of course, this is probably not a challenge that can easily be solved with Excel, and definitely not manually, right?
Exactly.
So at that time, Python was emerging as a leader in data science programming.
And while there are still many people in academia who use R, SPSS for their analysis,
Python, I think, was getting very, very popular because there were a lot of data science libraries.
I remember that one of the most popular and still very popular is Pandas.
So it has many in-build features, such as the ability to read the data from many sources.
You can create large data frames from these sources and also compute aggregate analytics.
And this was exactly what I needed as a research fellow and also for doing all the data analysis that I needed to do.
Yeah, that's really interesting.
What year was this?
Like, about?
It was about 2012, 2013, 2014.
Because then I started to work at Microsoft as a data scientist exactly in 2014.
And at that time, I remember that R was still very, very strong for both academics and also data scientists.
But Python was already there, of course.
Of course, and the reason I ask is I have this theory that there's a big change at an inflection point around 2012 where a couple of things happened that just made Python in the data science space really start to accelerate out ahead of the other options like R.
And it's just, it's super interesting that it's this time as well that you're, you sort of picked it up.
Yeah, totally agree.
Yeah.
And so did you know other programming languages before or did you have to teach yourself Python to get into this?
I had to teach myself Python.
Of course, at university, I took a couple of classes, just introduction to Python.
And those classes were very helpful.
Before that, I was already coding a lot in R.
SQL was another very powerful language that I'm still using sometimes to just ingest the data.
You know, sometimes you need to prepare your data, some tables, and you need just to ingest them.
And from there, you can start using the tools that you prefer to build a machine learning solution.
And it's Python, the main tool that I use.
But I have to say, beside these two languages, then the third language is, for me, it's Python, because it's very, very powerful for data science.
And I would say data analysis in general.
So also for people who need to do a lot of statistics, econometrics type of analysis, Python is a very, very good choice.
Absolutely.
Did you come up with any really interesting results from your research at your time there that you can talk about briefly or anything like that?
Yeah, absolutely.
I mean, I love my time there at Harvard.
I was working with a great professor and a great research unit.
And so the results were very interesting.
So we noticed that for the most important innovations, and we were targeting the biotech industry, the localization was very, very important.
And like we noticed that data scientists who were located in the same, sorry, not data scientists, scientists in the biotech industry, and also some data scientists, but we were looking just at the general category of scientists who were located in the same geographical cluster.
They were actually able to innovate more often and much faster.
So, and of course, we were seeing these in terms of publication, in terms of how they were citing each other.
And most importantly, in terms of patents, because the only way to really measure knowledge and how the knowledge can be clustered is through patents, unfortunately.
I mean, I say unfortunately, because it's a sort of extra step.
You have to make a few assumptions to make this correlation between knowledge and patents.
But still, it's a good indicator for innovation.
So we noticed this.
However, we noticed that for long-term innovation, like if you look at the company and you look at the number of patents that the company and the research unit have filed, you can see that geographical barriers are actually not an issue.
And right now, especially with the use of technology, innovation and the knowledge do not need to be linked from a geographical point of view.
So this is what we noticed with our research.
Yeah, that sounds really interesting.
So the short term is more important to be around fellow scientists, but long term, the knowledge gets out there.
Cool.
All right.
So you're no longer working.
You're no longer doing that research at Harvard.
You're still near Harvard, but you're working at Microsoft.
What do you do day to day there?
Right now, I'm a machine learning scientist on the cloud advocacy team.
And what I do, I work with a lot of external customers and the Azure machine learning community in general.
Specifically, I work a lot with universities and research institutions from students, professors to researchers on machine learning projects.
Oh, that sounds really interesting.
And there's something special about universities.
I mean, you were at Harvard for a while.
Just being on campus and being in those environments is really nice.
So it must be fun to work with those research groups just on a day-to-day basis.
Absolutely.
And I think, again, talking about innovation, I think that the real innovation starts most of the time from university, from research units, from what we call a spin-off.
There are a specific type of startups coming from academia.
So I really think that having these close relations with university is a key for innovation.
And when I say innovation, I mean also in terms of machine learning solutions.
So it's nice because most of the time I leverage their knowledge in terms of AI and machine learning.
But I'm the one that is more like expert, even if it's hard to use this word, because I think that every time we learn from each other.
But more or less, I have more experience with the technology that they can use.
And so that their innovation, their research is not just on paper, but they can actually translate these, transform their research into a product, into a service, into a feature that other people can consume.
So that's why it's so interesting to work with these type of customers.
I feel very lucky.
Yeah, for sure.
They're so interesting.
And especially in science and biology and pharmaceuticals, those are not the kind of startups that people often can just go start on their own.
They often spin out of these labs.
And that's like a pretty cool area, right?
Absolutely.
And again, this is a topic that is similar to my Harvard University research.
What we call it, economists call it a spillover type of effect.
Like when you build the knowledge and then you decide to transfer this knowledge outside.
And when I say outside, it can be to a different industry.
Like from academia, you go to the real industry.
It could be biotech, tech, or any other industry.
Or you change.
You change completely your area.
Like from economics, you go to machine learning.
As you said, it's something, it's a real nice phenomenon that you can notice when you are like in a cluster, in a tech and knowledge cluster.
And yeah, it's a very interesting phenomenon.
Yeah, I'm sure that it is.
How interchangeable is the knowledge between the different projects that you're working on?
Like how much do you have to try to study what they're doing?
Or how interchangeable is like this machine learning, data science world?
That is a great question.
So I think that the difference is in the data and in the business problem, or I would say research problem in this case, that you are trying to solve.
Everything that is in the middle is actually very similar in the sense that the approach can change or the type of technique that you are using.
If you have like economics background or a biotech background or a machine learning background can be like a little bit different.
But more or less, you have this scientific mindset that you know that there are a few techniques, some very powerful techniques that you can apply on your data to an answer that is going to be able to solve your problem.
Again, if you are talking to a company, of course, it's a business problem.
In this case, since my customers most of the time are university research institutes, the problem is more like a research problem.
So it's a very, very interesting.
Of course, those people, as you said, they have most of the time very different backgrounds, but they are experts of the data.
And they know very well what the output from their research needs to be like.
What is the type of answer?
What is the type of problem that they want to solve?
So my role is really between these two points.
Like I really help them understand how they can use the machine learning and the cloud to build the hand-to-hand AI solutions and apps most of the time to solve their own specific research problems.
And also to sometimes can be just an optimization of a specific process, for example.
And what is interesting in my role is that I don't just help them understanding what are the potentials with using machine learning, but it's also about collecting feedback.
Because when I work with them, of course, I always have some type of feedback that I can collect.
And then I support our machine learning product teams, our AI product teams, to build a new feature, to optimize our services for both machine learning scientists and data scientists.
This portion of Talk Python to me is brought to you by Linode.
Are you looking for hosting that's fast, simple, and incredibly affordable?
Well, look past that bookstore and check out Linode at talkpython.fm/Linode.
That's L-I-N-O-D-E.
Plans start at just $5 a month for a dedicated server with a gig of RAM.
They have 10 data centers across the globe.
So no matter where you are or where your users are, there's a data center for you.
Whether you want to run a Python web app, host a private Git server, or just a file server,
you'll get native SSDs on all the machines, a newly upgraded 200 gigabit network, 24-7 friendly support,
even on holidays, and a seven-day money-back guarantee.
Need a little help with your infrastructure?
They even offer professional services to help you with architecture, migrations, and more.
Do you want a dedicated server for free for the next four months?
Just visit talkpython.fm/Linode.
Artificial intelligence was something, when I was in college, it was like a small research side of computer science.
And there were some people working on it.
But it was always, it felt like one of those technologies that's 30 years away, if ever.
The type of problems they were trying to solve is, well, let's build a little chat bot.
And then if a person can chat with the chat bot in IRC, and they don't know that it's a machine, it's artificial intelligence,
that we're very close, right?
And that seemed like an interesting research project, but not really practical.
And now we have machine learning taking stuff just so far along, right?
We've got self-driving cars.
We have computer algorithms determining whether folks have cancer.
All sorts of, like, mind-blowing stuff.
So I feel like AI has really become real, right?
It's actually become a thing.
But also, I think it's a little bit misunderstood in some interesting ways.
Like, how would you describe artificial intelligence to non-technical people or machine learning even?
Yeah, that's another great question.
I think that simply speaking, AI is just about programming computers to make decisions.
And machine learning, of course, focuses more on making predictions about the future.
So I always like to explain AI with an example.
Like, there is a very nice app that I have been using here at Microsoft, and it's called Seeing AI.
It's a Microsoft research project that really brings together the power of the cloud and AI to deliver this intelligent app
that is designed to help people that are blind or that they are, like, low vision.
And they help them, like, to go through their everyday life.
It's very nice because with this app, you can just point to your phone's camera.
You can select a channel, and you can hear a description of what the app has recognized around you.
So, again, this is a very, very good example of AI and how AI can help us also to improve some of our everyday actions, I would say.
As I said at the beginning, it's really about programming computers to do something, to make some decisions.
That's really incredible, this Seeing AI app here.
I'll put a link in the show notes.
So, you just hold it up and it just says, hey, I see there's a car over there and there's a table with two people sitting at it, something like this?
Exactly.
Wow.
Yeah, it's very, very nice because, again, it's with your phone camera.
You can select a channel and here, again, a description of what has been recognized around you.
So, it's really designed to help you navigate your day.
That's amazing.
I'll tell you a real quick story that's kind of wild that happened to me about 10 or 15 years ago.
And this person could have really used this app.
I was walking to the grocery store where I lived.
It was maybe three blocks, four blocks away.
And I was walking along and this guy comes over or is standing next to me at this light and says, hey, could you help me?
I said, sure, no problem.
What do you need?
He says, could you tell me where the grocery store is?
And it was clearly visible just across, diagonal across the intersection.
I said, yeah, it's right there.
He goes, don't point, man.
I'm blind.
I'm like, wait, what?
You know, it was not at all obvious.
He's like, could you just help me?
I just got disoriented.
Could you just help me walk over there?
And I took him by the arm.
We walked over there and he said, thank you very much.
When we got to the store, he just went off on his own and went shopping.
I was just amazed how well he could function.
But it seems like just something like this, he could just hold it up and go, there's a store across the street.
Oh, there it is.
I see.
You know, it would be just amazing.
And it could really change people's lives.
That's awesome.
Absolutely.
Yeah, I totally agree.
And there are many, many other examples.
I really like to talk about this app, the seeing an AI app, because I think that it can be a very good impact on people's lives.
But I totally agree with you.
There are so many other examples that they're just around you.
And probably we don't even notice at this time.
But they are there of the AI apps that just help us with our everyday tasks that we have to perform.
So, yeah.
Nice story.
Very nice story.
Yeah, thanks.
So, you're describing artificial intelligence and machine learning.
I saw a funny joke that said, how can you tell the difference between artificial intelligence and machine learning?
And it said, if it's written in Python, it's probably machine learning.
If it's written in PowerPoint as a concept, it's probably AI.
I saw that joke, of course, as well.
It's a good one.
And it's a very, very good one.
And I have to say, probably it's also true.
There is some truth there.
I mean, AI is something that, as we said, in some cases is already around us.
In some other cases, it's not there yet or it needs to be improved.
But I still think that it depends a lot on how you define AI and what are your expectations from AI.
But, yes, that joke, it's very popular.
And I saw that as well.
That's a good one.
Yep.
Nice.
All right.
So, let's talk a little bit about the AI stuff you guys have going on at Microsoft.
And you work on the machine learning cloud advocacy team.
So, it seems like a lot of stuff these days that Microsoft is doing, especially in the developer space, is something at Azure or something on the cloud or something like that, right?
It feels to me like Azure has really become the super big focus.
And once again, developers have kind of really become a big focus at Microsoft, as opposed to, say, just Windows and Office, for example, as the two key pillars of the company or whatever, right?
What do you think?
What's your impression?
That's totally right.
And we can feel this both from an external and internal point of view.
I think that everything probably started with Satya Nadella's first emails to us, to Microsoft employees, because it's very interesting.
Instead of focusing on the past, he wrote about the future and, in particular, the importance of cloud for Microsoft's growth.
He's also saying that our industry does not respect the tradition, but only respect innovation.
So, this means that there was, at that time, and still, there is a strong focus on the cloud, on machine learning, and on AI.
For example, also from an internal point of view, we noticed that in 2017, Microsoft launched an AI division with more than 5,000 computer scientists.
That was, of course, that was a huge change.
And also, of course, there was, like, computer scientists, software engineers, AI developers.
And at that time, we also launched an intelligent cloud division, which included products such as Server and Azure.
This was, again, a big change that we noticed both from an internal point of view, but also externally.
And then, another, I think, big change that we noticed is that Microsoft has done a series of, I would say, smart acquisitions.
For example, GitHub and LinkedIn.
And I think that he did that because we really wanted to make AI accessible to developers and to our communities in general.
So, yes, it's a big change.
Of course, it didn't start this year.
It has been going on for a while at Microsoft.
And I think that we are seeing the results right now.
There is a big focus on cloud, AI, and machine learning.
Yeah, it definitely seems like a big shift, but in a positive way.
I think it's a good move.
So, maybe tell us about some of the AI stuff that you have going on at Azure.
I know there's a lot of cool things that you have going on there.
I know you have some stuff around ML DevOps, for example, right?
Machine learning DevOps and just doing things like productizing machine learning models
or turning them into production systems like REST endpoints and so on.
So, maybe we could talk a little bit about all the stuff you got going on there.
Yeah, absolutely.
So, right now we have MLOps or DevOps for machine learning capabilities.
And this includes Azure DevOps.
This enables Azure DevOps to be used to manage the entire machine learning lifecycle,
including, for example, model reproducibility, validation, the deployment part, the retraining.
And it's very interesting as a data scientist to see this because I have to say the DevOps for machine learning includes a lot of the steps that the data scientists need to perform when they are building an end-to-end machine learning solution,
model training model management, model management, deployment, and monitoring.
I can go on and on.
So, those pipelines allow for what we call the modularization of these different steps or different phases into smaller steps.
And also, it provides a mechanism for automating, sharing, and most importantly, reproducing the models for models.
And not only models, also the different machine learning assets that you need.
Again, thanks to these, all the machine learning workflow becomes like much, much easier to perform and to reproduce and to automate.
So, it's great to see this.
It sounds like it solves a lot of good problems or problems that need solving.
Yeah.
So, what does machine learning in production look like, right?
Is that like TensorFlow behind a RESTful, some like Flask REST service?
Or what does it look like for folks who are like just web developers or not doing, you know, data science day-to-day?
Yeah, that is very interesting because I think that data scientists, they love to focus a lot on the machine learning piece.
But then, once you decided what is the best model or the best models, because it can be, of course, multiple models that you want to push into production,
it's also very important to understand how you can deploy the solution and how other people can eventually consume the solution.
Back to your questions.
Into production, it's a web service.
It can be, I have to say that the first format that it takes is a pickle file because this training run, that is the model training,
this training run produces a Python serialized object that we call it, again, a pickle file.
And this contains the model and the data preprocessing.
So, this is very, very important because then at this time, there is actually the following step is to make this web service.
And the web service is really, there is a REST API that, again, you can call to just consume the service from whatever environment you prefer.
Like, it can be, again, an app or it can be like just another platform that your company is already using.
And you want to use that to consume the results from your machine learning model.
Yeah, that sounds pretty cool.
So, maybe I have a REST endpoint and I just upload a picture, like a PNG or something.
Exactly.
And it takes it, understands it, feeds it through the pre-trained model.
So, there's the training side of things, which can be super computational, but then maybe the evaluation decision-making process is really quick, right?
So, what response times people typically look for, but I suspect it's much, much, much faster, right?
It's a question that doesn't really have an answer.
Like, it really depends on the type of solution that you are building.
And most importantly, it depends on the type of data, the amount of data that you are using.
So, there is not a clear answer to that.
But it's interesting how to see that right now there are many different solutions that you can use, actually, to accelerate, I would say, not only the deployment and the consumption process, but also the training process.
Like, for example, we have right now a new feature.
It's actually not really new because it was launched last September, September 2018.
And it's called Automated Machine Learning.
And it's a feature within Azure Machine Learning Service.
For those who are not familiar with Automated Machine Learning, this is a process of automating the time-consuming, very iterative, I would say, task of machine learning model development.
And allows data scientists and also analysts and developers to build machine learning models with, you know, high-scale efficiency and also productivity.
Because you don't need, actually, to manually create all these different models by yourself.
But Automated Machine Learning actually runs many different models for you.
And it suggests you the best model and also all the hyperparameter tuning is, again, done for you.
So, it's a new feature that can somehow optimize the machine learning flow.
But, again, going back to your question about time, when you are in a machine learning context, saying, like, a specific time, it's very hard.
Super hard, yeah.
I see.
So, that's pretty meta to have machine learning teaching your machine learning algorithm, right?
Yeah, yeah, yeah.
Automated Machine Learning, it's very interesting because it's actually, again, was developed by Microsoft Research.
It's like Seeing AI, the app.
And then our products team was able, actually, to translate these research pieces into a real feature.
So, again, it's a sort of a big recommender system for your machine learning pipelines.
And I've been using these now for a while as a data scientist for the past few months.
And I have to say that, really, it's not just about saving you some time as a data scientist, but it's also a sort of check.
Like, sometimes when you prepare your data or, like, you pick a specific type of models to try on your training data set, you somehow are exposed to biases.
Because, again, it's a selection process that you, as a human, you have to do.
While if you have also an external voice somehow, an external suggestion that just gives you a different perspective or different suggestions, again, I think that is a sort of sanity check.
So, again, it's not just about saving time, but I think it's also about making your process more objective and less subjective.
Yeah, it sounds like it would be really helpful.
So, normally, when you're doing training, you have to pick some kind of model.
You say, I think this kind of model with this many nodes and this type of thing, we're going to set it up.
And here goes the training data where you know what the outcome should be.
Like, let's say, housing prices, right?
Like, one of the interesting problems people tried was, given just the description of a house and a neighborhood, predict the price that it should sell for.
Like, you could feed all that and say the actual price was this.
And it corrects itself, right?
But there's still a lot of decisions on the actual model that you feed it to or the setup you feed it to on top of the training data, right?
That's totally correct.
And, again, this is something that most data scientists do it manually in the sense that you start with your raw feature.
Actually, you start with your raw data, and then you do some data cleaning, data preparation.
And then it starts what we call the feature engineering.
But, again, the feature engineering is something that you do based on some assumptions that you have in your mind.
Because feature engineering is really about creating additional features based on the raw data that you have.
And some of these additional features, let me give you a real example.
Like, for example, if we are in a time series forecasting scenario, you have the timestamped column,
and you can build additional features such as is the holiday or is not holidays?
This is afternoon or no?
Is the weekend or no?
And this can help you making your model more accurate in some cases.
This is not the case sometimes, but they can help.
But, again, also the feature engineering is something that you do before you even know what is going to be the output of your model.
And then after the feature engineering, of course, you start manually selecting and trying a few approaches that,
based on your experience and knowledge as a data scientist, have worked pretty well in similar scenarios.
And after that, of course, usually you need like one single machine learning model.
And, of course, you have been doing a lot of iteration for the hyperparameter tuning part.
And then you push everything into production.
But as you said, it's something that you have to try out manually.
And there are now some new features like automated machine learning that can help you somehow saving some time.
Because, of course, they do all the training, not only the training, but they do all the experimentation with different machine learning models for you.
And also, most importantly, the hyperparameter tuning part.
Yeah, that sounds like a pretty cool service.
So if I'm going to go work with like the machine learning SDK over on Azure for what you guys are doing,
like what libraries are supported, you know, are the standard Python libraries the ones we get to use?
Or do you have to use like a Microsoft ML one or something like that?
All the standard Python libraries are supported.
And then, of course, we have the library for the Azure Machine Learning SDK for Python.
And this is, again, you have to think about it as a sort of a library, Python library.
And the most important part of this is that the deployment part is going to be much, much easier.
Why?
Because, of course, when you prepare your data and you do all the feature engineering part,
and then you go to the modeling phase, that part, basically, it's Python.
It's Python.
And you can, of course, just use the classical Python libraries.
But then when you go into the deployment part, I have to say that Azure Machine Learning SDK for Python,
at least I find it very powerful because you just need to write a couple of functions,
like what we call the init and run functions.
And those two functions are going basically to define the model and how the data needs to be,
the data that you use to feed the model.
And as soon as you have defined these two functions, then it's very easy just to register your model
and then create that pickle file that I was mentioning before.
So, yeah, going back to your question, is Python-based.
And it's very nice to build and run machine learning workflow with what we call the Azure Machine Learning Service.
Another thing I saw you all talking about is model interoperability.
What does that mean?
Yeah, that's, I would say, is one of my favorite topics.
Because I think that model interpretability is another topic that is very close to what we call the ethics in AI or biases in AI.
So, first of all, it's a package.
So, first of all, it's a package, Python-based package within the Azure Machine Learning Python SDK.
And what it does for you is really make the machine learning models not black boxes anymore for you.
So, like, for example, you can use classes and methods that are in the SDK.
And you can get, with this model interpretability package, you can get feature importance values for both raw and engineer feature.
You can get interpretability on real-world data set, both during training and inference deployment.
So, it's very nice.
And then the most interesting part is that you can also get interacting visualization to help you understand your data.
So, like, for example, let's say that we are in a use case where you want to predict the price of a car.
You create some additional features, and then you try out a couple of machine learning models, and then you deploy those models or just pick one model and you deploy it.
But then, most of the time, data scientists, they want really to understand what are the different features that actually affect the accuracy of the model, the performance of your model.
And this is something that, right now, you can get through the model interpretability package within Azure Machine Learning.
So, I think it's something very, very important.
Yeah, it's really interesting because one of the big problems with machine learning is it's really good at making decisions,
but there are certain circumstances where you need to know real concretely why a decision was made, right?
Like, sometimes it's just to improve the system.
Like, if a car crashes, like a Tesla self-driving car turns the wrong way and crashes, like they need that to not happen again.
So, understanding how to fix it is important.
But other times, it's like legal even, right?
Like, if you get rejected for a mortgage for your house and you apply for a loan, you get rejected.
A lot of times, there's laws that say you have to be told why you were rejected or there has to be some visibility into that, right?
To avoid bias.
Absolutely.
That's why I mentioned ethics in AI.
That is a big topic right now.
And biases.
Because, as you said, the first place where biases create is the data set that you are using.
So, all the training data that you use most of the time can create biases in your model.
And, as a result, also in the different outputs that your model is giving you in the final results that, you know, you are looking at.
And, as you said, having, like, sort of visibility, transparency on why the model gave you that specific output is something that we all need to have.
At least, we have to have this option.
It's not, I really believe that it's something that, for sure, is going to be interesting for data scientists.
Because data scientists, I think, they don't want to use machine learning models as a black box at all.
They really want to understand why specific processes were done and why we had specific results.
But it's also, as you said, it's also a topic that should be interesting for everybody.
Because, again, some of the decisions that are made based on the machine learning models that we build can really affect personal life in a good or negative way.
Yeah, and you definitely want to have visibility around those things, right?
Absolutely.
Human biases can get into the algorithms and then the machines just make biased decisions faster.
Yeah, yeah, absolutely.
More systematically, which is not so good.
No.
So, if people want to play around with some of this stuff, you guys have the Azure Machine Learning Notebooks, right?
Is that something that's easy to go play with?
Yeah, and we have Azure Machine Learning Notebooks.
This is something new that was actually announced at the build where we met.
And these are integrated with Azure Machine Learning Service.
And they provide a code-first experience for Python developers.
And so, as a Python developer, you can build and deploy your models in a workspace.
And also, developer and data scientists can then perform every operation that are supported by the Azure Machine Learning Python SDK.
So, you don't need to install anything else, anything additional.
You can just connect with this.
And it's nice because you also have a pretty good computer target, the virtual machine.
It's a very easy environment to use if you are a data scientist or a developer and you want to use Python with Azure Machine Learning Service.
Okay, that sounds really cool.
Another challenge working with machine learning is you have to feed it a lot of data.
And you have to have, like, the data somewhat cleaned up, right?
Hence, Pandas is pretty powerful and interesting there.
Yeah.
And so on.
But you have some open data sets as well.
You want to tell folks what kind of data they get there?
That sounds pretty helpful.
Yeah.
So, this is a part of some of the new open source capabilities that Azure Machine Learning has.
And Azure Open Data Set, I would say it's one of my favorites because it's really a sort of repo for a public data set that you can use to add scenario-specific features to your machine learning solution to get more accurate models.
Like, for example, I was building an energy demand forecasting solution and I already added the load data, load historical data from a public data set.
But I really wanted to include weather data because, as you know, energy consumption can be strongly dependent on weather.
And specifically, I wanted to use temperature data.
So, thanks to Azure Open Data Set, I was able to get this public data set for weather.
But we have also holidays, public safety data, and also location data.
So, all these external and public data can really enrich your original data set and can help you to build more accurate models.
The last thing that I think is very important for these open Azure Open Data Set is that they are on the cloud and they are available to, for example, Azure Databricks, Machine Learning Service, and Machine Learning Studio.
So, you can really consume them from different tools.
And you can also access them through APIs and use them in other products like visualization products like Power BI or Azure Data Factory.
Yeah, it's pretty cool that it's already uploaded and accessible there.
Because, like, one of the data sets is you have the New York City taxi and limousine trip records.
Yeah.
But that's 500 million rows and it's five gigs of data.
So, it would be better if you didn't have to upload that and try to move that around and whatever, right?
Just download it or just ingest it and process it.
Yeah, absolutely.
And again, I did this for the Energy Demand Forecasting Solution.
And the pain points for me as a data scientist was really not only to look for a public weather data source,
but because I found that there are around several weather data that you can use.
But the problem was, like, really to download them and, most importantly, make the hand-to-hand solution working.
Because once you download them, you want to consume them over time.
And having them, like, on the cloud and the fact that you can consume new data and also forecast data,
because it was, again, a time series forecasting data.
So, as an input, I needed the forecast weather data.
It's something that really, really helped me and made my work as a data scientist much, much easier.
Yeah, that's really cool.
So, I know that a lot of the stuff that you all are doing is on the cloud.
And, right, you have, like, virtual machines and ones with GPUs that you can leverage and services and so on.
But I'm sure that a lot of data scientists, even who use the cloud, also work locally on their computers, right?
Absolutely, yep.
Yeah.
So, what does a proper data science, machine learning computer look like these days?
You know, like, you have to get some fancy GPU.
Like, what do you do for a setup?
What do you see people using for setups in your interactions with them?
Yeah.
So, I have to say, most of the researchers, students, and also big corporations I work with,
they all use right now data science virtual machines, especially when I talk and I work with other data scientists.
Because those data science virtual machines, and some of them are also called deep learning virtual machines,
they come with all the different tools that you need as a data scientist, different cluster, GPUs, as you said, the right size.
And they are already there, and you can just start working with these.
And it's true that you mentioned that most of the time, or I would say not most of the time, probably sometimes data scientists,
they still want to use their local machine, especially probably at the beginning of machine learning projects.
So, some of the editors that I have been seeing using a lot are like Visual Studio Code, that of course there is a local app that they can just download.
But other very, very popular editors are like JupyterLab, PyCharm.
So, there are many options out there.
And I have to say the most popular ones, again, are virtual machines.
And then when you have to work on your local machine, you probably use editors such as Visual Studio Code and other tools, again, like PyCharm.
How often do you see data privacy being a problem or a challenge that people run into?
Just stuff they don't want to put on the cloud, or they're not allowed to leave the building as it is?
I see it very often.
I think that is all about the trust, really.
Because when you start a new data science project or like a new machine learning project, it's all about getting to know each other.
So, you work as a data scientist, you work with an external entity.
Again, it can be a big corporation, it can be a university.
And of course, at the beginning, when you are what we call the scoping phase,
so you are defining what is the research problem or the business problem that you want to solve,
what is the data that you're going to use.
Of course, over there, you are building trust.
It's the moment that you are building trust.
And probably you don't use, they just share with you a sample of the data, and you just share with them like a general demo to show like the potential of different machine learning tools and the cloud.
But then I think it's the real moment where you are building trust between each other.
And of course, security in the data space, it's a concern that everybody needs to have.
I mean, we have to be concerned about data because this means that we are aware of what are the different options out there.
And that's why I think that VM, virtual machines, most of the time are the best choice when you work also with external customers and with external data scientists,
because it's a sort of common place where you can just connect using and, of course, performing all the security steps that your customers or, you know,
your research peers wants you to perform, of course.
But it's like a sort of common place where you can share all your experiments or data and so on.
Like a safe, safe middle ground.
Yes, exactly.
This is exactly what it means.
Inside anybody's firewalls and things like that.
Interesting.
That's pretty cool.
So we're getting sort of close to the end of our time.
And I did want to ask you to do a little bit of a prediction for us because you are seeing so many different projects that are coming along,
what people are doing and researching.
So what do you think that machine learning is going to create or do for society or how is it going to change society?
And like, say, five or 10 years that maybe normal people who don't follow this see coming.
I'm a very optimistic person.
So I don't really think that, you know, AI is going to impact our everyday life or our world in a negative way.
I really think that if we are able to just take advantage of what AI and when I say AI, I mean, also all the machine learning algorithms that are behind AI.
If we are able to really take advantage of this, we can really see some improvements in the different processes and different industries such as healthcare.
Yeah, healthcare is the first one that I was thinking of as well.
Healthcare is something because they are, I think, after the finance industry, they are the industry that actually produce the biggest amount of data.
And of course, the more data you have, better your models and objective the results are going to be.
So for sure, if I have to mention a few industries where I see AI being successful in the next few years,
one, as I mentioned, is healthcare.
The second is transportations.
I really think that not only driverless cars are going to improve our everyday life, but also what we call the predictive maintenance,
that is, you know, predicting when a machine is going to fail, is something that is going to have a huge impact in the transportation to field.
And the third one is, I would say, probably is less interesting, but still it's an industry that we all need to interact with.
That is the finance industry.
So the finance industry, why I see the biggest impact there?
Because actually, they are the ones who have been using machine learning for longer time.
But I have to say that this interaction between AI and machine learning is something new to them as well.
So I think that we are going to see interesting solution there as well.
And probably is going to democratize what sometimes looks and sounds inaccessible to many people who are not experts in economics or trading.
So I think these are the three main industries where we will see a lot of changes and impact from the AI world.
Yeah, those are all definitely, I think healthcare for sure.
There's just so much data and it has the opportunity to be just so transformative, right?
You think of the cancer diagnosis and the other things or, and, you know, probably pharmaceuticals as well.
It's kind of tied into that, right?
Like creating new drugs in a much quicker way.
Absolutely.
And if you think about healthcare, beside the two excellent examples that you just made, also there is all the insurance word for healthcare.
Also that can really help facilitate some of the processes that sometimes patients have to go through.
And if we can optimize time and make these processes better for, you know, people who need healthcare.
I think that also is a very, very good improvement.
Yeah.
One other I'd love to see is the energy sector around renewable energy and stuff like that.
There's, it seems like that a lot of good stuff could happen there.
Totally agree.
All right.
So I guess before we call it a show, I'm going to ask you the two final questions I always ask.
The first one is if you're going to write some Python code, what editor do you use?
I already mentioned this editor is a Visual Studio Code.
I have to say that I really like right now the Python extension and the Azure Machine Learning extension.
The Azure Machine Learning for Visual Studio Code that previously was called Visual Studio Code Tools for AI is an extension that you can use as data scientists to build, train, and also deploy your machine learning models, of course, on the cloud.
Also on the edge, you can leverage the power of Azure Machine Learning service.
Other editors that I really like is our Jupyter Lab.
I think I really like it because it provides a high level of integration between notebooks, documents, and different activities.
And then the other one that I mentioned, and I think that data scientists should also consider, is a pie chart.
Because I think that it's similar to Visual Studio Code that they both have interesting features such as a code editor, errors highlighting, and also a powerful debugger with a nice graphical interface.
They seem to have a slightly different philosophy, Visual Studio Code and PyCharm, but they're both really good.
Excellent.
And then, of course, the Jupyter stuff is like standard data scientists.
You've got to fit that into the workflow somewhere, right?
Absolutely.
Awesome.
All right, and then finally, a notable PyPI package.
Not necessarily the most popular, but something that folks maybe haven't heard of, but it's really cool that you want to share.
Again, I'm very passionate about time series forecasting.
And the package that I have been using a lot lately is the forecasting package with AutoML.
So for forecasting tasks, automated machine learning uses these preprocessing and estimation steps that are specific to time series data.
So the preprocessing steps will, for example, detect time series samples frequency, if it is hourly, daily, or weekly.
And they create new records for missing data for missing time stamps to make the series continuous.
And then they can also input missing values in the target and feature columns.
And they can create grain-based features to enable fixed effects across different series.
So this is, again, it's a very nice forecasting package that you can use with the AutoML config object within Azure Machine Learning Service.
And I have to say, I have been using this a lot.
Yeah, that's cool.
Yeah.
Yeah, that's really cool.
Their example on the PyPI page is like eight lines of code.
Yeah.
It's pretty incredible.
Yeah.
Super cool.
Okay.
Well, that's a good one.
And I hadn't heard of it either.
So quite nice.
Yeah, yeah.
You should try it out.
Yeah, definitely.
All right.
Well, thank you for sharing what you've been up to and all of your experience working with all these other groups, universities and companies and so on.
It's been great to chat with you.
Thank you.
Yeah.
And people want to get started with some of these things you talked about.
You know, what's Final Call to Action?
Where should they go check out?
Where should they go?
There are a few links that I would like to share.
The first one is aka.ms slash Azure ML service.
So it's very easy to remember.
And the other one is aka.ms slash Azure ML for VS Code.
And if you want to get started, the last link is aka.ms get started Azure ML.
So these are some of the links that you can look at if you want to learn more about Azure Machine Learning service, Azure Machine Learning for Visual Studio Code.
And if you want just to get started with Azure in general.
Yeah, that sounds great.
Those are good links.
And I'll be sure to put them in the show notes so people can check them out.
That's great.
Thank you.
Yeah, you bet.
Thanks for being on the show.
Thank you.
Bye-bye.
This has been another episode of Talk Python to Me.
Our guest on this episode was Francesca Lazeri.
And it's been brought to you by Linode and Talk Python Training.
Linode is your go-to hosting for whatever you're building with Python.
Get four months free at talkpython.fm/Linode.
That's L-I-N-O-D-E.
Want to level up your Python?
If you're just getting started, try my Python Jumpstart by Building 10 Apps course.
Or if you're looking for something more advanced, check out our new async course that digs into all the different types of async programming you can do in Python.
And of course, if you're interested in more than one of these, be sure to check out our Everything Bundle.
It's like a subscription that never expires.
Be sure to subscribe to the show.
Open your favorite podcatcher and search for Python.
We should be right at the top.
This is your host, Michael Kennedy.
Thanks so much for listening.
I really appreciate it.
Now get out there and write some Python code.
I really appreciate it.