All right.
So if you saw the past few lectures and you had no idea what was going on, you might be a bit alarmed.
You might be wondering, what the heck is numpy and pandas and where can I learn about them?
Luckily, I've got you covered.
It just so happens that I teach all of this for free in my course called the numpy stack in Python.
As usual, you can find this course by searching for its name.
Or you can click my profile and go to my list of courses.
If you still can't find it, you can go to my website Lazy Programmers Me where I list out all my courses
and link to them there.
Now, because this course is free, I'm going to assume that you've taken the time to do your best to
prepare for this course.
That means knowing the basics of numpy, map, plot, lib pandas, psi, pi and psychic learn.
Of course, when I say basics, that might be a little ambiguous.
What is basic to me may not be basic to you.
So let's enumerate and review what you should have learned so that you can make sure you are well equipped
to handle this course.
For numpy.
I essentially want you to know matrix arithmetic in deep learning.
We work with TensorFlow, which might sound scary, but we actually just mean array like a regular old
programming array.
And if you've been paying attention, the name TensorFlow actually includes the word tensor in it,
so you know that it's going to come in handy.
Sensors or if you prefer arrays, can have any number of dimensions.
We have special names for one dimensional sensors and two dimensional sensors, which we call vectors
and matrices, respectively.
But you should not be afraid if you see a3d tensor or a 40 tensor.
Okay, so what do we mean by arithmetic?
That means your basic arithmetic, operations, addition, subtraction, multiplication and division.
Division doesn't really apply when we're talking about matrices, but there is an analogous concept
of matrix inversion, which you should be familiar with.
You should know when addition, subtraction and multiplication are allowed.
For example, you should know that you can add matrices of different sizes.
Multiplication is the key operation.
However, you should know that matrix multiplication is really just the dot product in disguise.
In fact, whether you're doing a dot product between vectors or matrix multiplication between matrices,
these are the same function in numpy.
It's just called dot.
Element wise multiplication is also an important operation in deep learning, so you should know how
to do that as well.
In terms of map plot lib, there isn't really anything fancy you need to know how to do.
Just know about line charts and scatter plots since these are what we'll be using 99% of the time.
In terms of pandas, also pretty simple.
We basically use pandas to load in tabular data.
Pandas does some other useful things, but we won't be making full use of its capabilities.
Most of the time it'll just be to load in a CSV file.
Next, we have sci fi.
Now, I don't anticipate really using sci fi at all.
However, that could change.
Sci fi is kind of like a power version of NumPy, so it has more useful statistics, functions more
useful optimization, functions, more useful linear algebra functions, and so forth.
NumPy is more for those lower level operations, like adding and multiplying.
Finally, we have psychic learn.
Now the point of knowing about psychic learn isn't to know about psychic learning per se.
It's to know about the concepts behind using psychic learn.
In other words, you're going to have to learn about the basics of machine learning in order to make
proper use of psychic learning.
Again, I reiterate I teach this for free, so I don't anticipate any problems catching up.
So here are the things you want to remember.
And keep in mind.
First are the basics of classification and regression.
You want to recall how to think of these as geometry problems rather than magic machine learning voodoo.
Second, you want to be familiar with the shape of data.
Typically for a structured data problem, meaning it not working with images, sound or text, but more
traditional business type data.
We're going to have two objects which we call X and Y.
X represents our input samples and Y represents the corresponding targets.
To give you a simple example.
Suppose we want to predict whether or not a student will pass a math exam in order to build a model.
We've collected a bunch of data points for students who took this math exam in the past.
We record several variables, such as how many hours they spent studying and how many hours they spent
playing video games.
We would treat these as our X matrix.
Our Y matrix would be the target or label, which is what we want to predict in the future for future
students.
So in the future we could ask a student, Hey, how many hours did you study?
How many hours did you play video games?
And then from that information alone, we could make a prediction about whether or not they will pass
the math exam.
Why would be whether or not the student pastor failed and coded as zero or one.
In general, we say that the x matrix is of size nn by dx, where nn is the number of samples and d
is the number of features.
Why is just a one dimensional array of length n which you can also think of as a vector?
You also want to know the steps we take in general when we are writing a machine learning script to
test that a model we've just learned about.
This is going to be pretty much the same every time.
So if you don't know this, you're going to be extremely confused.
The steps are as follows.
Number one, we load in the data.
That's just the X and Y we just talked about.
We will use pandas for this when we have simple data sets, or if we have something more complicated,
we'll write our own python code.
Number two, we can optionally split the data into train and test sets depending on what we are doing.
Note that sometimes the term test set is used interchangeably with validation set, in which case the
true test set would mean something else.
Don't get too fussy over this.
It is what it is.
Number three, we build a model.
Now, in Python, we usually use object oriented programming, which means our model takes the form
of a Python object.
In PyTorch, we still use object oriented programming.
In fact, probably more so than what you're used to if you've only used scikit learn.
Specifically, PyTorch uses subclasses in order to build models.
These models do not work like what you are used to in psych learn, but it's similar.
Ultimately, you should still recognize the following steps.
Number four, we fit the model in psych learn.
This just means calling the fit function on the model and passing in your training data in a deep learning.
This is a little more complicated because we have many more options.
Since training in deep learning involves an iterative training algorithm known as gradient descent,
we typically plot a loss per iteration when we are finished training to confirm that our training process
has converged as expected.
If it didn't, we have to go back and make changes.
And finally, number five, we evaluate the model.
This involves checking the accuracy of our model on both the train and validation sets.
At this time, we can also check to see if the model is overfitting or under fitting.
And once this is all done, we can make predictions with our model.
In PyTorch.
This is a little more complicated than inside.
You learn because PyTorch doesn't really work with numpy arrays.
Instead, PyTorch works with torch sensors.
So there will be a lot of times where we have to convert back and forth between numpy array and torch
tensor depending on what we need at the time.
This might seem strange at first, but you'll get used to it as you get more practice.
This process encapsulates the typical life cycle of a machine learning model.
You load in your data, train a model, evaluate it, and then use it to make future predictions.
Okay.
So just a quick update to this lecture.
I won't name any names, but on certain platforms, meaning certain platforms I personally don't own.
They've made it very hard for students such as yourselves to find free courses.
This doesn't mean that they don't exist.
It simply means that the people behind these platforms have made them very hard for you to find.
Obviously, this is in their best interests, but not yours.
That being said, there is an easy way around this.
Specifically, it is better to simply go to my website, which is deep learning courses dot com, where
it should be very easy to find my free course.
Now you might be wondering what's the difference between this website and other websites where you can
find my courses?
The answer is that the courses on my website are always a superset of courses which have the same name
on other sites.
In other words, if you use deep learning courses dot com, you are getting the best value for each
dollar you spend.
Now, just as a quick side note, what if you do really want to get the course on this website?
Well, you still can.
As mentioned, you simply need to go to my profile, which has a list of all the courses I teach and
scroll through them to find the relevant course.
I'm not sure that they show up in any particular order, so you just have to scroll through them all.
Finally, just a brief note on why there are two versions of this course.
You see, there's a free version and the paid version.
The reason there's two is because, again, this platform, which by the way, I don't work for, made
some changes a few years ago to how free courses work.
Therefore, it was by necessity that two versions were created.
Remember that instructors such as myself are not employees of this company.
We are simply users of this website, just like how you are a user of Gmail, Hotmail and what have
you.
So I'm a user of this website.
I don't have any control over how it works.