
Vectorization
Why vectorization? Vector Dot Product The dot product multiplies the values in two vectors elementwise and then sums the result. Vector dot product requires the dimensions of the two vectors to be the same. dot product a.w = aT@w = np.matmul(aT,w) matmul = matrix multiplication calculation Loop version duration: 0.0162 msone. step at a one […]

Gradient Descent
Gradient Descent finds better and better values for the parameters w and b. It uses below equation. @ : learning rate controls how big step you take. It is a small number between 0 and 1. It might be 0.01.Derivative term : in which direction you want to take your baby stepDerivative term in combination […]

Cost Function
The first important step to apply linear regression is to define the cost function.Cost function will tell us how well/how fit the model is doing.We should look for more suitable w and b values based on the result. We are going to want to find values of w and b that make the cost function […]

Linear Regression
To train the model:You feed the training set (both the input features and the output targets) to your learning algorithm.Then your supervised learning algorithm will produce some function (f). f is called the model.Function takes a new input x and Estimates or makes prediction (y hat) for y. Here, we randomly gave the values w […]

Unsupervised Learning
Data only comes with input X, but not label output label Y. Algorithm has to find some structure in this data. Clustering: Group similar data points together Anomaly Detection: Finds unusual data points Dimensionality Reduction: Compress data using fewer numbers

Supervised Learning
Learns from data labeled with the right answer(label Y) Regression: Predict a number among infinitely many possible numbers/outputsLinear Regression: Fitting a straight line to your data Classification: Predict categories from among a limited set of categories.There are only a few possible outputs/categories/classes. Categories could be non_numeric or numeric.The learning algorithm has to decide how to […]

Machine Learning
It is science of making computers learn without being explicitly programmed. “Field of study that gives computers the ability to learn without being explicitly programmed.” Arthur Samuel Machine Learning had grown to be a subfield of artificial intelligence In general, the more opportunities you give a learning algorithm to learn, the better it will perform. What are the […]

Optimization For AI
Three Ingredients of Machine Learning• MODEL (The final product)A piece of code with some parameters that need to be optimized• ERROR FUNCTION (Performance Criterion )The function that you use to judge how well you set the parameter values• LEARNING ALGORITHM (Training)The algorithm that optimizes the model parameters using the error function. to determine an accurate […]