5 Machine Learning for IoT
257
model which can address the problem. Note that this phase may provide feedback
to the previous phases (i.e., business and data understanding phase as well as the
data preparation phase).
• Deployment: In this phase, we deploy the selected model into production.
Continuous monitoring and maintenance of models are also very important.
Based on the feedback and performance of the deployed models, we might need
to adjust our solution over time.
5.1.6.2 Data Preparation
The data preparation is also known as data preprocessing, data cleaning, and data
cleansing. In general, the following steps are performed in the data preparation
phase. Note that it is not mandatory to apply all of the following steps to your data.
In reality, you need to decide case by case.
1. Preparing Dataset: The first step of the data preparation phase is constructing,
collecting, and formatting data. As studied in previous chapters, in IoT projects,
data comes in many forms including: (i) Structured: It concerns all data which
can be stored in a table with rows and columns; examples of structured are CSV
documents. (ii) Semi-structured: Semi-structured data cannot be stored directly
in a table; however, with some process you can store them in tables; examples of
semi-structured are XML and JSON documents. (iii) Nanostructured: It usually
includes text and multimedia content (such as email messages, videos, photos,
audio files, etc.). In the machine learning literature, we frequently see the word
dataset, which simply refers to a collection of data. It is very common to use
matrix and vector notations (in particular for structured and semi-structured data)
to refer to data (see Fig. 5.11):
Machine Type
Serial Number
Working
Temperature
(C)
Average
Working
Voltage
Humidity
Remaining
Useful Life
(days)
Machine A
10293
69
12
Low
85
Machine B
10284
39
NaN
Low
80
Machine A
12391
120
11.5
Low
10
Machine C
21033
-10
12
High
90
Machine A
15126
5
10.6
Low
63
Feature
Label
Observation
/Sample
Categorical
Missing value
Fig. 5.11 A tabular view of a sample dataset
Précédent

- 263/647

Suivant