Beautiful.
So now that we've got our environment set up we've got our Jupiter notebook running or Jupiter notebook
server running.
We can create a new Jupiter notebook and get started on some code.
So let's load that up I'm going to maximize this window so I'll give it a name here.
We'll go end to end something nice and simple end to end.
Heart disease classification and in good communication style we'll put a mark down heading something
simple.
Predicting heart disease using machine learning then a little one liner.
So this notebook looks into using various Python based machine learning and data science libraries which
are our tools in an attempt to build a machine learning model capable of predicting whether or not someone
has heart disease based on their medical attributes.
So that's probably more than one line.
We could probably concise that a little bit but that's not our focus our focus is writing code and applying
it to the framework here.
So this is what we want to work through.
This is what we're starting to do we're starting to apply the tools that we've learned to our machine
learning framework in the scope of a full blown end to end machine learning project who you can feel
the excitement.
So how do we start off.
Well the first thing is probably good to outline our approach.
We're going to take the following approach.
So the first step is Problem Definition.
We've kind of done that with the opening line.
The problem definition too is data will look at what data we're going to use to work through this problem.
We've kind of already seen it in previous videos but again for completeness we'll just have a little
overview look at it here then we'll go evaluation will define quickly what an evaluation metric means
for us like what defines success for this.
If we were to deem this project a success this machine learning proof of concept could we predict heart
disease using machine learning.
What would we need as an evaluation metric as a bare minimum features so what features of the data are
we gonna be most focused on in even which contribute most to the model which is step five modelling.
And finally Sept 6 is experimentation and realistically the whole thing is experimentation.
So this one we might start with and again if you're quite experienced here you might just start diving
in straight to the code.
You might know what to do.
But for us because we're still learning we're still figuring out how to approach different problems.
We set up this framework and then we figure out how we can use our tools at each different step.
So let's go back first and foremost problem definition.
We've kind of already done it here about in a statement that we could tell someone else.
So in our case we're doing binary classification so whether someone has heart disease or not.
So there's only two classes member classification is predicting whether something is one thing or another.
So in a statement we want to put it in a nice little quote.
So given clinical parameters about a patient can we predict whether or not they have heart disease wonderful
and then two is the data that we come up here.
We know that our heart disease data is in a CSP file already.
And if we click on that it's going to light up pretty hard to read here.
So that's we're going to import it soon using a pen as data frame.
But if we go up here and we if we go UCI heart disease dataset This is where we find about and this
is step two by the way data.
This is where we're finding out a little bit more about what data we're actually using.
So this is where you could Carmen download it from this is the original source for the UCI machine learning
repository which has a lot more different data sets in here that you can kind of work on and use for
example problems like what we're working through but to get it in the CSB format it's already been formatted
and that's on Kaggle.
Now you can go to Kaggle as well and get a lot more different data sets over here.
It's got a little menu it's got data sets say you can even search for different things.
But this is where I came to originally at this data set.
You can download it here.
So if you click download it's going to tell us a little bit more information about the data.
Some attribute information such as what the different columns stand for we keep going we look here we
see that the different columns this is where their different values are so this what this is is a data
dictionary.
And we're going to see this in a second or use.
This will come in handy.
What we might do actually is if we can copy this and take it back to our notebook.
So this is a data dictionary.
So in like a here create data is he a little ahead of ourselves.
So if we go there boom that's what we can use to reference what the columns are in the data.
So if we go here data we could probably pull out something from here.
So if we copy this this database contains 76 entries or actually our dataset only contains 14.
But then we read here but all published experiments refer to using a subset of 14 of them.
Okay.
Wonderful.
And so then if we went back to the UCI heart disease dataset
we get a little bit of information here.
So only 14 attributes used.
Now you won't always do this for every project that you work on especially if you're working within
a company or within a team the dataset might be given to you by a customer or by a client.
But for the problems that we're working on because we need access to open source data that means data
that everyone has access to.
We can find them publicly on the Internet but then again the process is very similar no matter what
data set that you're working on.
It's all about getting it in the right format that you can work with it in your job in a notebook.
We might put in here the original data came from the Cleveland database from UCI Shane learning repository
there is also a version of it available on Kaggle.
And so what you might do is copy that in there.
Beautiful.
And we'll also copy that in there and we could typing this up later.
This is just some information about the data where did it come from what data do we have.
And so we go here.
Number three evaluation so we were actually working on this project we wanted to implement this.
Let's say we were a hospital who wanted to be able to implement this as a machine learning model as
an application on the front desk if someone comes into us and we're nurse we're measuring these different
parameters about them.
So we found out different patient attributes what metric would we need to judge our model has been effective
has been out of use in play.
So if we're trying to classify whether someone has heart disease or not because that's pretty significant
we'd want a very very accurate model.
And so for example I'm going to make a number up so you might say something like if you can reach 95
per cent accuracy at predicting whether or not a patient has heart disease during this proof of concept
phase which is kind of what we're working through here then you might pursue and try to really get into
the hands of other people.
So that's that's the essence of what we're going to work through here is we're building a machine learning
proof of concept.
The reason why I say proof of concept is because oftentimes machine learning projects will start out
as trying to figure out if there are even enough patterns in the data to be learned by a machine learning
model.
And if there are then you might pursue the project further and get it into production or into some sort
of application.
So again this is just another benchmark we might set ourselves as a goal to work towards at the very
beginning of a project.
And it's not set in stone this may change is just something you might reflect with with your team like
hey if we're going to spend two weeks working on this machine learning project what figure would we
have to end up with for it to be pursued more so let's do that.
So if we can reach 95 percent accuracy at predicting whether or not a patient has heart disease during
the proof of concept or pursue the project and this may be another thing right someone might come to
you at a data science company or something like that song from another team might go hey we've got this
data set we want to measure how many of our customers are churning and we want to see if we can build
a machine learning model to help us out and then they may say hey do you want to work on a proof of
concept like similar to what we're doing here and this is how you might set alarm you might start out
by going problem definition.
Figure out if a customer is going to churn or not.
Where does the data come from it comes from our customer database what's our valuation metric.
Well if we can figure out if a customer is going to churn and about 80 percent accuracy then we might
keep pursuing this and actually get it into our production pipeline.
That's an example kind of workflow the first three steps.
And then finally step forward not final.
We've got a fair bit more to go features.
So if we come back.
So we've done this we've done evaluation want to find success go what features should we model this
is step form.
So this is where we're creating a data dictionary.
And what I mean by that is you may be out to create this on your own by doing a little bit of research.
So my point this involved and again we could tidy this up by putting these all dot points but they'll
start to make sense in a second once we actually see the data we're working with actually year we might
type this into turning this into dot point.
So now we've created our data dictionary.
This is something that you may find through your own research like we've done here finding out about
the data here finding out about the data or you may create it with the help of a subject matter expert
and what I mean by that is say for example you had that team come to you with a whole bunch of customer
data on who's going to churn or not churn meaning and they're going to leave or stop using your product
and they may tell you what different features of the data mean.
And so put here this is where you'll get different information about each of the features in your data.
So essentially when you start to work with the data you won't be a complete novice.
You'll have some idea of what's actually going on or what each.
Each section of the data means and this will make a lot more sense when we look at our data in the flesh
when we import our heart disease CSB file into our Jupiter notebook which is what we're gonna do in
the next video.
So these first four steps 1 2 3 4 problem definition data.
What data do we have.
Evaluation of features don't necessarily have to take that long.
So we've just gone through all four of them in about 10 minutes because what we want to do is get hands
on with the code and let the code and data speak for itself rather than trying to just think about it
here we want to see it in action.
So that's what we're going to do in the next few videos.