hello everyone my name is Luis Cabrera
and I work in the azure machine learning
organization but today we're going to
cook ourselves our recommendations model
one of the missions of Cortana analytics
is to in a sense democratize machine
learning we want to make sure machine
learning is available to everyone not
just to data scientists but also to
developers we want to make sure that
everyone has the capabilities to harness
the power of machine learning one way in
which were doing that is by providing to
you what we call machine learning api's
this machine learning api's are
completed services that you can find
today in the Cortana analytics gallery
these are already baked they use machine
learning capabilities but you do not
need to be a data scientist in order to
use them
today we're going to be talking about
one specific API called the
recommendations API let me start with a
story when I was a kid and I wanted to
watch a cook a cooking show in my native
country of Guatemala there were only two
channels that I could watch at any time
so my probability of getting the best
channel at any time was about fifty
percent and that was great but today my
children you know if you have a service
like xbox you really have over a hundred
thousand streaming options to prick from
which makes it very very hard to find
the content that you need so actually
for the Xbox we built recommendations
engine and in order desire to
democratize or to bring to the world
this capabilities we put these
capabilities together in the
recommendations API so let's get cooking
what you aren't going to need to create
a recommendations model is some catalog
data these are like the the items that
you want to sell for instance or that
you want to recommend you will need some
usage data which represent the previous
transactions that you have seen in your
application or you or your retail site
for instance so you mix these two pieces
together I will show you what these
files look like you you mix them in this
beautiful recommendations builder you
let it bake for a few minutes and then
you are ready to serve in your favorite
website or mobile application okay so
let's get cooking here so first of all I
am going to gallery dot Cortana
analytics com where I can see several
machine learning related resources for
you including machine learning AP ice so
if i click on machine learning api's it
will show me a catalog of different API
study we have available for you for
instance we have faced api's text
analytics computer business API etc but
today we're interested in the
recommendations API so I'm going to
select that one where you can now you
can see a description of the service
links to documentation and and so forth
you will notice that you can also sign
up for the service I have already signed
up so I am NOT going to do it right now
but I have to tell you that you actually
are able to sign up for ten thousand
three transactions per month enough for
you to be able to play with the service
and once you have signed up for the
service you can use the recommendations
UI which is in beta right now and i
actually have already opened the service
which is right here once you are in the
in the recommendations you I you can
create new projects let me create a new
project i will call it connect and this
project is going to be my container
where i can add the usage the catalogue
files and where i can later train my
model so it just created the the model
and step-by-step it asks me to add a
catalog file so i actually have a
catalog file that with transactions from
from the microsoft store actually so i
am going to use my catalog from the
microsoft store as you can see it was
able to upload the catalog now the
question that you may have is what does
that catalog actually look like let me
show you so that catalog has a very
simple format it shows you that there is
a items the identifier for each of the
items in the next row it will give you a
description of the items and then a
description of what type of item is in
my catalog so in this case these are all
items from the microsoft store for
instance so you know i want to be able
to recommend to a customer when they are
buying one product what other type of
product will make sense for them to to
purchase as well it will allow them to
discover those items faster as well so i
need information on metadata about my
catalog and then i also need information
about each of the transactions
in in column a here I have the actual
identifier for users and in in column B
here i have the identifier for
particular products so for instance in
in the first row here I know that person
with id3 BFF DC blah blah blah but item
QR 2000 11 which may be a piece of
software or a piece of hardware for
instance so the system is able to take
the the catalog and then the usage files
and I will just add a usage file here
and you can see that it's starting to
upload the usage file as well so so once
it has both of these pieces of
information it can crunch the
information to create a recommendations
model for you I should point out that
usage files should be less than 200
megabytes in size and if you have more
than 200 megabytes of information you
are allowed to upload several files okay
so once once you have the catalog and
usage file you can actually create a new
build the the first file uploaded and I
am in the process of uploading a second
first once the files have uploaded to
the system you can create a new build
and you can pick a type of build we have
two types of builds recommendations and
frequently bought together we also have
a ranking bill but that's an advanced
feature that you can check in the
documentation for it now so let's say
that we want a recommendations build and
then all I will have to do here is is
click build and then this is going to
take about 30 minutes
okay so after the 30 minutes we are able
to see our build and we can actually
score it so in this case I have to tell
you that I do that images and you don't
see how i am adding the images but when
you select an item you will be able to
see the recommendations for that item so
in this case we have Mike Wazowski the
Infinity figure and you can see the the
recommendations for that item right here
are all that infinity figures which
makes sense you know if a child by its
design and they may want to buy the
other ones as well so if someone on the
other hand were to buy a game like
Assassin's Creed which is a more mature
game we will expect to get
recommendations that are a little bit
more mature right so sage Anarchy Reigns
men in black fuse which makes sense
right these are other games for xbox 360
which people purchase when they when
they purchase the assassins creed game
so in this case you can see how as I
pass one item to the recommendations
engine it is able to return to me all
their items now this is all great and
you already have a model by now but I
have to tell you that if you go to to
the gallery you are also able to
download the coals to do exactly what we
did in that you I it's actually pretty
simple and I'll walk you through it this
is this is actually the exact code that
you download in the sample so all you
need to do is just like with it in the
UI you need to create a model which is
what we're doing there on the only
create model call then you need to
import a catalog and a usage file which
which are the selected lines right there
once you have imported those lines you
want to trigger a build which is done in
the in the next line
so you want to build a model you pass at
the model ID and then the rest of the
code really is in a tight loop just
waiting for that bill to be completed
once the build is completed you you need
to update the model to use that build ID
or that build as the default build this
will allow you in the future to have
several bills and then select which one
is the one that that your model should
be returning recommendations from so it
was actually very simple and you notice
how we were able to use the UI to create
a recommendation sending but you can
also automate it in code as well I
should point out that you can retrain
the model as you get new usage data as
well I should point out that there is
other related content that you may be
interested in we actually gave a
presentation on intelligent retail
scenarios at the Cortana analytics
workshop and it's on channel 9 so this
is the link and you can find me at Lewis
Scott microsoft com and that's my
twitter tag as well
thank you so much and it has been a
pleasure spending some time cooking with
you
Wednesday, February 4, 2026
Cortana Analytics Building a recommendations model in 5 minutes!
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment