>> You're not go want to miss this episode of the AI show.
Do you have time series data?
Want to predict the future?
Well then, you're going to want to watch
all about automated machine learning and
a brand new model style
for time series forecasting. Make sure you tune in.
[MUSIC].
>> Hello and welcome to this episode of the AI show.
We're going to learn about time series forecasting,
did I get it right?
>> Yes.
>> Tell us who you are, and what you do my friend.
>> Hi everyone, my name is Sabrina Kurtasio,
and I work on Automated Machine Learning
as part of Azure Machine Learning.
So what we want to focus on is forecasting.
>> Okay. Let's start with automated machine learning.
>> Sure.
>> Tell us what that is, just briefly,
and then we'll get into what forecasting is.
>> Sure. So automated machine learning,
is essentially an easier way for you to do and have
machine learning in AI solutions
without needing the domain expertise.
So you don't need to be a professional data scientist
to have models and use machine-learning.
>> Fantastic. So let's talk about time series forecasting.
What is that in a nutshell?
>> So time series forecasting is a way to predict future trends.
We have two very common scenarios.
>> Okay.
>> So if we go ahead and switch here,
we can see that our two common scenarios are
demand and sales forecasting.
So demand can be something like predicting
how much energy a certain city is going to have,
or sales can be just the revenue.
>> I see. So when I'm looking at time
series and you're looking at revenue or predicting future,
you have to obviously have a series of things, right?
So what capabilities exist for that?
>> Of course. We have a bunch of capabilities,
the first being our time series learners.
So there are specific models that worked really well with,
like you're saying those features; time, revenue.
So those are ARIMA and Prophet.
We also have DNN capabilities which works
really well for large data,
and we have grouping, holiday detection.
So we want to add a lot of context to your data to make
sure you're getting the best predictions possible.
>> So are these models that we
can build using automated machine learning,
this is what you mean by capabilities?
>> Yes. So capabilities, essentially you'd come in with your data.
Once we have your data,
we're going to go ahead and recommend like Netflix.
We're going to recommend models to you,
different pipelines that you can go and use in production.
So you don't have to worry about,
well how do I tune the model?
What are the best inputs?
We will give that to you.
>> So this is different from
automated machine learning that we had
before because it's a different style model? Did I get that right?
>> Yes. So it's two differences.
The first is that we now support the time column.
Before you can do regression,
but you wouldn't get a forecast,
you would just get a revenue.
So let's say you're predicting revenue, you would get a number,
but you wouldn't see over a month how that's trending.
So now time series forecasting would give you a forecast.
>> I see. Because when you're doing
regular regression it uses the time column,
but it doesn't understand
that it's actually a sequence of things happening.
>> Exactly.
>> So when I want to do this,
what am I required to have in my data?
>> Of course. So we can go ahead and look at that.
So I have an example here.
The first is a day column,
then a store, sales,
and week of year.
So this is just a small sample to get us started.
The first thing that we're going to need is a target column.
This is true for any machine learning experiment in general.
This is what we're trying to predict.
>> Got it.
>> So this is our sales. The next thing is
a column representing a valid time series.
So our time series is our date column,
and valid just means it has a consistent frequency.
So if you're providing a daily data,
it needs to be completely data,
daily. You can't skip.
>> I see. So what if you have,
because I'm looking at these columns and it feels like,
do you just have
the date if you're doing day series and the value one to predict,
or does it use some of the other features in there as well?
>> So this is a really great question.
A lot of times users will come with
external data maybe census information,
and what we try to do to
match that and make sure you have enough context
for pattern detection is we bring in open datasets.
>> I see.
>> So things like holidays.
If you have daily data, we can bring that extra context.
We're looking at bringing in weather,
things like that to help you.
>> The models will take that into account as well.
>> Of course.
>> So if I already have,
because I think there's two things
that you are mentioning that are pretty cool.
If I already have context of where
data with the time series it will use that to predict,
by then we can add things like
open datasets that say, for example,
you might sell a lot on black Friday for example,
and you want to be able to give
that as another feature. Is that right?
>> Of course.
>> All right. So I feel like we've talked
about this, can you show us a demo?
>> Yes, of course we can.
>> All right.
>> We recently launched our Azure Machine Learning Workspace.
This is a dedicated data scientist,
series and data scientist workspace
that's different from the portal,
and we're going to focus on the automated ML type.
So we can create an experiment completely with no code.
>> Okay, let's see this. That feels really magical.
>> So we're going to go ahead and create an experiment.
We can go ahead and name this a "Forecasting sample."
We're going to select the "Compute."
A compute is, you can create one from here
too it's just the VM we want to use.
>> Okay.
>> It will automatically find
the Blob Storage connected
to your resource group and subscription,
so you don't have to worry about that.
>> Got it.
>> I have a dataset here called Dominick's OJ.
So this is just an orange juice dataset
with some sales and how much it's selling.
>> That's cool.
>> So the first thing that you're going to notice
here is we got a preview of the data.
You can choose what you want to include and un-include or ignore.
So we see here we have the week starting,
this is our time series column.
>> I see.
>> Right. We have a store,
a brand, and a quantity.
So what we're going to do is we're going to select down
here that this is a forecasting.
>> That's the new drop-down. Okay, cool.
>> Before we didn't have forecasting.
The next is the target column.
This is what we talked about, the thing we're trying to predict.
So here we're trying to predict the quantity.
How much orange juice did I sell?
>> Got it.
>> The next is our time column,
which is our week starting.
Finally we can actually group by.
So let's say that you wanted to know how
much a store sells of a certain brand of orange juice.
You're not interested in just overall sales,
but you want specific detail.
>> I see. So that way you're not
just building a model that you put the store,
all the stores in and it says,
"Full" instead you want to be able to have a context
based upon a particular field, which in this case is the store.
>> Exactly.
>> Got it.
>> So maybe we want to predict for store two how dominant sold.
So we can say we want to do it by store and by brand.
The next thing is a forecast horizon.
So this is the only technical input
and I wouldn't even call it that,
that's just how far out you want to predict.
So if you provided me maybe three months of data,
I'll probably predict the next day or two.
>> Okay.
>> It's usually a very proportionate in that way.
>> That's interesting because then,
like when you're training and I'm imagining
that when the model's training,
it needs to be able to split the data
in a certain way to be able to see how well it does.
>> Yes, exactly.
>> Got it.
>> So we can go ahead and enter any,
not any number but a good number.
Here I'm going to suggest 40
because this is a rather large dataset.
>> Forty is 40 days, 40?
>> This is really cool in that it
grabs the frequency from your data.
That's why we require consistent frequency.
It will say if this is daily that you're passing in,
we're going to follow that same pattern.
>> I see. If it's an IoT device that's doing it by the minute,
if you put 40 it's 40 minutes.
>> It's 40 minutes.
>> Got it, cool.
>> Yeah, exactly. We do have advanced settings.
We're not going to dwell on this too long,
but I wanted to note that we do have
the auto ARIMA, we also have Prophet.
So these are really big in the time series space.
We have other options that you have there as well.
>> Awesome.
>> So I already ran this ahead of time
as machine learning does take a while.
So we're going to go ahead and head back, and right here.
>> So this is the same thing but already pre-baked [inaudible].
>> Exactly
>> Okay, got it.
>> So we can go ahead here and you can see
the Spearman correlation was the metric that we specialized on,
you can see that auto ARIMA and Prophet were used.
So you get all of your different models here.
What's really neat about this is if
you are new to machine learning,
you can get the download the best model
option and deploy the best model, all with a click of a button.
>> So you don't really have to do any of the wrapping and
then writing your own scoring file etc. It's all in there.
>> Nothing.
>> So I'm looking at this graph and it's interesting,
each blue dot represents
each of the run than it did with a different model.
>> Yes, exactly.
>> So how high it is on the Y scale is how well it did?
>> Exactly.
>> So that orange line says for the first one we did,
we were not very good;
and then it jumped up, and then all of
the other models are the ones that are, okay.
>> Yes.
>> That's awesome. When you click on "Download best models",
what does it download?
>> So this is a pickle file.
So if you're a data scientist background,
most of the time you're not just happy with what we give you.
You usually want to go ahead and configure it,
tweak it, do analysis.
So this gives you that flexibility to go and play with a model.
>> That's cool.
>> We're also OnyX compatible
which means if you want to use this with
Py Torch or another open source resource,
you can go ahead and do that.
>> This is amazing. Where can
people go to find out more about this?
>> We do have our documentation.
So that's the number one place I would recommend.
We are the first automated MLMS docs.
We are the first thing that comes up when
you search automated ML on both Google and Bing.
>> So if you bingo with Bing it's good?
>> Google or Bing is good.
>> That's right. Awesome.
>> We're flexible. So you can find everything here.
You can also find integrations that we have with
many other products such as ML.NET,
HDI, Insights and Power BI.
>> Fantastic. Well, this has been amazing.
Thank you so much for spending some time with us.
>> Of course.
>> Thank you so much for watching.
You've been learning all about how to use
automated machine learning to do time series forecasting.
Thank you so much. We'll see you next time. Take care.
[MUSIC]