5 Machine Learning for IoT
253
5.1.4 Supervised and Unsupervised Learning
Based on the tasks to be solved and data available to the task, the machine learning
model also varies. The most common way is to categorize machine learning models
into supervised learning and unsupervised learning.
5.1.4.1 Supervised Learning
Supervised learning is the simplest model that readers can understand. The reason
why this type of modeling is called supervised learning is that the supervised
learning model is learned, or trained in the language of machine learning, from the
training dataset, just like a teacher supervises a student through a learning process.
In a supervised learning model, input and output are clear to the reader, although
the inner algorithm may not be so obvious. For instance, as described in Fig. 5.1, we
would like to predict tomorrow’s weather. The output is clearly defined – weather. It
can be defined as sunny, cloudy, or rainy. Meanwhile, we collect a number of relative
parameters, such as temperature, humidity, etc. These parameters are not directly
reflecting the weather, but indirectly indicating the type of weather. Therefore,
these parameters can be used for predicting the weather. We collected a dataset of
historical records of weather and corresponding relative parameters, based on which
we train the weather prediction model. In the training process, we already know the
right answers. The algorithm iteratively makes predictions on the training data and
is corrected by the teacher, the training process. The learning process stops when
the algorithm achieves an acceptable level of accuracy. Thus, we can use the model
to predict future weather with a certain level of confidence.
To further categorize supervised learning, those algorithms can be grouped into
either (i) classification models or (ii) regression models (Fig. 5.5).
• Classification: Classification refers to a model in which the output is a category,
such as weather (sunny, windy, rainy) or fruit (orange, apple, pear).
Regression
What will be the
temperature tomorrow?
Classification
What will the weather be
like tomorrow? Cold or Hot?
Fig. 5.5 Classification vs. regression
Précédent

- 259/647

Suivant