Learning method, estimation method, learning device, estimation device, and program
By maximizing correlation during initial learning and minimizing error during relearning, the method generates a highly accurate trained model that adapts to changes in magnitude relationships, addressing inaccuracies in conventional estimation techniques.
Patent Information
- Application Number
- JP2023526703
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-06-08
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2041-06-08
AI Technical Summary
Conventional estimation techniques using transfer learning or fine-tuning struggle to generate highly accurate trained models when there is a change in the magnitude relationship between explanatory and explained variables due to insufficient learning data, leading to inaccuracies in estimating explained variables.
A learning method that maximizes the correlation coefficient between explanatory and explained variables during initial learning and minimizes the error during relearning, using a multilayer neural network to generate a second trained model that adapts to changes in magnitude relationships.
This approach ensures the generation of a highly accurate trained model capable of estimating explained variables even when there are changes in the magnitude relationship between explanatory and explained variables, improving estimation accuracy.
Smart Images

Figure 0007548431000014 
Figure 0007548431000015 
Figure 0007548431000016
Abstract
Description
[Technical field]
[0001] The disclosed technology relates to a learning method, an estimation method, a learning device, an estimation device, and a program. [Background technology]
[0002] Conventionally, a technique is known in which an unknown value (hereinafter also simply referred to as an "explained variable") is estimated by inputting a predetermined value (hereinafter also simply referred to as an "explanatory variable") to a trained model that has been pre-machine trained.
[0003] When using such a technique, there may be a case where the amount of training data, which is a pair of a learning dependent variable and a learning explanatory variable, is small and the number of training data is insufficient. In this case, for example, a transfer learning process or a fine-tuning process may be performed on a trained model.
[0004] When transfer learning is performed, first, a trained model is created based on the training data and related data (hereinafter, also simply referred to as "initial training"). Then, a part or all of the trained model is trained again based on a small amount of training data (hereinafter, also referred to as "relearning"). This results in a trained model for estimating an explained variable from an explanatory variable (see, for example, Non-Patent Document 1). [Prior art documents] [Non-patent literature]
[0005] [Non-Patent Document 1] Yoshitomo Futagaki, Katsufumi Inoue, and Michifumi Yoshioka, "DNN Learning Method for Small Training Data by Transfer Learning and Knowledge Distillation," IEEJ Transactions on Electrical Engineering, Vol. 140, No.6, pp.664-672, 2020. Summary of the Invention [Problem to be solved by the invention]
[0006] In the conventional techniques including the above-mentioned Non-Patent Document 1, in both the initial learning and re-learning in transfer learning or fine-tuning, a numerical or probabilistic error such as a mean squared error, a classification accuracy rate, or a cross entry is used as a loss function for learning and evaluating a learning model.
[0007] However, even if the correlation between the explanatory variables and the explained variables is constant, the magnitude relationship may change between the learning data at the time of the initial learning and the learning data at the time of the re-learning. In this case, there is a problem that it is not possible to generate a trained model with high accuracy even if the trained model is generated by minimizing the numerical and probabilistic errors.
[0008] For example, consider a case where the temperature at a specific location of the air conditioning equipment is the explanatory variable and the temperature at a specific location indoors is the explained variable. In this case, assume that there is a small amount of learning data for summer and a large amount of learning data for winter. In this case, for example, a learning model is initially trained based on the winter learning data to generate a trained model, and the trained model is retrained based on the summer learning data to generate a trained model for summer. The trained model for summer is a trained model for estimating the temperature at a specific location indoors in summer from the temperature at the specific location of the air conditioning equipment in summer.
[0009] However, in winter, there is a magnitude relationship in which the temperature at a specific location of the air conditioning equipment is higher than the temperature at a specific location in the room. On the other hand, in summer, there is a magnitude relationship in which the temperature at a specific location of the air conditioning equipment is lower than the temperature at a specific location in the room. These magnitude relationships also appear in the learning data. For this reason, as described above, when generating a trained model for summer by performing initial learning based on winter learning data and performing re-learning based on summer learning data, even if a numerical or probabilistic loss function such as mean square error is used, there is a problem that a trained model with good accuracy for estimating the explained variable from the explanatory variable cannot be generated due to the change in the magnitude relationship between the explanatory variable and the explained variable of the learning data used for initial learning and the magnitude relationship between the explanatory variable and the explained variable of the learning data used for re-learning.
[0010] The disclosed technology has been made in consideration of the above-mentioned points, and aims to generate an accurate trained model for estimating an explained variable from an explanatory variable, even when there is a change in the magnitude relationship between the explanatory variables and the explained variable of the learning data used for initial learning and the magnitude relationship between the explanatory variables and the explained variable of the learning data used for re-learning. [Means for solving the problem]
[0011] A first aspect of the present disclosure is a learning method, the learning method comprising: a computer executing a process of: when training a learning model that outputs an explained variable when an explanatory variable is input based on first training data representing a pair of a first explanatory variable for training and a first dependent variable for training, training the learning model so that a correlation coefficient between the first dependent variable for training and the dependent variable output from the learning model is maximized, thereby generating a first trained model; and when re-training the first trained model based on second training data representing a pair of a second explanatory variable for training and a second dependent variable for training, re-training the first trained model so that an error between the second dependent variable for training and the dependent variable output from the first trained model is minimized, thereby generating a second trained model.
[0012] A second aspect of the present disclosure is a learning device including: a first learning unit that, when training a learning model that outputs an explained variable when an explanatory variable is input based on first learning data representing a pair of a first explanatory variable for learning and a first explained variable for learning, generates a first trained model by training the learning model so that a correlation coefficient between the first explained variable for learning and the explained variable output from the learning model is maximized; and a second learning unit that, when re-training the first trained model based on second learning data representing a pair of a second explanatory variable for learning and a second explained variable for learning, generates a second trained model by re-training the first trained model so that an error between the second explained variable for learning and the explained variable output from the first trained model is minimized. Effect of the Invention
[0013] According to the disclosed technology, even if there is a change in the magnitude relationship between the explanatory variables and the explained variables of the learning data used for initial learning and the magnitude relationship between the explanatory variables and the explained variables of the learning data used for re-learning, it is possible to generate an accurate trained model for estimating the explained variables from the explanatory variables. [Brief description of the drawings]
[0014] [Figure 1] 1 is a block diagram showing a hardware configuration of a learning device 10 according to the present embodiment. [Diagram 2] 1 is a block diagram showing an example of a functional configuration of a learning device 10 according to the present embodiment. [Diagram 3] 4 is a flowchart showing the flow of a learning process by the learning device 10 according to the present embodiment. [Figure 4] 4 is a flowchart showing the flow of an estimation process performed by the learning device 10 according to the present embodiment. [Diagram 5] FIG. 1 is a diagram for explaining a first embodiment. [Figure 6] FIG. 1 is a diagram for explaining a first embodiment. [Figure 7] FIG. 1 is a diagram for explaining a first embodiment. [Figure 8] FIG. 1 is a diagram for explaining a first embodiment. [Figure 9] FIG. 1 is a diagram for explaining a first embodiment. [Figure 10] FIG. 11 is a diagram for explaining a second embodiment. [Figure 11] FIG. 11 is a diagram for explaining a second embodiment. [Figure 12] FIG. 11 is a diagram for explaining a second embodiment. [Figure 13] FIG. 11 is a diagram for explaining a second embodiment. [Figure 14] FIG. 11 is a diagram for explaining a second embodiment. [Figure 15] FIG. 11 is a diagram for explaining a second embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0015] Hereinafter, an example of an embodiment of the disclosed technology will be described with reference to the drawings. In each drawing, the same or equivalent components and parts are given the same reference numerals. In addition, the dimensional ratios of the drawings are exaggerated for the convenience of explanation and may differ from the actual ratios.
[0016] Fig. 1 is a block diagram showing the hardware configuration of a learning device 10. As shown in Fig. 1, the learning device 10 has a CPU (Central Processing Unit) 11, a ROM (Read Only Memory) 12, a RAM (Random Access Memory) 13, a storage 14, an input unit 15, a display unit 16, and a communication interface (I / F) 17. Each component is connected to each other via a bus 19 so as to be able to communicate with each other.
[0017] The CPU 11 is a central processing unit, and executes various programs and controls each part. That is, the CPU 11 reads a program from the ROM 12 or the storage 14, and executes the program using the RAM 13 as a working area. The CPU 11 controls each of the above components and performs various arithmetic processing according to the program stored in the ROM 12 or the storage 14. In this embodiment, the ROM 12 or the storage 14 stores a program for training a learning model to generate a trained model, and a program for estimating an explained variable from an explanatory variable using the trained model.
[0018] The ROM 12 stores various programs and various data. The RAM 13 temporarily stores programs or data as a working area. The storage 14 is configured with a storage device such as an HDD (Hard Disk Drive) or an SSD (Solid State Drive), and stores various programs including an operating system, and various data.
[0019] The input unit 15 includes a pointing device such as a mouse, and a keyboard, and is used to perform various input operations.
[0020] The display unit 16 is, for example, a liquid crystal display, and displays various information. The display unit 16 may function as the input unit 15 by adopting a touch panel system.
[0021] The communication interface 17 is an interface for communicating with other devices such as a mobile terminal. For this communication, for example, a wired communication standard such as Ethernet (registered trademark) or FDDI, or a wireless communication standard such as 4G, 5G, or Wi-Fi (registered trademark) is used.
[0022] Next, the functional configuration of the learning device 10 will be described.
[0023] FIG. 2 is a block diagram showing an example of the functional configuration of the learning device 10.
[0024] 2, the learning device 10 has, as its functional components, a setting value storage unit 100, a first learning data storage unit 102, a first trained model storage unit 104, a second learning data storage unit 106, a second trained model storage unit 108, an estimation data storage unit 110, an estimation result storage unit 112, a first learning unit 120, a second learning unit 122, an acquisition unit 124, and an estimation unit 126. Each functional component is realized by the CPU 11 reading out a program stored in the ROM 12 or the storage 14, expanding the program in the RAM 13, and executing the program.
[0025] Various setting values are stored in the setting value storage unit 100. Specifically, the setting value storage unit 100 stores the contents of explanatory variables and explained variables of learning data used in a first learning unit 120 and a second learning unit 122 described later, the ranges of explanatory variables and explained variables, the type of loss used in the learning process, information on a second trained model used in an estimation unit 126 described later, and the contents of explained variables for estimation used in an estimation unit 126 described later. The learning device 10 acquires various setting values via a communication interface 17 and stores the various setting values in the setting value storage unit 100. The setting values stored in the setting value storage unit 100 are read out by each unit described later.
[0026] The first learning data storage unit 102 stores first learning data, which is a pair of a first explanatory variable for learning and a first explained variable for learning. The first learning data is learning data used in initial learning by the first learning unit 120, which will be described later. The data used in this embodiment is, for example, time-series data.
[0027] The first trained model storage unit 104 stores a first trained model generated by a first learning unit 120 described later. The first trained model is a trained model generated by initial learning based on the first learning data stored in the first learning data storage unit 102.
[0028] Second learning data, which is a pair of a second explanatory variable for learning and a second explained variable for learning, is stored in the second learning data storage unit 106. The second learning data is learning data used in re-learning by the second learning unit 122 described later.
[0029] The second trained model storage unit 108 stores a second trained model generated by a second learning unit 122 described later. The second trained model is a trained model generated by re-learning based on the second training data stored in the second training data storage unit 106.
[0030] The estimation data storage unit 110 stores explanatory variables used for estimation by the estimation unit 126 described later.
[0031] The estimation result storage unit 112 stores the explained variables estimated by the estimating unit 126.
[0032] The first learning unit 120 initially learns a learning model that outputs an explained variable when an explanatory variable is input based on the setting value stored in the setting value storage unit 100 and the multiple first learning data stored in the first learning data storage unit 102. At this time, the first learning unit 120 generates a first trained model by training the learning model so that the correlation coefficient between the first explained variable for learning and the explained variable output from the learning model being trained or the first trained model is maximized. Then, the first learning unit 120 stores the first trained model in the first trained model storage unit 104. Note that the first trained model storage unit 104 may store multiple first trained models. In this case, the second learning unit 122 described later reads out a trained model corresponding to the ID from the multiple trained models stored in the first trained model storage unit 104 based on the ID of the first trained model.
[0033] The second learning unit 122 re-learns the first trained model based on the setting values stored in the setting value storage unit 100 and the multiple pieces of training data stored in the second training data storage unit 106. At this time, the second learning unit 122 generates the second trained model by re-learning the first trained model so that an error between a second explained variable for training and an explained variable output from the first trained model or the second trained model being trained is minimized. Then, the second learning unit 122 stores the second trained model in the second trained model storage unit 108.
[0034] The acquisition unit 124 acquires explanatory variables of the estimation target stored in the estimation data storage unit 110.
[0035] The estimation unit 126 acquires an explained variable for the explanatory variable of the estimation target by inputting the explanatory variable of the estimation target estimated by the acquisition unit 124 to the second trained model stored in the second trained model storage unit 108. Then, the estimation unit 126 stores the explained variable for the explanatory variable of the estimation target in the estimation result storage unit 112.
[0036] Next, the operation of the learning device 10 will be described.
[0037] 3 is a flowchart showing the flow of the learning process by the learning device 10. The CPU 11 reads out a learning process program from the ROM 12 or the storage 14, loads it into the RAM 13, and executes it, thereby performing the learning process.
[0038] In step S100, the CPU 11, functioning as the first learning unit 120, acquires setting values for initial learning from the setting value storage unit 100. For example, the CPU 11 acquires, as the setting values, information including information on the type of loss used during initial learning, information on the data type of the first learning data which is a pair of a first explanatory variable and a first explained variable used in the initial learning, and information on the period of the learning data.
[0039] In step S102, the CPU 11, as the first learning unit 120, acquires first learning data from the first learning data storage unit 102 based on the setting value acquired in step S100. For example, the CPU 11 acquires first learning data for a predetermined period. Note that the first learning data is a pair of a first explanatory variable X' for learning and a first explained variable Y' for learning.
[0040] In step S104, the CPU 11, as the first learning unit 120, generates a first trained model by initially training the learning model based on the first learning data acquired in step S102. Specifically, the CPU 11 calculates an explained variable x′, which is output from the first trained model M when a first explanatory variable X′ for learning is input to the first trained model M during training, according to the following formula (1): JPEG0007548431000001.jpg98 The learning model is initially trained so as to maximize the correlation coefficient between the first dependent variable Y′ for learning and the first trained model M, thereby generating a first trained model M.
[0041]
number
[0042] For example, the CPU 11 selects a function 1 / (r+1) including a correlation coefficient r as a loss function based on information on the type of loss used during initial learning among the setting values acquired in step S100. Then, the CPU 11 generates a first trained model M by initially training the learning model so that the loss function 1 / (r+1) is minimized.
[0043] In addition, the first trained model in this embodiment is a multi-layer neural network and is expressed by the following equation. n represents the parameters of a layer in a multi-layer neural network. The following formula represents an n-layer neural network.
[0044]
number
[0045] In addition, in a mathematical formula, a symbol (for example, X) with "^" above it may be represented as ^X hereinafter.
[0046] Then, the CPU 11 stores the generated first trained model M in the first trained model storage unit 104.
[0047] In step S106, the CPU 11, functioning as the second learning unit 122, acquires setting values for re-learning from the setting value storage unit 100. For example, the CPU 11 acquires, as setting values, information including information on the date and time of the start of re-learning or information on the start of immediate re-learning, information on the type of loss used during re-learning, the ID of the first trained model, information on the data type of second learning data which is a pair of a second explanatory variable and a second explained variable used in re-learning, information on the period of the learning data, and information n' of the layer in which re-learning is performed. Note that the following processing is executed according to the date and time of the start of re-learning or the information on the start of immediate re-learning.
[0048] In step S108, the CPU 11, functioning as the second learning unit 122, acquires the first trained model M stored in the first trained model storage unit 104 based on the setting value acquired in step S106. For example, the CPU 11 reads out the first trained model M corresponding to the ID from the multiple trained models stored in the first trained model storage unit 104 based on the ID of the first trained model acquired in step S106.
[0049] In step S110, the CPU 11, functioning as the second learning unit 122, acquires second learning data from the second learning data storage unit 106 based on the setting value acquired in step S106. Note that the second learning data is a pair of a second explanatory variable X'' for learning and a second explained variable Y'' for learning.
[0050] In step S112, the CPU 11, as the second learning unit 122, generates a second trained model M' by re-learning the first trained model M acquired in step S108 based on the second learning data acquired in step S110. Specifically, the CPU 11 generates the second trained model M' by re-learning the first trained model M so that an error between an explained variable ^Y'' output from the second trained model M' when a second explanatory variable X'' for learning is input to the second trained model M' being trained, which is calculated according to the following formula (2), and the second explained variable Y'' for learning is minimized.
[0051]
number
[0052] For example, the CPU 11 selects the mean square error as the loss function based on information on the type of loss used during re-learning among the setting values acquired in step S106. Then, the CPU 11 generates the second trained model M' by re-learning the first trained model M so that the mean square error is minimized.
[0053] Furthermore, when CPU 11 re-trains the first trained model M so as to minimize the error between the explained variable ^Y'' and the second explained variable Y'' for learning, CPU 11 fixes some parameters of the first trained model M and changes parameters different from some of the parameters of the first trained model M, thereby generating a second trained model M'. Specifically, CPU 11 generates the second trained model M' shown below based on information n' of the layer to be re-trained among the setting values acquired in step S106. In the second trained model M' below, l' indicates that the parameters from the (n-n'+1)th layer to the nth layer of the first trained model M have been updated by re-learning.
[0054]
number
[0055] Then, the CPU 11 stores the generated second trained model M′ in the second trained model storage unit 108.
[0056] By executing the learning process routine of FIG. 3, the second trained model M′ is stored in the second trained model storage unit 108 and is used during the estimation process described below.
[0057] 4 is a flowchart showing the flow of the estimation process by the learning device 10. The CPU 11 reads out an estimation process program from the ROM 12 or the storage 14, loads it into the RAM 13, and executes it, thereby performing the estimation process.
[0058] In step S200, the CPU 11, functioning as the acquisition unit 124, acquires setting values for estimation from the setting value storage unit 100. For example, the CPU 11 acquires, as setting values, information including the date and time of the estimation start or information on the immediate estimation start, the ID of the second trained model M' used during estimation, information on the data type of the explained variable to be estimated, and information on the period of the explained variable. Note that the following processing is executed according to the date and time of the estimation start or the information on the immediate estimation start.
[0059] In step S202, CPU 11 functions as acquisition unit 124 to acquire explanatory variable X of the estimation target from estimation data storage unit 110 based on the setting value acquired in step S200.
[0060] In step S204, the CPU 11, functioning as the acquisition unit 124, acquires the second trained model M′ from the second trained model storage unit 108 based on the setting value acquired in step S200.
[0061] In step S206, the CPU 11, as the estimation unit 126, inputs the explanatory variable X of the estimation target obtained in step S202 to the second trained model M' obtained in step S204, and obtains an explained variable ^Y for the explanatory variable X of the estimation target according to the following equation (3).
[0062]
number
[0063] Then, the CPU 11 stores the explained variable ^Y for the explanatory variable X of the estimation target in the estimation result storage unit 112.
[0064] As described above, the learning device of the embodiment trains a learning model that outputs an explained variable when an explanatory variable is input based on the first learning data representing a pair of a first explanatory variable for learning and a first explained variable for learning, so that the correlation coefficient between the first explained variable for learning and the explained variable output from the learning model is maximized, thereby generating a first trained model. Then, the learning device re-trains the first trained model based on the second learning data representing a pair of a second explanatory variable for learning and a second explained variable for learning, so that the error between the second explained variable for learning and the explained variable output from the first trained model is minimized, thereby generating a second trained model. As a result, even if there is a change between the magnitude relationship between the explanatory variable and the explained variable of the learning data used for the initial learning and the magnitude relationship between the explanatory variable and the explained variable of the learning data used for re-learning, it is possible to generate a trained model with high accuracy for estimating the explained variable from the explanatory variable.
[0065] Furthermore, by using the above-mentioned trained model, the learning device of the embodiment can obtain accurate estimation results using the re-trained trained model even if there is a change in the magnitude relationship between the explanatory variables and the explained variables of the learning data used for initial learning and the magnitude relationship between the explanatory variables and the explained variables of the learning data used for re-learning. EXAMPLES
[0066] In this embodiment, a case where the room temperature distribution in a large indoor space is estimated from the room temperature at a representative point in the room will be described as an example. Therefore, the room temperature at the representative point in the room is an explanatory variable, and the room temperature distribution is an explained variable.
[0067] In this embodiment 1, an example will be described in which the room temperature at a representative point in an indoor space (hereinafter also simply referred to as "representative point temperature") and room temperatures at six points (hereinafter also simply referred to as "room temperature distribution") are simultaneously measured for about two months in the summer of a certain year y1. Then, it is assumed that the representative point room temperature and room temperature distribution are measured at the same point only for three days in the summer of the year y2 following the year y1 when the configuration of the air conditioning equipment is significantly changed. In this case, a large amount of learning data exists in a certain year y1, whereas the amount of learning data in the following year y2 is small. On this premise, an example will be described below in which the room temperature distribution for 30 days in the summer of the following year y2 is estimated from the representative point room temperature for those 30 days.
[0068] The configuration of the learning device described in this Example 1 is similar to that of the learning device 10 of the above embodiment. In addition, the operation of the learning device described in this Example 1 is also similar to that of the learning device 10 of the above embodiment, so the operation of this example will be described using the processing flows shown in Figures 3 and 4.
[0069] 5 shows the contents of the setting values in this embodiment 1. The setting value storage unit 100 stores various setting values as shown in FIG.
[0070] Moreover, first learning data for initial learning is shown in Fig. 6. The first learning data storage unit 102 stores the first learning data as shown in Fig. 6.
[0071] The second learning data for re-learning is shown in Fig. 7. The second learning data storage unit 106 stores the second learning data as shown in Fig. 7.
[0072] A vector of explanatory variables to be estimated is shown in Fig. 8. Estimation data storage unit 110 stores a vector of explanatory variables as shown in Fig. 8.
[0073] The estimated vector of the explained variables is shown in Fig. 9. The estimation result storage unit 112 stores the vector of the explained variables as shown in Fig. 9 as the estimation result.
[0074] The operation of the learning device of the first embodiment will be described below with reference to FIG.
[0075] In step S100, the CPU 11, functioning as the first learning unit 120, acquires from the setting value storage unit 100 a loss for initial learning, an explained variable for initial learning, an explanatory variable for initial learning, an initial learning period, and the number of initial learning layers.
[0076] Specifically, CPU 11 acquires information representing "1 / (correlation coefficient+1)" as the initial learning loss. CPU 11 also acquires information representing "representative point room temperature" as the initial learning explanatory variable. CPU 11 also acquires information representing [room temperature 1, room temperature 2, room temperature 3, room temperature 4, room temperature 5, room temperature 6] as the initial learning explained variable. CPU 11 also acquires information representing [2019-08-01 00:00:00, 2019-10-31 23:50:00] as the initial learning period. CPU 11 also acquires "10" as the initial learning layer number.
[0077] In step S102, the CPU 11, functioning as the first learning unit 120, acquires first learning data from the first learning data storage unit 102 based on the setting value acquired in step S100.
[0078] Specifically, based on the initial learning explanatory variable "representative point room temperature" among the setting values acquired in step S100, the initial learning explained variables [room temperature 1, room temperature 2, room temperature 3, room temperature 4, room temperature 5, room temperature 6], and the initial learning period [2019-08-01 00:00:00, 2019-10-31 23:50:00], the CPU 11 acquires the representative point room temperature from 2019-08-01 00:00:00 to 2019-10-31 23:50:00 as the first explanatory variable X' for learning, and acquires room temperatures 1 to 6, which are the room temperature distribution from 2019-08-01 00:00:00 to 2019-10-31 23:50:00, as the first explained variable Y' for learning.
[0079] In step S104, the CPU 11, functioning as the first learning unit 120, generates a first trained model by initially training the learning model based on the first learning data acquired in step S102.
[0080] Specifically, the CPU 11 initially trains a neural network model M with 10 initial training layers, as expressed by the following formula, so that when a first explanatory variable X' for learning is input to the first trained model M during learning according to the above formula (1), the correlation between the explained variable ^Y' output from the first trained model M and the first explained variable Y' for learning is maximized.
[0081]
number
[0082] The loss function used in the initial learning is 1 / (r+1), which includes the correlation coefficient r between the explained variable ^Y' and the first explained variable Y' for learning, based on the initial learning loss, which is the set value obtained in step S100.
[0083] Then, the CPU 11 stores the generated first trained model M in the first trained model storage unit 104.
[0084] In step S106, the CPU 11, as the second learning unit 122, acquires setting values for re-learning from the setting value storage unit 100. For example, the CPU 11 acquires a re-learning start layer, a loss function for re-learning, an explained variable for re-learning, an explanatory variable for re-learning, and a period of learning data for re-learning as setting values. Specifically, the CPU 11 acquires "3" as the re-learning start layer. The CPU 11 also acquires "Mean Squared Error" as the loss for re-learning. The CPU 11 also acquires "representative point room temperature" as the explanatory variable for re-learning. The CPU 11 also acquires [room temperature 1, room temperature 2, room temperature 3, room temperature 4, room temperature 5, room temperature 6] as the explained variables for re-learning. The CPU 11 also acquires [2020-08-01 00:00:00, 2020-08-02 23:50:00] as the re-learning period.
[0085] In step S108, the CPU 11, functioning as the second learning unit 122, acquires the first trained model M stored in the first trained model storage unit 104 based on the setting value acquired in step S106.
[0086] In step S110, the CPU 11, functioning as the second learning unit 122, acquires second learning data from the second learning data storage unit 106 based on the setting value acquired in step S106. Note that the second learning data is a pair of a second explanatory variable X'' for learning and a second explained variable Y'' for learning.
[0087] Specifically, CPU 11 acquires the representative room temperature for the re-learning period [2020.8.1. 00:00:00 to 2020-8-1 23:50:00] among the setting values acquired in step S106 as a second explanatory variable X'' for learning, and acquires room temperatures 1 to 6, which are the room temperature distribution for the re-learning period [2020.8.1. 00:00:00 to 2020-8-1 23:50:00], as a second explained variable Y'' for learning.
[0088] In step S112, the CPU 11, as the second learning unit 122, generates a second learned model M' by re-learning the first learned model M acquired in step S108 based on the second learning data acquired in step S110.
[0089] Specifically, CPU 11 generates a second trained model M' of the following formula by re-learning the parameters from the 8th to 10th layers of the first trained model M so that the mean squared error between the explained variable ^Y'' output from the second trained model M' and the second explained variable Y'' for learning, calculated according to the above formula (2), is minimized when the second explanatory variable X'' for learning is input into the second trained model M' during learning.
[0090]
number
[0091] Then, the CPU 11 stores the generated second trained model M′ in the second trained model storage unit 108.
[0092] By executing the learning process routine of FIG. 3, the second trained model M′ is stored in the second trained model storage unit 108 and is used during the estimation process described below.
[0093] Next, the learning device 10 of this embodiment executes the estimation process shown in FIG.
[0094] In step S200, the CPU 11, functioning as the acquisition unit 124, acquires an estimation explanatory variable and an estimation period from the setting value storage unit 100 as setting values.
[0095] For example, the CPU 11 acquires the representative point room temperature as the estimation explanatory variable, and acquires [2020-08-02 00:00:00, 2020-09-30 23:50:00] as the estimation period.
[0096] In step S202, the CPU 11, as the acquisition unit 124, acquires explanatory variable X of the estimation target from the estimation data storage unit 110 based on the setting value acquired in step S200. Specifically, the CPU 11 acquires data of the representative point room temperature from the estimation period 2020.8.2.00:00:00 to 2020.9.30.23:50:00 from the contents of Fig. 8 as explanatory variable X of the estimation target.
[0097] In step S204, the CPU 11, functioning as the acquisition unit 124, acquires the second trained model M′ from the second trained model storage unit 108.
[0098] In step S206, the CPU 11, as the estimation unit 126, inputs the explanatory variable X of the estimation target obtained in step S202 to the second trained model M' obtained in step S204, and thereby obtains the explained variable ^Y for the explanatory variable X of the estimation target according to the above formula (3).
[0099] Then, CPU 11 stores the explained variable ^Y for the explanatory variable X of the estimation target in the estimation result storage unit 112. The explained variable ^Y for the explanatory variable X of the estimation target is the estimation result as shown in Fig. 9. As shown in Fig. 9, the estimation results of room temperatures 1 to 6, which are the explained variable ^Y, are stored in the estimation result storage unit 112. EXAMPLES
[0100] In this second embodiment, a case in which re-learning and evaluation are performed using a plurality of first trained models will be described as an example.
[0101] In this second embodiment, after initial learning is performed using several patterns, re-learning and evaluation are performed using a plurality of first trained models during re-learning.
[0102] The configuration of the learning device described in this Example 2 is similar to that of the learning device 10 of the above embodiment. The operation of the learning device described in this Example 2 will be described using the process flows shown in Figures 10 to 12. In this Example 2, it is assumed that a setting file such as that shown in Figure 13 is stored in the setting value storage unit 100.
[0103] The operation of the learning device of this embodiment will be described below with reference to FIGS.
[0104] The initial learning of the learning model is performed according to the process flow of FIG.
[0105] In step S300, the CPU 11, as the first learning unit 120, acquires n=5 setting value lists from a setting file stored in the setting value storage unit 100. As shown in FIG. 13, each setting value list includes information on the initial learning loss, the initial learning explained variable, the initial learning explanatory variable, the initial learning period, and the initial learning model. The initial learning model is a learning model that performs initial learning. The information on the initial learning model includes configuration information of a machine learning model such as a neural network that is a learning model used in initial learning. For example, "Dense" and "LSTM" shown in FIG. 13 are information that indicate the type of layer of a neural network.
[0106] 13 also shows a plurality of setting value lists conf1, conf2, . . . , conf5. In the first embodiment, a plurality of first trained models are generated based on each of the plurality of setting value lists.
[0107] In step S302, CPU 11 sets i, which indicates the order of the setting value list, as first learning unit 120. Note that i=1 is set initially, and in step S303 described later, the first setting value list is the processing target.
[0108] In step S303, the CPU 11 sets, as the first learning unit 120, the i-th set value list from among the n set value lists acquired in step S300 as the processing target.
[0109] In step S304, the CPU 11 acquires, as the first learning unit 120, the i-th first learning data from the first learning data storage unit 102.
[0110] Specifically, the CPU 11 acquires, from the first learning data storage unit 102, a pair of the first explanatory variable X' for learning and the first explained variable Y' for learning, which are the i-th first learning data.
[0111] In step S306, the CPU 11 generates, as the first learning unit 120, the i-th first learned model based on the i-th first learning data acquired in step S304.
[0112] Specifically, the CPU 11 generates the i-th first learned model M' such that the correlation between the first explained variable Y' for learning and the first explained variable ^Y' output from the i-th first learned model M' is maximized. Note that the neural network that is the i-th first learned model M' is represented by the following formula.
[0113]
Equation
[0114] Then, the CPU 11 stores the i-th first learned model M' in the first learned model storage unit 104.
[0115] In step S308, the CPU 11 determines, as the first learning unit 120, whether i < n. If i < n, the process proceeds to step S310. On the other hand, if i ≥ n, the process ends.
[0116] In step S310, the CPU 11, as the first learning unit 120, resets i to i+1, and the process proceeds to step S302.
[0117] The processes of steps S300 to S310 are repeated until i becomes 1 to 5. As a result, n first trained models are generated based on n setting value files. Therefore, five first trained models are stored in the first trained model storage unit 104, as shown in FIG.
[0118] Next, re-learning of the first trained model will be described. Re-learning of the first trained model is executed according to the process flow of FIG.
[0119] In step S400, CPU 11 functioning as second learning unit 122 acquires from setting value storage unit 100 a list of n setting values for re-learning.
[0120] In step S402, CPU 11 sets i representing the order of the setting value list as second learning unit 122. Note that i=1 is set initially, and the first setting value list is the processing target in each process described below.
[0121] In step S404, the CPU 11, functioning as the second learning unit 122, retrieves the first trained model M with ID=i from the first trained model storage unit 104. i Get the.
[0122] In step S406, the CPU 11, functioning as the second learning unit 122, acquires second learning data from the second learning data storage unit 106 based on the i-th set value list. Note that the second learning data includes a second explanatory variable X i '' and the second dependent variable Y i It is paired with ''.
[0123] In step S408, the CPU 11, functioning as the second learning unit 122, generates a second trained model based on the i-th setting value list and the second learning data acquired in step S406.
[0124] Specifically, the CPU 11 calculates the error between the explained variable ^Y″ output from the second trained model M′ during training and the second explained variable Y″ for training, which is calculated according to the following formula, by the i-th first trained model M i n' i +1~n i The second trained model M i '. Note that n' i is the re-learning start layer in the setting value file, which is 3 in this embodiment.
[0125]
number
[0126] Then, CPU11 uses two trained models M i ' is stored in the second trained model storage unit 108.
[0127] In step S410, the CPU 11, functioning as the second learning unit 122, i ' Calculate the loss.
[0128] Specifically, the CPU 11 calculates the second trained model M according to the following formula: i 'The second dependent variable ^Y i The difference between '' and the second dependent variable Y'' for training is the loss loss i Calculate as follows.
[0129]
number
[0130] In step S412, the CPU 11, as the second learning unit 122, associates the second learned model M i ' generated in step S408 with the loss loss i calculated in step S410, and stores them in the second learned model storage unit 108.
[0131] In step S414, the CPU 11, as the second learning unit 122, determines whether i < n. If i < n, the process proceeds to step S416. On the other hand, if i ≥ n, the process ends.
[0132] In step S416, the CPU 11, as the second learning unit 122, resets i to i + 1 and proceeds to step S402.
[0133] The processing of steps S400 to S416 is repeated until i becomes from 1 to 5. As a result, five second learned models are generated based on five setting value files.
[0134] Next, the estimation process will be described. The estimation process is executed according to the processing flow of FIG. 12.
[0135] In step S500, the CPU 11, as the acquisition unit 124, acquires the setting value list shown in FIG. 15.
[0136] In step S502, the CPU 11, as the acquisition unit 124, acquires the explanatory variable X of the estimation target from the estimation data storage unit 110 based on the explanatory variable for estimation and the estimation period in the setting value list acquired in step S500.
[0137] In step S504, the CPU 11, as the acquisition unit 124, acquires the second learned model M * with the minimum loss from the second learning data storage unit 106.
[0138] In step S506, the CPU 11, functioning as the estimation unit 126, calculates the explanatory variable X of the estimation target acquired in step S502 based on the second trained model M acquired in step S504 according to the following formula: * to obtain an explained variable ^Y for the explanatory variable X of the estimation target. Then, the CPU 11 stores the explained variable ^Y in the estimation result storage unit 112.
[0139]
number
[0140] In the second embodiment, the initial learning of multiple patterns is performed, and the first trained model with the smallest loss in the initial learning is used for re-learning, but the present invention is not limited to this. For example, in the re-learning, multiple setting value lists may be stored in the setting file, and re-learning may be performed with multiple patterns, and the estimation unit 126 may perform estimation using the second trained model with the smallest loss among them.
[0141] In the above embodiment, various processes executed by the CPU after reading the software (program) may be executed by various processors other than the CPU. Examples of the processor in this case include a PLD (Programmable Logic Device) such as an FPGA (Field-Programmable Gate Array) whose circuit configuration can be changed after manufacture, and a dedicated electric circuit such as an ASIC (Application Specific Integrated Circuit) which is a processor having a circuit configuration designed exclusively for executing a specific process. In addition, the various processes may be executed by one of these various processors, or may be executed by a combination of two or more processors of the same or different types (for example, a plurality of FPGAs, a combination of a CPU and an FPGA, etc.). In addition, the hardware structure of these various processors is, more specifically, an electric circuit that combines circuit elements such as semiconductor elements.
[0142] In addition, in each of the above embodiments, the learning process program and the estimation process program are described as being stored (installed) in advance in the storage 14, but the present invention is not limited to this. The programs may be provided in a form stored in a non-transitory storage medium such as a CD-ROM (Compact Disk Read Only Memory), a DVD-ROM (Digital Versatile Disk Read Only Memory), or a USB (Universal Serial Bus) memory. The programs may also be downloaded from an external device via a network.
[0143] In the above embodiment, the learning device 10 executes the learning process and the estimation process, but the present invention is not limited to this. For example, the learning process and the estimation process may be executed by separate devices. In this case, for example, the entire system may be configured by the learning device that executes the learning process and the estimation device that executes the estimation process.
[0144] The following supplementary notes are further disclosed regarding the above embodiment.
[0145] (Additional note 1) Memory, at least one processor coupled to the memory; Including, The processor, generating a first trained model by training a learning model that outputs an explained variable when an explanatory variable is input based on first learning data representing a pair of a first explanatory variable for learning and a first explained variable for learning, such that a correlation coefficient between the first explained variable for learning and the explained variable output from the learning model is maximized; generating a second trained model by re-training the first trained model based on second training data representing a pair of a second explanatory variable for training and a second dependent variable for training, such that an error between the second dependent variable for training and a dependent variable output from the first trained model is minimized; A learning device configured as follows.
[0146] (Additional note 2) A non-transitory storage medium storing a program executable by a computer to execute a learning process, The learning process includes: generating a first trained model by training a learning model that outputs an explained variable when an explanatory variable is input based on first learning data representing a pair of a first explanatory variable for learning and a first explained variable for learning, such that a correlation coefficient between the first explained variable for learning and the explained variable output from the learning model is maximized; generating a second trained model by re-training the first trained model based on second training data representing a pair of a second explanatory variable for training and a second dependent variable for training, such that an error between the second dependent variable for training and a dependent variable output from the first trained model is minimized; Non-transitory storage medium. [Explanation of symbols]
[0147] 10 Learning Device 100 Setting value memory section 102 First learning data storage unit 104 First trained model memory unit 106 Second learning data storage unit 108 Second trained model memory unit 110 Estimation data storage unit 112 Estimation result storage unit 120 First Learning Section 122 Second Learning Section 124 Acquisition Department 126 Presumption
Claims
1. generating a first trained model by training a learning model that outputs an explained variable when an explanatory variable is input based on first learning data representing a pair of a first explanatory variable for learning and a first explained variable for learning, such that a correlation coefficient between the first explained variable for learning and the explained variable output from the learning model is maximized; generating a second trained model by re-training the first trained model based on second training data representing a pair of a second explanatory variable for training and a second dependent variable for training, such that an error between the second dependent variable for training and a dependent variable output from the first trained model is minimized; A learning method in which a computer performs a process.
2. When training the learning model so that the correlation coefficient is maximized, the learning model is trained so that a function 1 / (r+1) including the correlation coefficient r is minimized, thereby generating the first trained model; When re-learning the first trained model so as to minimize the error, the first trained model is trained so as to minimize a mean square error between a second dependent variable for the training and a dependent variable output from the first trained model, thereby generating the second trained model. The learning method according to claim 1 .
3. When re-learning the first trained model so as to minimize the error, a part of parameters of the first trained model is fixed, and a parameter different from the part of parameters of the first trained model is changed to generate the second trained model. The learning method according to claim 1 or 2.
4. The learning model is a multi-layer neural network. The learning method according to any one of claims 1 to 3.
5. Obtain the explanatory variables to be estimated, An explanatory variable of the estimation target is input to the second trained model generated by the learning method according to any one of claims 1 to 4, thereby obtaining an explained variable for the explanatory variable of the estimation target. An estimation method in which the processing is performed by a computer.
6. a first learning unit that, when training a learning model that outputs an explained variable when an explanatory variable is input based on first learning data representing a pair of a first explanatory variable for learning and a first explained variable for learning, trains the learning model so that a correlation coefficient between the first explained variable for learning and the explained variable output from the learning model is maximized, thereby generating a first trained model; a second learning unit that generates a second trained model by re-learning the first trained model based on second learning data representing a pair of a second explanatory variable for learning and a second dependent variable for learning so that an error between the second dependent variable for learning and a dependent variable output from the first trained model is minimized; A learning device comprising:
7. an acquisition unit for acquiring explanatory variables of an estimation target; an estimation unit that inputs explanatory variables of the estimation target to the second trained model generated by the learning device according to claim 6, thereby acquiring an explained variable for the explanatory variable of the estimation target; An estimation device comprising:
8. A program for causing a computer to execute the learning method according to any one of claims 1 to 4 or the estimation method according to claim 5.
Citation Information
Patent Citations
Methods and Systems for Applications for Z-numbers
US20140201126A1
Search device, search method, search program, and learning model search system
WO2021074990A1
