Machine Learning

Definition of Machine Learning

Machine learning is a method in which a system learns from data to make predictions without being explicitly programmed for each task.

Types of Machine Learning

Key Concepts in Machine Learning: HCG

For machine learning, it's important to remember three key concepts, often abbreviated as HCG: Hypothesis, Cost Function, and Gradient Descent Algorithm. Let’s explore these:

1. Hypothesis

To predict the output value Y^, we need a hypothesis. Assuming that all human and natural phenomena can be explained using a linear model, we can express the hypothesis as:

H(x) = Wx + b, where:

2. Cost Function

Consider the dataset X = [1, 2, 3] with corresponding labels Y = [1, 2, 3]. After setting an initial hypothesis, we need to calculate the cost (or loss). The cost function measures the error, which is the difference between the predicted values and the actual data values.

The resulting cost function resembles a bowl-shaped 2D graph, with the minimum cost indicating an optimal hypothesis. In this graph, our goal is to find the weight and bias values at the global minimum, where the slope of the graph approaches zero.

3. Gradient Descent Algorithm

To find the point where the slope is zero, we use differentiation. We iteratively update our weight values until we reach the global minimum. The update rule for the weights is given by:

W = W - α * (dJ/dW), where:

Formal Definition of Gradient Descent Algorithm

The gradient descent algorithm is an iterative optimization algorithm used to minimize the cost function in machine learning. The basic steps are:

In summary, gradient descent helps us find the optimal parameters that minimize the cost function, leading to better predictions by our machine learning model.

Back to Blog