Hello my friends, and welcome to the final section of part three classification,
where we're going to answer together a very important question.
You know, one of the most frequently asked question in the data science community,
which is which classification model should I select?
You know, should I choose for my data set?
And the goal of this tutorial is to show you how with any data set,
you know, regardless of the number of features
you have in the data set, well, I will show you how to select quickly
and efficiently the best classification model.
All right.
So that's why here we're back into our machine learning.
It is that model selection folder.
You know which is a separate folder compared to the whole machine.
Learning is a folder with all the codes and data sets to figure out
how are we going to select the best classification model.
All right.
So here we are in the classification folder of our model selection big folder.
And as you can recognize in this folder we have all the classification models
that we implemented together all along this part three you have all of them.
However I slightly modified them.
But the only thing I did, you know with respect to what we did before,
is that I removed all the prints, you know, to alleviate
or lighten the implementation so that we can see more clearly.
And also, of course, you know, at the end, I removed the two cells
where we visualize the training set and test result.
Right.
Because remember this visualizations only work when you have two features and here,
as you can see, I took a classic data set with many features.
You can see all of them here.
So these are all the features.
And this is the dependent variable.
But you can see this data set as a generic data set
containing many features all with numerical values.
Right.
We won't do any kind of specific data preprocessing
and indeed a binary dependent variable taking values 2 or 4.
All right.
So since we have
the data set in front of us, well let me explain what this is about.
Even if you know it doesn't really matter, because the goal of this tutorial
is just to explain how to deploy efficiently
all your classification models and quickly figure out what is the best one
on any data set, regardless of the number of features.
But let me still explain what this is about.
So this is a classic data set which belongs to the UCI
Machine Learning Repository and which is about breast cancer.
So in this data set, each row corresponds to a patient,
you know, different patients here.
And for each of these patients we gathered well first assemble code number
the clump thickness the uniformity of cell size
the uniformity of cell shape, the marginal adhesion,
the single epithelial cell, the Bernoulli,
the blood chromatin, the normal nuclei and the mitosis.
Okay.
And all these variables are the features, you know, from sample code number,
even if that's not really the feature up to mitosis.
And with all these features, we are predicting the class which details
for each patient if the tumor is benign, in which case class takes the value of two
or malignant, in which case class takes a value for.
All right. So that's what the data set is about.
You can find it on the UCI ML repository by the name breast cancer.
And you can take the original version.
But really don't worry about all these features
because, you know, most of us don't understand what they mean.
You know, we're not doctors here, but we are data scientists.
And even if we don't understand the domain knowledge here of oncology,
you know, cancer medicine, well, that's still fine,
because we can still build classification models to understand
the correlations between all these features here
and the dependent variable class, which we want to predict, telling
if the tumor of each of these patients is benign or malignant.
All right.
And so we're going to use this data set to deploy
all our classification models in a flashlight.
You know in a matter of seconds.
And after just a few clicks we will be able to figure out
what is the best classification model for this data set.
All right. Great.
So let's do this. Let's close this.
And now now what we're going to do in order to start the demo
is because you know, this is a Google Drive folder to which
all of you have access and therefore you can't modify it, obviously.
And so what you have to do in order to modify these cells, you know,
because we will have to enter
the name of the data set because these are all code templates.
In order to modify these cells you need to create a copy.
So that's the first thing we'll do here.
Let's do this quickly.
You know you just need to do right click and then make a copy for each of them.
All right
then Colonel SVM make a copy logistic regression.
So you see it's pretty fast. Sorry about that.
But at least it only takes a few seconds.
And then you'll get all your copies in case you know you want to modify them.
But I recommend to.
All right.
Then your copies would go naturally to your main drive or,
you know, in the Colab notebooks folder here.
They just went into my drive, so all good.
Now we're going to open them all.
So starting with the last one, random forest.
All right then we're going to open
the decision tree classification open.
All right.
You can open it with Jupyter Notebook also if you want.
Right.
Then we're going to open Naive Bayes.
All right then we're going to open kernel SVM.
Perfect.
Then we're going to open SVM.
Where is it right here.
Support vector machine open. Then
we're going to open the K-nearest neighbors.
All right.
And finally we're going to open logistic regression
I went from the last to the first because as you can see this is the way
now we have all the files in the correct order.