►
From YouTube: Using the new Expression Transform in ML.NET
Description
Showing how to use the new Expression Transform in ML.NET.
Code - https://github.com/jwood803/MLNetExamples/blob/master/MLNetExamples/ExpressionTransform/Program.cs
Expression Transform Documentation - https://github.com/dotnet/machinelearning/blob/master/docs/api-reference/expression-estimator.md
ML.NET Transforms Playlist - https://www.youtube.com/playlist?list=PLl_upHIj19ZyJf-ItL5Mey9mniPiTKtvv
ML.NET Playlist - https://www.youtube.com/watch?v=8gVhJKszzzI&list=PLl_upHIj19Zy3o09oICOutbNfXj332czx
Contact:
Twitter: https://twitter.com/JWood/
Blog: https://jonwood.co/
Gear used (affiliate links):
Mic - https://amzn.to/2YEXtxI
Mouse - https://amzn.to/2ZtASoQ
A
Hey
everyone,
so,
with
the
release
of
the
new
1.5
preview
version
of
a
mod
net,
you
get
a
couple
of
cool
things,
and
one
thing
I
want
to
highlight
in
this
video
is
something
that
was
new
and
I
released,
called
the
expression
transformed
and
we'll
go
over
more
into
what
that
does
as
we
go
through
it.
The
first,
let's
get
started
here
with
some
code
and
I'm
in
a
blank
dynacord
console
project
and
I
will
install
the
pre-release
of
ml
done.
That
here.
A
A
The
first
one
is
going
to
be
a
floats
users
experience
the
second
one
is
going
to
be
a
boolean
that
says,
if
they're,
if
the
employee
is
a
manager,
the
next
one
is
gonna,
be
a
string,
it's
going
to
be
their
their
title,
their
job
title
and
last
I'm
doing
injured.
Yeah,
add
number
of
teams
managed,
and
this
is
going
to
be
related
to
the
is
manager
boolean.
So
this
is
true.
We're
gonna,
have
a
number
of
teams
managed
right
with
our
input.
Schema
sets,
let's
add
a
few.
A
Some
new
items
here
and
I'll
just
paste
these
in
here.
So
the
first
one
here
is
not
a
manager
has
one
year
of
experience
and
their
develop.
The
second
one
is,
they
are
manager,
they
have
nine
years
of
experience,
they're
a
director
and
they
have
two
teams
that
they
manage
the
last
one
is
not
a
manager
form
years
of
experience,
and
they
are
an
analyst
so
with
that,
we
need
to
create
an
odd
dataview
based
on
the
enumerable.
So
we
use
the
context
at
data
load
from
innumerable.
A
Just
pass
that
in
so
now,
let's
create
some
expressions
and
this
all
gonna
be
transforms
here.
First
one
we
use
a
transforms
that
expression.
This
takes
in
a
few
parameters
here,
the
first
one
is
going
to
be
kind
of
the
output
name
of
your
of
your
expression.
I'm
gonna
do
a
couple
of
these
to
kind
of
show,
different
things
that
you
can
do
with
them.
The
first
thing
I
do
is
call
it
a
square
root,
I'm,
just
good
to
square
root
and
give
that
an
output.
A
The
next
parameter
is
going
to
be
the
string
of
our
expression.
Now
the
expressions
here
are
going
to
be
the
same
as
lambda
expressions
that
you
may
be
familiar
with
in
c-sharp.
If
you
are,
this
is
going
to
be
pretty
easy
to
pick
up,
but
if
not,
hopefully,
I'll
explain
it
in
a
way
where
it
makes
sense.
A
So
the
first
part
of
expression,
as
in
the
init
lambda
expression,
is
gonna.
Be
your
your
parameters,
your
inputs
to
the
expression
with
our
square
root
output,
I'll,
have
only
one
input
and
I'll
name
it
egg,
so
you
can
name
it
whatever
you
want
to
I.
Do
the
arrow
function
and
the
expressions
they
come
with
several
several
methods
that
you
can
use
and
since
this
is
a
square
root,
output,
I
use
the
square
root
method
and
I'll
pass
in
the
input
and
then
the
next
you
have
a
parameter
string
array
of
column
in
place.
A
This
is
where
you
can
tell
the
column
names
that
you
want
to
use
as
the
output,
so
here
I'm
going
to
use
years
experience
and
so
the
user
of
experience
column.
Those
values
are
going
to
be
put
into
this
expression
as
the
input
parameter.
So
that's
one
expression,
there's
a
pinned
another
one
it
and
you
can
append
as
many
as
you
want
to
do.
A
A
With
those
inputs,
I'm
gonna
say
if
X
is
true,
I'll
use
the
ternary
expression
here.
So
if
X
is
true,
I'll
output
Y,
if
it's
not
true,
I,
just
output
0
in
the
my
inputs,
the
first
input
I'm
going
to
use
is
the
is
manager
thing,
but
instead
of
using
the
straight
string
or
the
column
name,
you
can
do
something
else
by
using
the
name
of
keyword
here
and
we
can
use
the
salary
input
that
is
manager
property.
A
A
Let's
do
one
final
expression
here
this
one
I'm
going
to
do
two
lower
output,
so
I'm
gonna
take
a
string.
The
title
here
and
I'm
just
gonna
make
it
all
two
lower,
so
we
input
it
with
a
capital
first
letter
when
our
output
is
gonna,
be
all
lowercase.
If,
for
our
expression,
taking
a
single
input
and
when
used
a
lower
method,
pass
it
into
it
and
then
we
use
the
salary
in
put
a
title.
Is
our
info
column
all
right?
So
that's
our
expression.
Python
rather
do
a
couple
other
things
here.
A
So,
in
your
context
that
data
that
create
enumerable
and
like
with
our
machine
learning
models,
we
have
an
input
schema
class.
We
also
need
an
output
schema
class,
I'll
name.
This
expression
output
now
to
fund
that
in
a
second
first
I
will
finish
this
line
here.
I'll
give
it
the
expression,
transform
data
and
I'll
tell
it
to
reuse
real
object
of
false.
A
A
So
let's
run
this
and
see
what
we
get
here
so
kind
of
messed
up
here
in
our
expression
we
said
square
root,
squared
root
out
used
to
be
output,
it's
a
square
root
output
and
these
needs
to
match
our
output
class
here,
just
run
that
again,
but
most
messed
up
and
what's
a
updated,
the
class
that
I
have
to
update
the
property
here
and
apparently
I
didn't
finish
the
new
lon.
Here
we
go
alright.
So
let's
see,
let's
compare
it
back
to
our
original
data
here,
so
square
root
of
one
is
going
to
be.
A
A
A
Alright,
so
that's
kind
of
a
brief
introduction
to
the
new
expression
transform
I
will
link
to
a
document
file
in
the
in
Wanda
net
repository.
That
gives
us
a
whole
bunch
more
information,
including
all
the
things
that
you
can
do
with
expressions
as
well
as
well
as
all
the
functions
that
you
can
use
besides
square
root
and
lower.
There
are
tons
of
others
that
you
can
use
alright
I
hope
you
enjoyed
the
video
and
I'll.
See
you
all
next
time,
thanks.