0
$\begingroup$

We hear this many time for different problems

Train a model to solve this problem!

What do we really mean by training a model?

$\endgroup$
0
2
$\begingroup$

In machine learning, when you train a model, you adjust (or change) the parameters (or weights) of the model so that its performance in solving a certain task increases.

There's little difference between the idea of training a model and the idea of training an animal. In fact, here's the dictionary definition of the verb to train

teach (a person or animal) a particular skill or type of behaviour through practice and instruction over a period of time

If you train a model, you also teach a skill or type of behavior through practice and instruction. For example, if you train a model to solve an object classification problem, then you teach the model to classify certain objects according to their properties (which is the skill that the model learns).

There are different ways to train a model, depending on the problem you want to solve, the algorithms that you use to train the model, and the available data.

If you have a labeled dataset, then you train a model with a supervisory signal (the labels), i.e. you explicitly tell the model the output that it is supposed to produce for each input, and, if it does not produce it, then you adjust its parameters so that next time it is more likely to produce the correct output for that input. This is called supervised learning (or training).

In certain cases, you do not have the correct output that the model is supposed to produce for each input, but you only have a reward (or reinforcement) signal. So, your training (or learning) algorithm needs to adjust the parameters of the model only based on the reward signal. This is called reinforcement learning (or training).

Finally, there's also unsupervised learning (or training), where you are given a dataset without labels or rewards, but you want to learn e.g. a probability distribution that this data was likely sampled from or separate this data into groups. For example, in k-means (a clustering algorithm), you want to split the data into groups so that similar objects belong to the same group and dissimilar objects belong to different groups. Note that k-means is a learning algorithm, so it's not a model, but you could consider the centroids of the clusters the parameters of the model (a clustering model).

There are variations or subcategories of these learning paradigms and you can also combine them, so sometimes the difference between them is not so clear.

There are also different types of models. There are parametric (e.g. a linear regression model) and non-parametric (e.g. neural networks) models.

$\endgroup$
0
$\begingroup$

Training a model simply means learning good values for all the weights and the bias from labeled examples. In supervised learning, a machine learning algorithm builds a model by examining many examples and attempting to find a model that minimizes loss; this process is called empirical risk minimization.

Loss is the penalty for a bad prediction. That is, loss is a number indicating how bad the model's prediction was on a single example. If the model's prediction is perfect, the loss is zero; otherwise, the loss is greater. The goal of training a model is to find a set of weights and biases that have low loss, on average, across all examples. shows a high loss model on the left and a low loss model on the right.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.