The feature below is the size of the ears
So that's two different features that's two different dimensions and
it creates a plane you know a wall or perhaps a youtube screen
[Snazzy hecking intro]
How's it going guys? How is every single darn thing because i am happy that
you're here i hope you're happy to be here welcome
welcome if you are new here it is a pleasure to have you.
My name is Andrew (from DataLeap) on this channel we are trying to get you a six
figure salary in six months as a data scientist and
no matter what part of the journey you're on we're going to bring data
science down to earth in the most dissectible in the most delectable
way possible with comedy with a bit of spice in the very nice theoretical
modeling and today we are going to finish off the
isolation force versus svm video that we
[messed up that line]
and today we are going to finish
off the isolation forest versus svm videos that
we released a couple weeks ago and today i want you to do something
right before i get started i want you to like this video give it a big ol like
because that is a way that i can continue making
content for you by defeating that evil youtube algorithm
and the other thing that i'm hoping for is that you
a person who is new here has already subscribed because that way you'll be
able to keep up and stay up to date with the best data
science industry education you could possibly receive
so with that and a big thanks to kenji data professor and everyone who has
supported the channel so far let's get started today we're going to
talk about the support vector machine and what you're looking at in this
animation is what i am going to explain to you very
soon now this animation was not created by me as much as i would love
we are going to put the actual credits to the people who made this animation
down below but it truly is a beautiful
visualization and if you are not quite sure what it means we are
going to get there don't worry but let's start like we
always start
let's start where we always start let's start with a furry example
this very example involves a two-dimensional feature space whoa did i
lose you yet hopefully not this is a feature space
whether you've seen one before or not we have a feature on the left
side which is the amount of indoor-ness or outdoorness uh and on the
bottom we have another feature the feature below is the size of the ear
so that's two different features that's two
different dimensions and it creates a plane you know a wall or
perhaps a youtube screen so what we're looking at here
is cats on the right side because they seem to have smaller ears and they
usually are indoors and dogs on the left side
because they usually have larger ears and they're usually
outdoors now this allows us to very handily draw a line right between them
okay so we're done no we're not done yet because
this is just a guess this is a good guess
let's say but we have to make sure this is the
best way to separate the dogs from the cats that way when new
cats and dogs pictures come in we want to be able to use this line and
definitively say hey because of our training data because of
the line we drew we are very certain this is a dog or this is a
cat so we need to draw some vectors and this
red vector that i've drawn here and here and here would be able to
simulate the distance to the closest point that we're trying to
separate from the dogs and the cats something like this black and white cat
over here or this little golden cat right there
and of course this little dog that looks like a cat
and this little dog that looks like a cat if you don't think these dogs look
like cats you might be right and i just don't
know what dogs look like but if you agree with me that these dogs
and cats are on the fringe that is what the support vector machine
model is looking for these vectors are supporting the model
itself the red lines are trying to support the
line of best separation by creating this gray zone of neutrality
this is how the model grades how good of a job it's doing you see the larger the
gray area the better job it does so if this line
was slightly askew to the left or the right
that gray area would be smaller because it no longer becomes such a good
line of fit the vectors the red lines are going to be smaller
so if we maximize the size of the vectors we maximize the size of the gray
area that way we are supporting our model and
the vectors are supporting it i support vector machines don't you
vector machines
uh let's continue on with more visualization
so as you can see here we have that neutral zone that we talked about before
so that's what we're trying to maximize but let's move forward and look about
errors errors are when you classify a dog as a
cat or a cat as a dog now when you're talking about animals it
doesn't seem that malicious to have an error but
you can actually do a very big boo boo doo doo by miss classifying a
fraudster someone who uses your credit card in
tahiti and buys a lot of thousand island dressing is looking
pretty suspicious and we don't want to accidentally mislabel him as a normal
transaction at the same time if you end up using a card you haven't
used in a long time in a different state it might be a little bothersome to have
to do a two-factor authorization or receive some sort of text from your
credit card company confirming that it's you
but that little extra line of security that misclassification as your normal
transaction as a fraudulent transaction that's a small price to pay compared to
the big price of letting a fraudster through
so it really depends on how you want to grade
your errors and luckily we do have a parameter a hyper parameter we
can insert into the model that tells us how are we going to
measure errors how many errors can we even allow
that's c c is a value that as it rises it makes it so that we
can accept fewer and fewer errors so we see
when c equals 0.01 then the gray area is a lot larger than before that is good we
want to maximize that neutral zone but we do have a lot more errors on our
hands you see this neutral zone here
gradually decreases as we increase c that way
we are a lot more careful with what we consider a dog
and a cat if that's a little too technical
or maybe not technical enough you can comment down below and tell me exactly
what you are hoping to get out of this lecture
and we can make it into a brown bag live stream if you want to ask me more
questions in person but i'll always answer a comment down
below you guys know this and let me take this as a moment to say
have you checked out a DataLeap authentic playlist
we have many playlists from this or data we have two minutes of python we have
the cracking the data science interview live
and we have the
we have how to make six figures as a data scientist
these are all playlists that i'm going to link below and you can try them out
to have a streamlined experience in becoming a data scientist today
now let's continue so what if we cannot separate these two
well that's kind of problematic but not so
much if we think about it because where there is a plane there is
a way this is a plane a two-dimensional feature space
a two-dimensional plane but what if we can
bring into the third dimension a three-dimensional feature space
then we can cut it with a plane a second-dimensional slice
through that three-dimensional space so what we're visualizing on the left side
is this curvalicious asymptotic looking dual line on the right side you see this
animation that we see over here on the left
is actually in some way if we overlay it correctly going to look the same
as the picture on the right that's kind of funky right just to prove
it in case you don't believe me we're going to add that gray zone of
neutrality and you see on the left visualization that that gray
zone exists separating the closest red point and the
closest green point that's beautiful
i love visualizations and that is the crux
of a support vector machine now in the last video isolation forest i was going
to rate these two models on explainability
and trainability but explainability is going to be based
on what you guys think and personally i think that these two are both very
explainable there's an easy way to tell exactly which features are being
regressed most heavily and which data points are affecting the
model the most the data points that are
closest to that line of delineation that line of separation
now this model involves finding an optimal solution not a random one so
therefore it trains a lot slower it takes a lot more training time
than the random isolation forest and it
actually performs better when you have less information of
course it has to be a randomly sampled representative sample
of your population of course
that might just contribute to it being more overzealous
and more underfitting a specific type of population depending on what you're
looking for that's where the random isolation force comes in you see it's
random so it'll always have a very similar runtime and the more data
that the isolation force gets the more specific
it gets and the better it performs that is not the case
in the support vector machine where it has to really make curvalicious paths
for every specific snowflake of a data point
and that might be troublesome for your model so
how did i do in terms of trainability and explainability well you can grade me
down below in the comments section and speaking of the comments section let me
head down there and read some comments that really warned me
to the bottom of my heart if you got this far into the video get
yourself a big old pat on the back because i want you to know i appreciate
you and i want you to subscribe yes
subscribe i have amazing content like
collaborations with data professor on the zero data science bible the first
21 days that you should be spending on data science and of course that goes
hand in hand with the 66 days of data that kenji
has been championing for a long time uh at least a week or two
at this point but there's a discord server with hundreds of people from all
over the world and if you want to be part of that
community it's never too late to start your 66 days of data
thanks kenji speaking of ken i just finished a collaboration with him
that i released on my channel and he released on his channel we cover
my story from hedge fund to fang company and we cover ken's take on his path as
data scientist and a couple of funny alluring
seductive questions flynn rider does it when he goes like
oh like oh um oh yeah that you might just find
pretty interesting of course if you have not met me yet
i have a two-minute trailer on my channel talking about how you can become
a six-figure data scientist where i destroy my smartphone
hey i'll see you when we leap you just have to say that you're fine
when you're not really fine but and it is as funny as you think and it
was a lot of fun to make so if you like this video please give it a
like if any of this content sounds interesting to you
please hit that subscribe button and hit that bell button so you're notified
every time i upload or do a live stream because that is a
good opportunity for a small creator like myself to get
to know the community itself i'm starting a new series about the
community where i do small one-on-ones with the people that
comment and react and are part of this community engaging
and be trying to become a data scientist and i'm of course going to upload a
couple of smaller skits and sketches about living in the bay area and how to
become a silicon valley data scientist here that's a lot of editing for me
let's head on to the comment section you guys stay awesome peace this comment
came from discord from one Aaron Petry or Petrae
i now set my schedule schedule to i set and now set my schedule schedule
to when Andrew from DataLeap goes live link for anyone else thank you aaron so
much that touched my heart that's honestly so rewarding to hear i don't
need anything else all week thank you Aaron this is also from
discord from a mr Shubh-hamai of course i will butcher
your name for fun and for profit if you want me to oh i
didn't notice the moment you actually fell
into the pool we leap
there is some real dedication to make youtube video hey shabu mai
you're the real hero here thank you for engaging with that video and i'm glad i
could brighten your day with stepping into the pool on discord i
said hey guys i had the pleasure of answering dominique james
question on how to introduce a daily plan to data science and create a
top-notch superhuman data scientist from scratch
the video link goes directly to answering this question if you want to
be featured in the next video message me directly or leave a comment
that offer still stands aaron replied - Same Aaron as before.
Great video very informative but did have me questioning
alternate realities and timelines
Dom actually responded and he said you're a boss smooth like gloss pure
like silver in furnace no dross.
[Oh yeah sound effect]
Get this man to a publisher asap
and then he said thanks for responding to my question for a friend ashley b
follows up and says can i be that friend or or what but seriously great video
dom continues the conversation and says we can both be that friend ashley i
might be jumping on kaggle since andrew from daily made the
recommendation this was wholesome as heck and i said you guys are making
my day ashley says do it i'm working on the python micro course today let's hold
each other accountable and then dom says what lesson are you on
connections being made every day if you want
community like this let me know so i can add you to the
discord on youtube on the video forbidden to ask this in tech interviews
featuring Ken Jee Ravi Kiran says just subscribed to this
amazing channel waiting for good content lots of love you're the man ravi won't
let you down Calvin Pinto is back on the video learn
all of python in 10 minutes with if professor meatball would teach
in my college he would surely complete the entire data science
syllabus in a week truly how is he so
accomplished he does have a doctorate on the same video andrew jaffe says
great explanation all around can't believe you actually managed to
keep it at 10 minutes on the dot that is a time doctor's secret
dubrov says wow i wish professor meepa was my computer aside professor
me too if only and joe galang says this was basically the entire mitx
python course in 10 minutes wow wow indeed in fact wow for you for
staying all the way to the end if you want a copy of my resume template
and you still haven't gotten it yet i think i have maybe 20 more and
now's your chance to grab them i'll link to the video that tells you how
and if you're not having a good day tell me why
because i want you to have a good one that's it for now
more data science on the way peace