Supervised Learning
Learn the basic principles of supervised machine learning.
We'll cover the following
Supervised ML is a type of ML where the algorithm learns to map inputs to outputs based on a labeled dataset. The labeled dataset consists of input-output pairs, where the output (also called the label or target) is known for each input. The goal of supervised learning is to learn a function that can map new inputs to the correct output.
The first step in supervised learning is to prepare a dataset that contains labeled examples of the problem we want to solve. Labeling is the crucial part because this is how we tell the model what the expected values are for every input. Effectively, this is how we are supervising the training process.
The next step is to choose an ML model or algorithm that is appropriate for the problem at hand. There are many types of models to choose from, such as decision trees, logistic regression, and neural networks. We don’t necessarily need to perform this step while using ML.NET because it will try different algorithms and choose the one that produces the best accuracy metrics related to the task.
Once we've chosen the model, we need to train it on the training set. During training, the algorithm adjusts its parameters to minimize the difference between the predicted output and the true output for each input in the training set. This process is called optimization or learning.
After training, we need to evaluate the model’s performance on the test set. This step involves computing metrics such as accuracy, precision, recall, and F1 score to measure how well the model is generalizing to new, unseen data. ML.NET allows us to do this step automatically by specifying the test dataset while executing the training command.
Get hands-on with 1400+ tech skills courses.