The present invention relates to a learning apparatus, an estimation apparatus, a learning method, an estimation method, and a program.
Studies have been conducted on techniques for estimating the condition (steps, slopes, etc.) of the surface of a road such as a pavement or a roadway on which a moving body such as an automobile, a pedestrian, or a wheelchair moves, by using sensors mounted on the moving body (for example, see NPL 1 and NPL 2).
[NPL 1] Akihiro Miyata, Iori Araki, Tongshun Wang, Tenshi Suzuki, “A Study on Barrier Detection Using Sensor Data of Unimpaired Walkers”, IPSJ journal (2018)
[NPL 2] “Kousoku Basu ni Noseta Sumaho no Kasokudosensadeta de Romen no Outotu wo Kenti, Kensyou Siken wo Zissi (Detecting unevenness of a road surface with an acceleration sensor of a smartphone mounted on an expressway bus, verification tests conducted)” [online] [Searched on Sep. 4, 2018], the Internet <URL: https://sgforum.impress.co.jp/news/3595>
The condition of a road surface as described above is often estimated using a model that has been built through machine learning performed using, as training data, data detected by sensors that detect the state of a subject. In machine learning, if the average and variance of detected data are significantly different from those of other detected data, the optimal solution cannot be obtained due to pieces of data with a large average and variance being preferentially learned, and appropriate learning cannot be performed.
Therefore, conventionally, normalization or standardization (normalization/standardization) is performed on detected data, and machine learning is performed using the detected data that has been subjected to normalization/standardization, as training data.
Conventionally, normalization/standardization has been performed on all of the pieces of data detected by the sensors at once, as shown in
In general, the average and variance of detected values significantly vary depending on the type of the sensor. For example, values detected by an acceleration sensor (for example, −9.8 to 9.8 (m/s2)) and values detected by an atmospheric pressure sensor (for example, 870 to 1080 (hPa)) have significantly different averages and variances. If such pieces of data with significantly different averages and variances, detected by a plurality of types of sensors, are subjected to normalization/standardization all at once as shown in
Furthermore, when the directions of the plurality of sensors are not uniform, the values detected by the sensor are corrected by rotating the directions of the sensors so that the directions of the sensors are made uniform. Here, if normalization/standardization is performed on each detection item as shown in
Although machine learning of a model performed using training data has been described so far, estimation using a model also requires that normalization/standardization be performed on data input to the model. Therefore, as in the case of machine learning, it is not possible to achieve sufficient accuracy in estimation using a conventional normalization/standardization method.
An object of the present invention made in view of the above-described problems is to provide a learning apparatus, an estimation apparatus, a learning method, an estimation method, and a program that are capable of improving accuracy in performing machine learning on a model using training data, and in performing estimation using a model.
To solve the above-described problems, a learning apparatus according to the present invention is a learning apparatus that builds a model by performing machine learning, using, as training data, data detected by a plurality of types of sensors that detect a state of a subject, the learning apparatus including: a normalization/standardization unit that performs normalization or standardization on data detected by the plurality of types of sensors; and a learning unit that builds the model by performing machine learning, using, as training data, the detected data on which normalization or standardization has been performed by the normalization/standardization unit. The normalization/standardization unit performs normalization or standardization for each type of sensor, on data detected by the sensor.
Also, to solve the above-described problems, an estimation apparatus according to the present invention is an estimation apparatus that estimates a state of a subject, using a model that has been built through machine learning performed using, as training data, data detected by a plurality of types of sensors that detect the state of the subject, the estimation apparatus including: a normalization/standardization unit that performs normalization or standardization on data detected by the plurality of types of sensors; and an estimation unit that estimates the state of the subject by applying the detected data on which normalization or standardization has been performed by the normalization/standardization unit, to the model. The normalization/standardization unit performs normalization or standardization for each type of sensor, on data detected by the sensor.
Also, to solve the above-described problems, a learning method according to the present invention is a learning method that is to be used by a learning apparatus that builds a model by performing machine learning, using, as training data, data detected by a plurality of types of sensors that detect a state of a subject, the learning method including: a normalization/standardization step of performing normalization or standardization on data detected by the plurality of types of sensors; and a learning step of building the model by performing machine learning, using, as training data, the detected data on which normalization or standardization has been performed. In the normalization/standardization step, normalization or standardization is performed for each type of sensor, on data detected by the sensor.
Also, to solve the above-described problems, an estimation method according to the present invention is an estimation method that is to be performed by an estimation apparatus that estimates a state of a subject, using a model that has been built through machine learning performed using, as training data, data detected by a plurality of types of sensors that detect the state of the subject, the estimation method including: a normalization/standardization step of performing normalization or standardization on data detected by the plurality of types of sensors; and an estimation step of estimating the state of the subject by applying the detected data on which normalization or standardization has been performed, to the model. In the normalization/standardization step, normalization or standardization is performed for each type of sensor, on data detected by the sensor.
Also, to solve the above-described problems, a program according to the present invention enables a computer to function as the above-described learning apparatus.
Also, to solve the above-described problems, a program according to the present invention enables a computer to function as the above-described estimation apparatus.
With the learning apparatus, the estimation apparatus, the learning method, the estimation method, and the program according to the present invention, it is possible to improve accuracy in performing machine learning on a model, using training data, and in performing estimation, using a model.
Hereinafter, an embodiment for carrying out the present invention will be described with reference to the drawings. In the drawings, the same reference numerals indicate the same or equivalent constituent elements.
The learning apparatus 10 shown in
Data detected by a plurality of types of sensors that detect the state of the subject is input to the correction unit 11 as training data. Note that detected data to which teacher labels indicating the state of the subject indicated by the detected data is added is used as the learning data. However, a description of the teacher labels is omitted below. Various sensors such as an acceleration sensor, a gyro sensor, a geomagnetic sensor, a gravity sensor, an atmospheric pressure sensor, and a tilt sensor may be used as the sensors that detect the state of the subject according to the need, depending on the subject of estimation. In the following description, the plurality of types of sensors include a gravity sensor.
The correction unit 11 corrects data detected by sensors (for example, an acceleration sensor, a gyro sensor, a geomagnetic sensor, and a tilt sensor) that detect the state of the subject in predetermined axis directions (movement of the subject, a tilt, etc.), other than the gravity sensor, of the plurality of types of sensors, based on data detected by the gravity sensor. Specifically, the correction unit 11 corrects values detected by the sensors by rotating the directions of the sensors with reference to the direction of gravity detected by the gravity sensor so that the directions of the sensors are made uniform.
The correction unit 11 obtains r, θ, and φ that satisfy Expression (1) shown below, where g=(x,y,t)T denotes a value from the gravity sensor (T denotes transposition), Rz (φ) denotes a rotation matrix for rotation about the Z axis, and Ry (φ) denotes a rotation matrix for rotation about the Y axis. The correction unit 11 corrects the values detected by the sensors by applying an expression obtained by substituting r, θ, and φ thus obtained into Expression 1, to the values detected by the sensors.
The correction unit 11 outputs the corrected detected data to the classification unit 12. Note that, if the directions of the sensors have been made uniform in advance, the correction unit 11 need not perform correction.
The classification unit 12 classifies the pieces of detected data output from the correction unit 11, according to the types of the sensors, and outputs them to the normalization/standardization unit 13.
The normalization/standardization unit 13 performs normalization or standardization (normalization/standardization) (at least one of normalization and standardization) on the pieces of detected data output from the classification unit 12. Specifically, the normalization/standardization unit 13 performs normalization/standardization on the pieces of detected data classified by the classification unit 12 according to the types of the sensors, and the normalization/standardization unit 13 performs normalization/standardization for each type of sensor, on data detected by the sensor. The normalization/standardization unit 13 outputs the pieces of detected data that have been subjected to the normalization/standardization, to the learning unit 14.
The learning unit 14 performs machine learning using the detected data subjected to the normalization/standardization performed by the normalization/standardization unit 13 as training data, to build a model that is used to estimate the state of the subject.
The storage unit 15 stores the model built by the learning unit 14.
The estimation apparatus 20 shown in
Data detected by a plurality of types of sensors that are attached to the subject of which the state is to be estimate is input to the correction unit 21 as input data. In the following description, the plurality of types of sensors include a gravity sensor.
The correction unit 21 corrects data detected by sensors (for example, an acceleration sensor, a gyro sensor, a geomagnetic sensor, and a tilt sensor) that detect the state of the subject in predetermined axis directions (movement of the subject, a tilt, etc.), other than the gravity sensor, of the plurality of types of sensors, based on data detected by the gravity sensor. Specifically, as with the correction unit 11 of the learning apparatus 10, the correction unit 21 corrects the detected data according to Expression 1. The correction unit 21 outputs the corrected detected data to the classification unit 22.
The classification unit 22 classifies the pieces of detected data output from the correction unit 21, according to the types of the sensors, and outputs them to the normalization/standardization unit 23.
The normalization/standardization unit 23 performs normalization/standardization (at least one of normalization and standardization) on the pieces of detected data output from the classification unit 22. Specifically, the normalization/standardization unit 23 performs normalization/standardization on the pieces of detected data classified by the classification unit 22 according to the types of the sensors, and the normalization/standardization unit 23 performs normalization/standardization for each type of sensor, on data detected by the sensor. The normalization/standardization unit 23 outputs the pieces of detected data that have been subjected to the normalization/standardization, to the estimation unit 25.
The storage unit 24 stores the model built by the learning apparatus 10.
The estimation unit 25 estimates the state of the subject by applying the detected data subjected to the normalization/standardization performed by the normalization/standardization unit 23, to the model stored in the storage unit 24. Specifically, the estimation unit 25 inputs the detected data output from the normalization/standardization unit 23, to the model, and outputs an output from the model as the result of estimation of the state of the subject.
Next, normalization/standardization performed by the normalization/standardization unit 13 and the normalization/standardization unit 23 will be described. Note that the normalization/standardization unit 13 and the normalization/standardization unit 23 employ the same normalization/standardization method. Therefore, the following describes the normalization/standardization unit 13 as an example, and a description of the normalization/standardization unit 23 will be omitted.
As described above, the normalization/standardization unit 13 performs normalization/standardization for each type of sensor, on data detected by the sensor. That is to say, as shown in
As described above, the normalization/standardization unit 13 performs normalization/standardization for each type of sensor, on data detected by the sensor. Therefore, in the case of the example shown in
The normalization/standardization unit 13 performs normalization according to Expression 2 shown below, and performs standardization according to Expression 3 shown below, where x denotes a value detected by a sensor, x′ denotes a detection value that has been subjected to normalization/standardization, and max, min, avr, and std respectively denote the maximum value, the minimum value, the average, and the variance of values detected by each type of sensor.
x′=(x−min)/(max−min) Expression 2
x′=(x−avr)/std Expression 3
In the example in
Next, a learning method performed by the learning apparatus 10 according to the present embodiment will be described with reference to the flowchart shown in
Upon receiving pieces of input detected data as training data (step S11), the correction unit 11 corrects the input detected data to make the directions of the sensors uniform (step S12).
The classification unit 12 classifies the pieces of detected data thus corrected by the correction unit 11, according to the types of the sensors (step S13).
The normalization/standardization unit 13 determines whether or not at least a predetermined amount of detected data (training data), classified by the classification unit 12 according to the types of the sensors, has been collected (step S14).
Upon determining that at least the predetermined amount of training data has not been collected (step S14: No), processing returns to step S11, and new training data is input to the correction unit 11.
Upon determining that at least the predetermined amount of training data has been collected (step S14: Yes), the normalization/standardization unit 13 performs normalization/standardization on the pieces of detected data classified by the classification unit 12 according to the types of the sensors (step S15).
The learning unit 14 performs machine learning on a learning model, using the detected data normalized/standardized by the normalization/standardization unit 13 as training data (step S16), to build a trained model. Thereafter, the learning unit 14 outputs the trained model thus built (step S17). Note that various models, including a model using the convolutional neural network, the SVM (Support Vector Machine), and so on, may be used as the learning model.
As described with reference to
Next, an estimation method performed by the estimation apparatus 20 according to the present embodiment will be described with reference to the flowchart shown in
Upon receiving, as input data, pieces of data detected by the plurality of types of sensors that detect the state of the subject (step S21), the correction unit 21 corrects the input detected data to make the directions of the sensors uniform (step S22).
The classification unit 22 classifies the pieces of detected data thus corrected by the correction unit 21, according to the types of the sensors (step S23).
The normalization/standardization unit 23 performs normalization/standardization on the pieces of detected data classified by the classification unit 22 according to the types of the sensors (step S24).
The estimation unit 25 estimates the state of the subject by inputting the detected data normalized/standardized by the normalization/standardization unit 23 to the trained model built by the learning apparatus 10 (step S25), and outputs an output from the trained model as the result of estimation (step S26).
As described with reference to
In this way, in the present embodiment, the learning apparatus 10 includes a normalization/standardization unit 13 that performs normalization or standardization on pieces of data detected by a plurality of types of sensors, and a learning unit 14 that builds a model by performing machine learning, using, as training data, the detected data on which normalization or standardization has been performed by the normalization/standardization unit 13. The normalization/standardization unit 13 performs normalization or standardization for each type of sensor, on data detected by the sensor.
Also, in the present embodiment, the estimation apparatus 20 includes a normalization/standardization unit 23 that performs normalization or standardization on data detected by a plurality of types of sensors, and an estimation unit 25 that estimates the state of the subject by applying the detected data that has been normalized or standardized by the normalization/standardization unit 23, to a model. The normalization/standardization unit 23 performs normalization or standardization for each type of sensor, on data detected by the sensor.
By performing normalization or standardization on detected data for each type of sensor, it is possible to perform normalization or standardization considering the differences between the averages/variances of the values detected by the sensors. In addition, by performing normalization or standardization on detected data for each type of sensor, it is possible to perform normalization or standardization considering changes in the value range caused due to the values detected by the sensor being corrected in order to make the directions of the sensors uniform. Therefore, with the learning apparatus 10 and the estimation apparatus 20 according to the present embodiment, it is possible to improve accuracy in performing machine learning on a model, using training data, and in performing estimation, using a model.
While the learning apparatus 10 and the estimation apparatus 20 have been described above, a computer may be used so as to function as the learning apparatus 10 and the estimation apparatus 20. Such a computer can be realized by storing a program that describes the content of processing performed to realize the functions of the learning apparatus 10 and the estimation apparatus 20, in a storage unit of the computer, and causing a CPU of the computer to read out and execute the program.
The program may be recorded on a computer-readable recording medium. By using such a recording medium, it is possible to install the program to a computer. Here, the recording medium on which the program is recorded may be a non-transitory recording medium. A non-transitory recording medium is not specifically limited, and may be a recording medium such as a CD-ROM or a DVD-ROM, for example.
Although the above embodiment has been described as a presentative example, it is obvious for a person skilled in the art that various modifications and replacements may be applied within the spirit and the scope of the present invention. Therefore, the present invention should not be construed as being limited by the above-described embodiment, and various modifications and changes may be made without departing from the scope of the claims. For example, in the configuration according to the present invention, it is possible to combine a plurality of constituent blocks described in the configuration diagram according to the embodiment into one block, or to divide one constituent block into a plurality of blocks.
10 Learning apparatus
11 Correction unit
12 Classification unit
13 Normalization/standardization unit
14 Learning unit
15 Storage unit
20 Specification apparatus
21 Correction unit
22 Classification unit
23 Normalization/standardization unit
24 Storage unit
25 Estimation unit
Number | Date | Country | Kind |
---|---|---|---|
2018-176168 | Sep 2018 | JP | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2019/035345 | 9/9/2019 | WO | 00 |