Hello guys.
So we are going to continue the discussion with respect to artificial neural network.
Now in this video and in the upcoming series of video, we are going to develop an end to end project
using deep learning, where we are specifically going to train a artificial neural network here.
Uh, one of the two most important libraries that we are going to use is Keras and TensorFlow.
Okay, so TensorFlow is over here and Keras is over here.
Now if you don't know about TensorFlow this is an open source, uh, library specifically used to create
end to end deep learning projects.
And, uh, it has some amazing features.
And, uh, you know, you will be able to implement various kind of neural networks from an to RNN to
LSTM, RNN to GRU to transformer each and everything you will be able to implement from this.
Now, many people may be thinking, Chris, is it a good idea to probably create all these specific
models and train all these neural networks completely from scratch?
I would suggest guys right now, since all these libraries are open source, right?
Like you have TensorFlow, you have PyTorch.
And I would always suggest you be an expertise of one of this.
You know, uh, you need not learn both the libraries because at the end of the day, when we start
learning generative AI, or when you will be learning generative AI there are all the LM models, all
the generative AI models that we will be specifically using.
In the back end, we will be able to convert or, uh, change the libraries from PyTorch to TensorFlow
at any point of time.
So again, uh, my suggestion would be learn any one of the specific libraries and learn how to build
end to end projects.
That is very much important.
So in this course we will be focusing more on TensorFlow.
And we will try to create end to end projects with the help of machine learning.
Uh, I mean deep learning uh, like an we will try to see how we can train.
And again, along with TensorFlow we will also be using this Keras API.
Now Keras is just like a wrapper on top of TensorFlow you know.
So in TensorFlow we will be able to create sequential neural network.
We will be able to create RNN, will be able to create an will be able to create a LSTM uh RNN.
So when we are creating all these things, we really need to write a lot of code.
Uh, if we are only using TensorFlow.
But if you go ahead and use Keras, which is again integrated into TensorFlow, this actually provides
APIs.
And this API is is so good that you will be able to call each and every thing, you'll be able to create
your entire neural network just with less lines of code.
Okay, but don't worry, I will be talking about it.
So here you can see Keras also works with Jax, TensorFlow and PyTorch.
Right now.
In this course we will focus more on TensorFlow itself.
Okay.
So uh what is the problem statement that we are going to discuss okay so here I have a data set okay.
So this data set is basically called as churn modeling dot CSV.
And as you all know we use an to solve uh, you know if we have a tabular data, we, we have some classification
or regression problem statement we will be able to solve with the help of an.
So here you'll be able to see I have this churn modeling dot csv file.
And here my output is something called as exited.
Exited basically means this data is from a bank based on some information.
Uh, the data is basically given that whether the person is going to leave the bank or not.
Okay.
And over here, these are the past data from this particular bank, which shows that this information
was there and the person left the bank.
When this informations are there, the person did not leave the bank.
Okay.
There are some features like credit score, geography, gender, age, tenure, balance, number of
products, has credit card is active member estimated salary.
And then here you specifically have whether the person has exited or not.
Okay.
So what we'll do is that we'll try to solve this simple binary classification problem again with the
help of an.
Here you will be seeing that whatever things we have learned in an right, uh, like how a neural network
is basically created, how what forward propagation actually happens, backward propagation actually
happens.
How to calculate loss function, how to use optimizers that everything will be explained when we are
creating this particular project.
And this project will be completely end to end.
We will also focus on the deployment.
We'll try to create pickle files.
I'll tell you why.
Pickle files will be required over here each and every thing.
Okay.
So uh, this is the entire problem statement again.
Uh, our main aim is that based on some features, we need to predict whether the person is going to
leave the bank or not.
Okay, so just to give you an idea of what exactly we are going to do in this particular project, first
of all, we'll go and focus on classification.
So here we have this particular data set.
Now we will take this entire data set okay.
We'll take this entire data set.
We'll perform some of the basic feature engineering.
Okay.
Basic feature engineering.
Now what all basic feature engineering we will do we will convert uh, let's say categorical variables.
Into numerical.
Okay.
We'll convert this categorical variables into numerical.
We'll be doing some processing.
Uh, will will use some, uh, standardization process.
Right.
All these things we will specifically.
So this is the first step, some type of basic engineering where we will be transforming the entire
data.
After we do this, we will be getting our good data itself that will be available with us.
Then we will try to create an an.
So if I just consider as an example with respect to an, let's say in this particular feature, you
have uh, 11 features, okay, in 11 independent features.
So this will basically be my input layer, okay.
With 11 nodes like this I've just written dot dot.
Then we will go ahead and create our hidden layer.
Okay, let's say this is my hidden layer that I'm actually going to create one more hidden layer I can
create over here.
Okay.
It is up to us how many hidden layers you will be creating and all.
And then finally you know that this is basically giving you an output as one, right?
So here I will be having an output as one.
And finally we will go ahead and basically will create this entire CNN.
And as you all know this will be interconnected, right?
This will be interconnected.
So I think you can go ahead and do the connection.
I'm just doing one part of the connection.
And this is finally going to go ahead with the output layer okay.
Uh, here I will also show you how you can apply dropout.
Okay.
Dropout basically means uh, some of the nodes I will disable it while doing the forward propagation
and backward propagation, like some of the weights we will not be updating.
Okay, why do we do that?
So that our model does not overfit.
Okay, so does not overfit.
Then, uh, after training this particular model, uh, we will see the concept of.
So this is forward propagation.
We will go ahead and calculate the loss.
We will use some kind of optimizers.
Right.
Everything will try to write this particular code with the help of Keras TensorFlow.
Keras.
TensorFlow.
Okay.
Now once the model is trained, uh, then the next step will be that how do I take this model and convert
into some file format?
Let's say I will be using some pickle file format or dot h5 file format.
Okay.
We'll talk about this file format.
What exactly it is.
Because if we really want to do the deployment we really need to take we need to convert this particular
neural network.
We need to save their weights.
We need to convert them into a pickle format file or H5 format file, so that we can reuse this and
deploy it in any environment that we want.
After doing all these things, uh, we will go ahead and uh, further, we will use Streamlit.
Streamlit to create our web app.
Okay.
And from this web app, we will integrate all our models.
Okay.
We'll integrate all our models.
And we'll deploy this in the Streamlit cloud.
So all these things are basically going to happen.
Okay.
So this is the overall things that we are specifically going to do in this particular project.
It will be step by step.
And, uh, how this neural network is basically created, how optimizer loss function, how dropout
will be done, everything I will be discussing about it as we go ahead.
Okay.
So first thing first, uh, what I will do, I will go to my folder over here and I will just go ahead
and open my VS code.
Now as soon as I open my VS code, this is my VS code over here okay.
So here you can see my file is there.
Now quickly.
Uh, as you all know, the first step, because I'm going to do this in my local, uh, and I, um,
if you have a little bit powerful machine, like, let's say i5, i7 processor, you will be able to
run this entire code in a faster way.
Um, again, uh, obviously, when we see more complex projects in the future, we will not be using
local machine.
Instead, we will go ahead with Google Colab.
Okay.
but right now I think the data set that we have, I have also tried it to run in my local machine.
Everything will be running.
So I'll just give you a brief idea like how you can do that, uh, deep learning uh, project set up
in your local machine also.
Okay, so first of all, I will go ahead and open my terminal quickly.
Let's go ahead and open my command prompt.
Okay.
Here.
Uh, I'm just going to use this conda and I'll say, hey, Conda create minus p, v and v environment.
And let's say I take python double equal to 3.11, okay.
And I'll say yes.
So this entire, uh, environment I'm actually creating and, uh, here, uh, once this environment
gets created, I'm going to just create my requirement dot.
TXT file Requirements dot txt file.
Um, understand now uh, there are different uh versions of TensorFlow that have earlier come, but
I'm just going to do with the recent one.
The reason is very simple because now you have Keras integrated within TensorFlow.
Before Keras was a separate library and TensorFlow was a separate library.
Now Keras as an API has been integrated inside TensorFlow.
So let us go ahead and write the first library that we are specifically going to use.
Okay.
And uh, again as I said, we are going to use the recent TensorFlow version.
So I will just go ahead and write TensorFlow.
Uh TensorFlow.
Let's say that I will go ahead and use 2.1.50 okay.
And I think this is the recent one that we are specifically going to use.
And if any update comes, let's say you don't want to use this.
Just remove this particular version and just remove it in this way, whichever will be the recent one
that will get updated.
But right now, since I have implemented this project with 2.1.50, you'll be able to see that it will
work absolutely fine.
Along with this, what I'm actually going to do, I'm going to use pandas.
I'm going to use numpy.
Along with this I will also use scikit learn because I'm going to use some of the feature engineering
libraries or data transformation libraries that are available from scikit learn, uh, like standard
scaler.
Uh, you also have will convert that into a pickle file also.
Then uh, we'll also go ahead and use this TensorBoard.
I will talk about this TensorBoard, what exactly it is and all as we go ahead.
Then we have this matplotlib for some plotting.
And finally we'll also go and use this Streamlit library.
So all these libraries we are going to specifically use it.
Now let me quickly go ahead and activate my V and V environment.
So I'll go ahead and write conda activate v and v okay.
Uh and uh now from here I will go ahead and pip install minus our requirement dot txt.
So uh now you can see that my installation of this entire libraries will happen.
Uh, it will take some time because TensorFlow is also a big file and uh, it will download based on
your internet speed.
By default I'm just going to use TensorFlow, not with GPU, instead with CPU.
As I said that if we are solving a larger problem statement, uh, CPU sometimes will not be sufficient.
Okay.
And based on that, uh, we'll try to further do this discussion okay.
So let this installation take place.
Uh, now in the next video we will start implementing our, uh, problem statement.
And uh, we'll take the this particular data set.
We'll read this data set and uh, we'll see step by step what all, um, you know, transformation techniques
we are going to use and how we are going to create the and with the help of TensorFlow.
So, yes, uh, I will see you all in the next video.
Thank you.