WO2022168163A1 - Generation device, method, and program - Google Patents

Generation device, method, and program Download PDF

Info

Publication number
WO2022168163A1
WO2022168163A1 PCT/JP2021/003735 JP2021003735W WO2022168163A1 WO 2022168163 A1 WO2022168163 A1 WO 2022168163A1 JP 2021003735 W JP2021003735 W JP 2021003735W WO 2022168163 A1 WO2022168163 A1 WO 2022168163A1
Authority
WO
WIPO (PCT)
Prior art keywords
learning
contribution
learning model
data
unit
Prior art date
Application number
PCT/JP2021/003735
Other languages
French (fr)
Japanese (ja)
Inventor
綜太朗 前島
和昭 尾花
啓介 角田
翠 児玉
直樹 荒井
Original Assignee
日本電信電話株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日本電信電話株式会社 filed Critical 日本電信電話株式会社
Priority to JP2022579183A priority Critical patent/JPWO2022168163A1/ja
Priority to PCT/JP2021/003735 priority patent/WO2022168163A1/en
Publication of WO2022168163A1 publication Critical patent/WO2022168163A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Definitions

  • the disclosed technology relates to a generation device, a generation method, and a generation program.
  • Machine learning technology that automatically machine-learns input data patterns and creates learning models that predict the classification of video and audio, the transition of time-series data, etc. is becoming widespread.
  • the learning model can be created in various patterns by setting items related to the behavior of the learning model, such as the base structure, parameters, and input data shape. Therefore, when using machine learning technology, it is necessary to select a learning model with an appropriate pattern so that the prediction accuracy satisfies a predetermined standard.
  • Non-Patent Document 1 As a technology related to learning model selection, there is a technology that generates various learning models that predict the same objective variable, but with different structures and feature values, and lists the generated learning models in descending order of prediction accuracy. proposed (Non-Patent Document 1).
  • not only the prediction accuracy of the learning model, but also the basis of the prediction may be important.
  • a task that supports human decision-making such as diagnosing a disease based on the prediction results of a learning model
  • it is necessary to look at not only the prediction results of the learning model, but also the grounds for the predictions, to determine the reliability of the prediction results. is judged. Therefore, it is necessary to appropriately select a learning model so that not only prediction accuracy but also prediction grounds satisfy predetermined standards.
  • the disclosed technology has been made in view of the above points, and aims to generate an index for appropriately selecting a learning model that provides the desired prediction accuracy and basis for prediction.
  • a first aspect of the present disclosure is a generation device that generates an index for selecting a predetermined learning model from among a plurality of learning models machine-learned using a plurality of types of feature amounts, wherein the plurality of learning an acquisition unit that acquires, for each of the models, the accuracy of a prediction result by a learning model and the degree of contribution of at least one type of feature quantity specified by a user to the prediction result; and a generation unit that generates the
  • a second aspect of the present disclosure is a generation method for generating an index for selecting a predetermined learning model from among a plurality of learning models machine-learned using a plurality of types of feature quantities, wherein an acquisition unit comprises: For each of the plurality of learning models, the accuracy of the prediction result by the learning model and the degree of contribution of at least one type of feature quantity specified by the user to the prediction result are obtained, and the generation unit obtains the accuracy and the contribution It is a method of generating the index from degrees.
  • a third aspect of the present disclosure is a generation program for generating an index for selecting a predetermined learning model from among a plurality of learning models machine-learned using a plurality of types of feature quantities
  • the computer comprises: an acquisition unit that acquires, for each of a plurality of learning models, the accuracy of a prediction result by the learning model and the degree of contribution of at least one type of feature quantity specified by a user to the prediction result; and the accuracy and the degree of contribution. and a program for functioning as a generation unit that generates the index from
  • FIG. 4 is a schematic diagram for explaining an example of a SHAP value
  • FIG. 2 is a block diagram showing the hardware configuration of a learning model selection device
  • FIG. 1 is a block diagram showing an example of a functional configuration of a learning model selection device according to a first embodiment
  • FIG. 10 is a sequence diagram showing the flow of learning model selection processing
  • FIG. 11 is a block diagram showing an example of a functional configuration of a learning model selection device according to a second embodiment
  • FIG. It is a figure which shows an example of material data.
  • FIG. 4 is a diagram showing an example of a learning pattern set; It is a figure which shows an example of the column produced as the objective variable of learning data.
  • FIG. 10 is a diagram for explaining calculation of contribution for each feature identifier;
  • FIG. 10 is a diagram showing an example of a contribution weight vector and an overall contribution weight; It is a figure which shows an example of the calculation result by an acquisition part.
  • 4A and 4B are diagrams illustrating an example of an acquisition result by an acquisition unit and an example of a generation result by a generation unit;
  • FIG. 7 is a flowchart illustrating an example of evaluation data set creation processing; 6 is a flowchart showing an example of learning model evaluation processing;
  • FIG. 10 is a diagram for explaining differences in model evaluation functions due to differences in overall contribution weights;
  • FIG. 10 is a diagram for explaining adjustment of overall contribution weight;
  • FIG. 1 is a diagram for explaining the outline of the first embodiment.
  • input data is input to each of a plurality of learning models (learning models A and B in the example of FIG. 1), prediction processing is performed in each learning model, and output as a prediction result Data is output.
  • the prediction accuracy of the learning model is obtained by comparing the output data, which is the prediction result, with the correct answer of the output data.
  • a desired feature amount may be selected based on prior knowledge. For example, when trying to predict the probability of developing lung cancer using a learning model, it is known that the probability of developing lung cancer is related to the amount of cigarettes consumed. A value extracted from the amount to be used may be used as a desired feature amount.
  • the contribution of the feature amount is also used to generate an index for selecting a learning model.
  • the contribution of feature amount is a value indicating the contribution to the prediction result for each type of feature amount used in the learning model.
  • the type of feature amount is information for distinguishing each column existing in the learning data used for machine learning of the learning model. That is, the types of feature amounts are different between different columns.
  • time series data is used as learning data, and columns of learning data include columns obtained by shifting the time series of a certain column.
  • the original column and the time series-shifted column have the same feature amount type. Also, even if it is a column whose time series has been shifted, if the feature of the original column is the target variable and the feature of the column whose time series is shifted is the explanatory variable, the original column and the time series are shifted. Columns and columns are treated as different types of feature quantities.
  • SHAP SHAPley Additive exPlanations, reference 1
  • Fig. 2 shows an example of a schematic diagram of the SHAP value.
  • the horizontal axis represents the magnitude of the SHAP value, and the contribution increases in the positive direction toward the right side, and the contribution increases in the negative direction toward the left side.
  • the SHAP value (each point in FIG. 2) for each data of each feature amount is expressed in a histogram format for each type of feature amount. Note that in the example of FIG. 2, even if the types of feature amounts are the same, the feature amounts whose time series are shifted are distinguished from each other. Also, the darker the color density of each point, the larger the value of the feature value indicated by that point.
  • a learning model is selected such that a learning model with a high contribution of a desired type of feature quantity is selected from the contributions of each type of feature quantity, such as the SHAP value.
  • Generate an index for The type of desired feature amount is designated by the user.
  • a learning model is selected such that the prediction accuracy and the degree of contribution of the specified type of feature amount satisfy predetermined criteria.
  • a learning model selection device including a function of generating an index for selecting a predetermined learning model from among a plurality of learning models machine-learned using a plurality of types of feature values as described above will be described below.
  • FIG. 3 is a block diagram showing the hardware configuration of the learning model selection device 10 according to the first embodiment.
  • the learning model selection device 10 includes 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 It has a communication I/F (Interface) 17 .
  • Each component is communicably connected to each other via a bus 19 .
  • the CPU 11 is a central processing unit that 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 work area. The CPU 11 performs control of each configuration and various arithmetic processing according to programs stored in the ROM 12 or the storage 14 .
  • the ROM 12 or storage 14 stores a learning model selection program for executing learning model selection processing, which will be described later.
  • the ROM 12 stores various programs and various data.
  • the RAM 13 temporarily stores programs or data as a work area.
  • the storage 14 is composed of storage devices such as HDD (Hard Disk Drive) and SSD (Solid State Drive), and stores various programs including an operating system and various data.
  • the input unit 15 includes a pointing device such as a mouse and a keyboard, and is used for various inputs.
  • the display unit 16 is, for example, a liquid crystal display, and displays various information.
  • the display unit 16 may employ a touch panel system and function as the input unit 15 .
  • the communication I/F 17 is an interface for communicating with other devices outside the learning model selection device 10, and is, for example, a wired communication standard such as Ethernet (registered trademark) or FDDI, or 4G, 5G, or Wi-Fi.
  • a wireless communication standard such as Fi (registered trademark) is used.
  • FIG. 4 is a block diagram showing an example of the functional configuration of the learning model selection device 10.
  • the learning model selection device 10 includes, as a functional configuration, a material data collection unit 21, a material data storage unit 22, a learning pattern transmission unit 23, an evaluation data set creation unit 24, an evaluation and data set storage unit 27 .
  • the evaluation data set creation unit 24 further includes a verification data creation unit 25 and a learning model creation unit 26 .
  • the learning model selection device 10 also includes a learning model evaluation unit 28 and a selected learning model storage unit 32 .
  • the learning model evaluation unit 28 further includes an acquisition unit 29 , a generation unit 30 and a selection unit 31 .
  • the acquisition unit 29 and the generation unit 30 are examples of the generation device of technology disclosed herein.
  • Each functional configuration is realized by the CPU 11 reading out a learning model selection program including a generation program stored in the ROM 12 or storage 14, developing it in the RAM 13, and executing it.
  • the material data collection unit 21 collects material data used as materials for constructing a learning data set used to create a learning model.
  • Material data is data that can be used as objective variables and explanatory variables, and is data that has a unique data identifier for distinguishing each data.
  • the material data collection unit 21 receives an input of a data identifier designated by a user, and collects material data having the received data identifier.
  • the material data collection unit 21 may collect, for example, sensor values output from sensors, data stored in an external or internal storage device, etc., as material data.
  • the material data collection unit 21 stores the collected material data in the material data storage unit 22 .
  • the learning pattern transmission unit 23 accepts input of a learning pattern set specified by the user, and transmits the accepted learning pattern set to the evaluation data set creation unit 24 .
  • a "learning pattern set” is defined as a plurality of learning patterns, which are information settings that affect the behavior of the output data of the learning model, created in advance by the user and put together.
  • Each learning pattern is given an index for identifying each learning pattern.
  • Components of each learning pattern include, for example, a base model identifier, hyperparameters, and a learning data construction method.
  • the base model identifier is an identifier that identifies the model structure that is the basis of the learning model, and is, for example, the API (Application Programming Interface) name of the learning model.
  • a hyperparameter is a parameter associated with a machine learning method that corresponds to a base model identifier. The value of each hyperparameter may be uniquely determined, or there may be multiple candidates.
  • the learning data construction method is a method of processing material data and constructing learning data including explanatory variables and objective variables to be input to the learning model.
  • a feature identifier which is an identifier indicating the type of feature quantity for each of the plurality of feature quantities that make up the learning data, a calculation method for material data to obtain the feature quantity for each feature identifier, etc. items are set.
  • the columns of the learning data include a column obtained by shifting the time series of a certain column
  • the original column and the column whose time series is shifted are The types of features are the same. Therefore, the same feature identifier is used for the feature amount of the original column and the feature amount of the column shifted in time series.
  • the feature of the original column is the objective variable and the feature of the column with the shifted time series is the explanatory variable, the feature of the original column and the column with the shifted time series will be different.
  • Feature identifiers are used.
  • the evaluation data set creation unit 24 uses the verification data created by the verification data creation unit 25 and the learning model created by the learning model creation unit 26 as evaluation data.
  • the evaluation data set creation unit 24 collects the evaluation data for the number of learning patterns, ie, the number of indexes included in the learning pattern set, as an evaluation data set, and stores the evaluation data set in the evaluation data set storage unit 27 .
  • the verification data creation unit 25 acquires material data from the material data storage unit 22 and creates learning data from the material data according to the learning data construction method included in the learning pattern. Also, the verification data creation unit 25 extracts a part of the learning data as verification data, and outputs the remaining learning data to the learning model creation unit 26 . Verification data is data used for verification of the created learning model, and is data not used for machine learning of the learning model.
  • the learning model creation unit 26 creates a learning model using the learning data output from the verification data creation unit 25 according to the base model identifier and hyperparameters included in the learning pattern.
  • the learning model evaluation unit 28 evaluates each of the plurality of learning models stored in the evaluation data set storage unit 27 based on the indices generated by the acquisition unit 29 and the generation unit 30, and the selection unit 31 selects the desired Choose a learning model. The learning model evaluation unit 28 then stores the learning model selected by the selection unit 31 in the selected learning model storage unit 32 .
  • the acquisition unit 29 acquires the prediction accuracy of each learning model and the degree of contribution of at least one type of feature quantity specified by the user to the prediction result of the learning model. Specifically, the acquisition unit 29 acquires the prediction accuracy based on the error between the output data of the learning model when the explanatory variables included in the verification data are input to the learning model and the objective variable included in the verification data. do.
  • the prediction accuracy may be, for example, a value based on RMSE (Root Mean Square Error).
  • the acquisition unit 29 acquires the degree of contribution for each type of feature quantity forming the learning data using the verification data. The contribution may be, for example, a value based on the SHAP value.
  • the acquisition unit 29 outputs the prediction accuracy and the degree of contribution acquired for each learning model to the generation unit 30 .
  • the generation unit 30 uses the prediction accuracy and the degree of contribution output from the acquisition unit 29 to generate an index for selecting a learning model for each learning model.
  • the generation unit 30 may generate the index using only the degree of contribution of the type of feature specified by the user. Further, the generation unit 30 may generate an index using the degree of contribution for each type of feature amount to which a weight specified by the user is added. This makes it possible to generate an index that considers the prediction accuracy and the contribution of the desired feature amount, that is, the grounds for the desired prediction. When adding weight to the degree of contribution, it is possible to further adjust which type of feature amount to generate the index with emphasis on the degree of contribution.
  • the generation unit 30 may generate the index after matching the scale of the degree of contribution for each type of feature amount.
  • a scale here is a measure of the magnitude of a value. This makes it possible to generate an index capable of fairly evaluating the relative degree of contribution for each type of feature quantity.
  • the generation unit 30 may generate an index by matching the scales of the prediction accuracy and the degree of contribution. As a result, it is possible to generate an index that can fairly evaluate the prediction accuracy and the degree of contribution. Further, the generator 30 may generate an index by adding weight to at least one of the prediction accuracy and the contribution. Thereby, when selecting a learning model, it is possible to adjust which of the prediction accuracy and the degree of contribution is emphasized.
  • the generation unit 30 outputs the index generated for each learning model to the selection unit 31 .
  • the selection unit 31 selects the learning model with the highest index from the plurality of learning models stored in the evaluation data set storage unit 27.
  • the selection unit 31 may select one or more learning models whose indices are equal to or greater than a predetermined value, or may select learning models whose indices are a predetermined number of higher ranks.
  • the selection unit 31 may present the selected learning models to the user together with the index, and accept the selection of the learning model to be adopted from the user.
  • FIG. 5 is a sequence diagram showing the flow of learning model selection processing by the learning model selection device 10. As shown in FIG. The learning model selection process is performed by the CPU 11 reading out a learning model selection program including a generating program from the ROM 12 or the storage 14, developing it in the RAM 13, and executing it.
  • step S11 the CPU 11, as the material data collection unit 21, receives the input of the data identifier specified by the user, collects the material data having the received data identifier, and saves it in the material data storage unit 22.
  • step S ⁇ b>12 the CPU 11 serves as the learning pattern transmission unit 23 to receive an input of a learning pattern set designated by the user, and transmits the received learning pattern set to the evaluation data set creation unit 24 .
  • step S13 the CPU 11, acting as the evaluation data set creation section 24, acquires material data from the material data storage section 22.
  • step S ⁇ b>14 the CPU 11 performs evaluation data set creation processing as the evaluation data set creation unit 24 .
  • the CPU 11, as the verification data creation unit 25 of the evaluation data set creation unit 24 learns from the material data for each learning pattern included in the learning pattern set according to the learning data construction method included in the learning pattern. Create data.
  • CPU 11 acting as verification data creation unit 25 , extracts part of the created learning data as verification data, and outputs the remaining learning data to learning model creation unit 26 .
  • the CPU 11, as the learning model creation unit 26 of the evaluation data set creation unit 24 uses the learning data output from the verification data creation unit 25 according to the base model identifier and the hyperparameters included in the learning pattern, and performs learning. Create a model.
  • step S15 the CPU 11, as the evaluation data set creation unit 24, uses the verification data created by the verification data creation unit 25 and the learning model created by the learning model creation unit 26 as evaluation data. do. Then, the CPU 11, as the evaluation data set creation unit 24, collects the evaluation data for the number of learning patterns, that is, the number of indexes included in the learning pattern set, as an evaluation data set, and sets the evaluation data set storage unit 27. Save to
  • step S16 the CPU 11, acting as the learning model evaluation unit 28, acquires the evaluation data set stored in the evaluation data set storage unit 27. Further, in step S17, the CPU 11, as the learning model evaluation unit 28, receives an input of the type of feature specified by the user ("designation of feature" in FIG. 5). Note that the CPU 11, as the learning model evaluation unit 28, may receive a weight for each type of feature amount with respect to the contribution (“contribution degree weight” in FIG. 5) instead of specifying the feature amount. Furthermore, the CPU 11, as the learning model evaluation unit 28, may receive a weight ("total weight” in FIG. 5) to be given to at least one of the prediction accuracy and the degree of contribution when generating the index.
  • step S18 the CPU 11, as the learning model evaluation unit 28, executes learning model evaluation processing.
  • the CPU 11, as the acquisition unit 29 of the learning model evaluation unit 28, acquires prediction accuracy using verification data for each learning model included in the evaluation data set.
  • the CPU 11, as the acquiring unit 29, acquires the degree of contribution for each type of feature amount for each learning model using the verification data.
  • the CPU 11, as the generation unit 30 of the learning model evaluation unit 28 uses the prediction accuracy acquired by the acquisition unit 29 and the contribution degree of the feature amount of the type specified by the user to perform learning for each learning model. Generate metrics for model selection.
  • the CPU 11, as the generation unit 30, adds the weight of the contribution degree to the degree of contribution for each type of feature amount to obtain an index. to generate Further, when the overall weight is accepted, the CPU 11, as the generation unit 30, adds the overall weight to at least one of the prediction accuracy and the degree of contribution to generate an index. Then, the CPU 11, as the selection unit 31 of the learning model evaluation unit 28, selects an index Choose the learning model with the highest .
  • step S19 the CPU 11, as the learning model evaluation unit 28, stores the learning model selected by the selection unit 31 ("selected learning model" in FIG. 5) in the selected learning model storage unit 32, and stores the learning model The selection process ends.
  • processing executed by the CPU 11 as the acquisition unit 29 and the generation unit 30 in step S18 is an example of the generation processing performed by the CPU 11 executing the generation program included in the learning model selection program.
  • generation process is an example of a generation method of technology disclosed herein.
  • the degree of contribution of each type of feature amount changes depending on the learning data, the nature of the learning model, the cost function designed after the learning model is selected, and the like. This point is not taken into consideration in the prior art, and learning that satisfies both the high prediction accuracy of the learning model and the distribution of the contribution of the feature value of the model being close to the desired distribution of the contribution of the feature value. Choosing a model is difficult. Therefore, in the conventional technology, it is necessary to manually search for the optimum learning model from the enumerated learning models. In particular, when the number of types of feature amounts increases, the number of candidate learning models also becomes enormous, and there is a problem that the work of learning model selection itself becomes difficult.
  • the learning model selection device generates an index for each of a plurality of learning models based on the prediction accuracy of the learning model and the degree of contribution of at least one type of feature specified by the user. do. In other words, this index takes into consideration both the contribution of the type of feature specified by the user and the prediction accuracy. Then, the learning model selection device uses this index to select a predetermined learning model from among a plurality of learning models machine-learned using a plurality of types of feature quantities. As a result, the learning model selection device according to the first embodiment can appropriately select a learning model from which desired prediction accuracy and grounds for prediction can be obtained.
  • 2nd Embodiment describes embodiment which actualized 1st Embodiment more. Specifically, in an air-conditioning unit inside a building that is separated from the outside by a door or the like, the goal is to optimize temperature comfort. This is an example of learning. An environment model that predicts changes in temperature according to the temperature setting of an air conditioner, which is an action of a reinforcement learning agent, is a learning model to be selected. Note that the hardware configuration of the learning model selection device according to the second embodiment is the same as the hardware configuration of the learning model selection device 10 according to the first embodiment shown in FIG. 3, so description thereof will be omitted.
  • FIG. 6 is a block diagram showing an example of the functional configuration of the learning model selection device 110.
  • the learning model selection device 110 includes, as a functional configuration, a material data collection unit 121, a material data storage unit 122, a learning pattern transmission unit 123, an evaluation data set creation unit 124, an evaluation and data set storage 127 .
  • Evaluation data set creation unit 124 further includes verification data creation unit 125 and learning model creation unit 126 .
  • Learning model selection device 110 also includes a learning model evaluation unit 128 and a selected learning model storage unit 132 .
  • Learning model evaluation unit 128 further includes acquisition unit 129 , generation unit 130 , and selection unit 131 .
  • the acquisition unit 129 and the generation unit 130 are examples of the generation device of technology disclosed herein. Each functional configuration is realized by the CPU 11 reading out a learning model selection program including a generation program stored in the ROM 12 or storage 14, developing it in the RAM 13, and executing it.
  • the functional configuration of the learning model selection device 110 according to the second embodiment and the functional configuration of the learning model selection device 10 according to the first embodiment have the same functional configuration with the same last two digits of the code. A detailed description of the contents is omitted.
  • the material data collection unit 121 collects material data related to air conditioning control. For example, the material data collection unit 121 collects each material data having data identifiers represented by room temperature, outside temperature, people flow, air conditioning settings, and open flags.
  • the room temperature is the temperature measured by the air-conditioning unit.
  • the outside air temperature is the temperature measured outdoors.
  • People flow is the unique number of people present in the air conditioning utilization department.
  • the unique number of people is the number of people who exist in the air conditioning usage area per unit time. ).
  • the unit time may be, for example, a data sampling interval.
  • the air conditioning setting value is the temperature setting value of the air conditioner that exists in the air conditioning utilization unit.
  • the open flag is a flag that indicates whether or not a person can enter or leave the building containing the air-conditioning section. For example, "1" may be set when it is possible to enter/exit the building, and "0" may be set when it is impossible to enter/exit the building.
  • room temperature is material data used as objective variables
  • outside temperature is material data used as objective variables
  • people flow is material data used as explanatory variables.
  • the explanatory variables include the data itself corresponding to the action of the reinforcement learning agent, or the data corresponding to the action of the reinforcement learning agent. data must be included. This is because the actions of the reinforcement learning agent must change the output of the environment model.
  • explanatory variables using air conditioning set values are essential.
  • the material data collection unit 121 for example, room temperature, outside temperature, air conditioning set values, and open flags may be collected from the BEMS (Building and Energy Management System) 201 . Also, the material data collection unit 121 may collect people flow from the people flow detection sensor 202 installed in the air conditioning utilization unit. All of these material data are time-series data. Specifically, each piece of material data is time-series data in which the date and time of a data sampling point are used as an index, and the index and the data value at the date and time indicated by the index are associated with each other.
  • the material data collection unit 121 stores the collected material data in the material data storage unit 122 .
  • FIG. 7 shows an example of material data stored in the material data storage unit 122. As shown in FIG.
  • the learning pattern transmission unit 123 accepts input of a learning pattern set specified by the user, and transmits the accepted learning pattern set to the evaluation data set creation unit 124 .
  • FIG. 8 shows an example of a learning pattern set.
  • learning pattern (p) is the index of the learning pattern.
  • p 1,2,3.
  • the base model identifier of learning pattern 1 is Light GBM (Gradient Boosting Machine, Reference 2).
  • the base model identifier of learning patterns 2 and 3 is XGBoost (eXtreme Gradient Boosting, reference 3). Learning pattern 2 and learning pattern 3 are partially different in the learning data construction method (details will be described later).
  • the material data is time-series data, and can be expressed as table data including multiple columns, as shown in FIG. 7 above. Therefore, it is possible to create a new column as a feature amount that constitutes the learning data by performing calculations between different columns of table data, obtaining the time difference of the same column, or the like. Furthermore, in the case of explanatory variables, a column obtained by shifting the index of the new column created as described above, that is, a column whose time series is shifted can be created as a new column. Hereinafter, a column obtained by shifting the time series in this way will be referred to as a "series column". The method of creating this new column is defined in the learning data construction method of the learning pattern.
  • feature identifiers F i p are defined as the learning data construction method.
  • the feature identifier F i p is an identifier that indicates the type of feature quantity.
  • series columns only the time series is shifted, and the feature values of the material data column or the newly created column that is the source of the shift and the series column are essentially the same.
  • the same feature identifier F i p is used for the feature amount of the type. For example, a column A and a new column A' created by shifting the data in column A backward by 30 minutes both have the same feature identifier of A.
  • a notation indicating the shifted time such as F i p ⁇ 30min, is added to the feature identifier.
  • the feature quantity indicated by the feature identifier F i p with i ⁇ 1 is set as the explanatory variable.
  • the calculation formula E i p is a formula for calculating a new column as a feature amount from the material data, and is defined using the data identifier of the material data.
  • the formula on the first line in FIG. 8 is a formula E 0 1 for calculating the room temperature difference (F 0 1 ) at time t, and It is specified that the room temperature 60 minutes before is subtracted.
  • ⁇ data identifier> or ⁇ feature identifier> at time t is expressed as " ⁇ data identifier> or ⁇ feature identifier>(t)", for example, "room temperature (t)" or "room temperature difference (t)". write.
  • Series parameters S1 i p , S2 i p , and S3 i p are parameters for creating a series column based on new column X created by calculation formula E i p .
  • S1 i p is the number of sequences
  • S2 i p is the start point
  • S3 i p is the end point.
  • F 0 p ie for the target variable
  • the verification data creation unit 125 acquires material data from the material data storage unit 122 and creates learning data from the material data according to the learning data construction method included in the learning pattern.
  • a specific example of learning data creation will be described using the example of the learning pattern set shown in FIG.
  • FIG. 9 shows an example of the room temperature difference (t) indicated by the feature identifier F 0 1 created as the objective variable of the learning data.
  • FIG. 10 shows an example of series columns of feature identifiers F 1 1 to F 5 1 created as explanatory variables of learning data.
  • F 1 1 in FIG. 10 is the room temperature difference
  • F 2 1 is the outside temperature
  • F 3 1 is the crowd flow difference
  • F 4 1 is the air conditioning setting difference
  • F 5 1 is the open flag.
  • the verification data creation unit 125 extracts part of the learning data as verification data, and outputs the remaining learning data to the learning model creation unit 126 . For example, when one month's worth of material data is obtained, the verification data creating unit 125 creates one month's worth of learning data. Then, the verification data creation unit 125 extracts learning data for a predetermined one week out of one month as verification data.
  • the learning model creation unit 126 sets hyperparameters in the model structure indicated by the base model identifier included in the learning pattern, inputs explanatory variables of learning data to the learning model in which initial values are set for parameters to be adjusted, and outputs data. get Then, the learning model creation unit 126 executes machine learning of the learning model by updating the parameters so that the output data and the objective variable are closer to each other. Note that when hyperparameters are not uniquely defined and are specified as ranges, the learning model creation unit 126 may create a learning model while searching for hyperparameters that maximize the performance of the learning model.
  • the acquisition unit 129 converts the SHAP values of the same number of elements as the explanatory variables of the verification data (the number of columns of the explanatory variables ⁇ the number of indices of the verification data) into absolute values using the verification data.
  • SHAP i p the average of SHAP i p of each element in the verification data period of all columns belonging to the feature identifier F i p (SHAP i p ) (FIGS. 11, 13 and in the formula Now, calculate ⁇ (overline)'' on ⁇ SHAP i p ''.
  • the acquisition unit 129 calculates scale-converted c i p such that all (SHAP i p ) ⁇ falls within 0 to 100 using the following equation (1).
  • the acquisition unit 129 creates a contribution evaluation vector c p (shown in bold in the formula) in which c i p are arranged, as shown in the following formula (2).
  • c i p corresponds to the degree of contribution for the type of feature amount indicated by the feature identifier F i p .
  • the acquisition unit 129 also acquires the contribution weight vector W1 (shown in bold in the formula) specified by the user.
  • the contribution weight vector W1 is represented by [w 1 p , w 2 p , w 3 p , w 4 p , w 5 p ] T (T represents transposition).
  • T represents transposition
  • the contribution weight vector W1 is created in advance by the user, and the weight of each element may be set to a value corresponding to the degree of importance to be given when selecting a learning model.
  • a large weight may be specified for the "feature amount relating to the action of the reinforcement learning agent".
  • air conditioning set value corresponds.
  • the acquisition unit 129 acquires the contribution evaluation ⁇ p by multiplying the contribution evaluation vector c p by the contribution weight vector W1 as shown in the following equation (3).
  • the acquisition unit 129 also calculates the mean square error RMSE p using the verification data, and acquires the reciprocal of the RMSE p as the accuracy evaluation ⁇ p , as shown in the following equation (4), for example.
  • the acquiring unit 129 outputs the acquired contribution evaluation ⁇ p and accuracy evaluation ⁇ p to the generating unit 130 .
  • the generating unit 130 matches the scales of the contribution evaluation ⁇ p and the accuracy evaluation ⁇ p , for example, according to the following equation (5). Calculate the contribution scaling constant K for
  • the generator 130 acquires the overall contribution weight W2 as shown in FIG. 12, for example.
  • the overall contribution weight W2 is a value set in advance by the user, and if the prediction accuracy is set to 1, a value may be set according to how much weight is given to the contribution.
  • the generation unit 130 generates the model evaluation function L p using the contribution evaluation ⁇ p , the accuracy evaluation ⁇ p , the contribution scaling constant K, and the overall contribution weight W2, for example, according to Equation (6) below.
  • a prediction accuracy scaling constant K' obtained by reciprocating the equation (5) may be used instead of the contribution scaling constant K.
  • the ⁇ p term is multiplied by K′ in equation (6).
  • an overall prediction accuracy weight W2' which is a weight according to how much importance is placed on the prediction accuracy when the contribution is set to 1, may be used instead of the overall contribution weight W2.
  • the term ⁇ p is multiplied by W2′.
  • FIG. 13 shows an example of (SHAP i p ) ⁇ , contribution evaluation vector c p , and RMSE p calculated by the acquisition unit 129 for each learning pattern.
  • FIG. 14 shows, for each learning pattern, the contribution evaluation ⁇ p and the accuracy evaluation ⁇ p obtained by the obtaining unit 129, the contribution scaling constant K calculated by the generating unit 130, and the contribution evaluation ⁇ after scale conversion.
  • An example of p ⁇ K and a model evaluation function L p generated by the generation unit 130 is shown.
  • the selection unit 131 selects a learning model that maximizes the model evaluation function L p generated by the generation unit 130 from a plurality of learning models stored in the evaluation data set storage unit 127 .
  • the CPU 11 reads out a learning model selection program including a generation program from the ROM 12 or the storage 14, develops it in the RAM 13, and executes it, so that the learning shown in FIG. A model selection process is performed.
  • a learning model selection program including a generation program from the ROM 12 or the storage 14
  • FIG. 15 and 16 FIG. 15 and 16
  • step S101 the CPU 11, as the evaluation data set creation unit 124, initializes the learning model set and the verification data set. Specifically, the CPU 11, as the evaluation data set creating unit 124, prepares an empty set for adding the created learning model and an empty set for adding the created verification data. Further, the CPU 11, as the evaluation data set creation unit 124, sets 1 to the variable p indicating the index of the learning pattern.
  • step S103 the CPU 11, acting as the evaluation data set creation unit 124, initializes the learning data set. Specifically, the CPU 11, as the evaluation data set creation unit 124, prepares an empty set for adding the created learning data. Then, the CPU 11, as the verification data creation unit 125, sets 0 to the variable i indicating the index of the feature identifier.
  • step S105 the CPU 11, as the verification data creation unit 125, acquires the material data used in the calculation formula E i p from the material data storage unit 122, applies the calculation formula E i p to the acquired material data, and creates a new Create column X.
  • step S106 the CPU 11, as the verification data creation unit 125, determines whether or not i is 0, that is, whether or not the feature quantity indicated by the feature identifier F i p corresponding to column X is the objective variable.
  • i ⁇ 1 the process proceeds to step S108.
  • step S108 the CPU 11, as the verification data creation unit 125, reads the series parameters S1 i p , S2 i p , and S3 i p , and divides the interval from S2 i p to S3 i p at equal intervals by the number of S1 i p . Split and create series columns with X shifted to each time point. Then, the CPU 11, as the verification data creation unit 125, adds the created series column to the learning data set.
  • step S109 the CPU 11, acting as the verification data creation unit 125, increments i by 1, and the process returns to step S104. If i>imax is determined in step S104, the process proceeds to step S110.
  • step S110 the CPU 11, as the verification data creation unit 125, extracts part of the learning data included in the learning data set as verification data and adds it to the verification data set. Further, CPU 11 outputs the remaining learning data to learning model creating section 126 as verification data creating section 125 .
  • step S111 the CPU 11, as the learning model creation unit 126, acquires the model structure specified by the base model identifier of the learning pattern p by calling an API from the base model identifier, and so on. Set parameters. Then, as the learning model creating unit 126, the CPU 11 uses the remaining learning data output from the verification data creating unit 125 to machine-learn a learning model in which hyperparameters are set in the model structure indicated by the base model identifier. to run. As the learning model creation unit 126, the CPU 11 executes machine learning while evaluating the learning model by grid search cross-validation, for example.
  • step S112 the CPU 11, as the learning model creation unit 126, adds the completed learning model to the learning model set.
  • step S113 the CPU 11, acting as the evaluation data set creating unit 124, increments p by 1, and the process returns to step S102. If p>pmax is determined in step S102, the evaluation data set creation process ends.
  • the verification data set and the learning model set created by the evaluation data set creation process are stored in the evaluation data set storage unit 127 as evaluation data sets (S17 in FIG. 5).
  • step S121 the CPU 11, as the learning model evaluation unit 128, sets 1 to the variable p indicating the index of the learning pattern.
  • step S123 the CPU 11, as the acquiring unit 129, uses the verification data of the learning pattern p to calculate SHAP i p by converting the SHAP values of the same number of elements as the explanatory variables of the verification data into absolute values.
  • step S124 the CPU 11, as the acquiring unit 129, sets 1 to the variable i indicating the index of the feature identifier.
  • step S126 the CPU 11, as the acquisition unit 129, calculates the average ( SHAP ip ) of SHAP ip of each element during the verification data period of all columns belonging to the feature identifier F ip .
  • step S127 the CPU 11, as the acquiring unit 129, increments i by 1, and the process returns to step S125. If i>imax is determined in step S125, the process proceeds to step S128.
  • step S129 the CPU 11, as the acquiring unit 129, creates a contribution evaluation vector c p in which c i p are arranged as shown in the equation (2).
  • the CPU 11, as the acquiring unit 129 acquires the contribution weighting vector W1 specified by the user, and multiplies the contribution evaluation vector cp by the contribution weighting vector W1 as shown in equation (3). , obtain a contribution estimate ⁇ p .
  • step S130 the CPU 11, as the acquiring unit 129, calculates the mean square error RMSE p using the verification data of the learning pattern p, and obtains the reciprocal of the RMSE p as shown in the equation (4), for example. Obtained as the accuracy estimate ⁇ p .
  • step S131 the CPU 11, as the learning model evaluation unit 128, increments p by 1, and the process returns to step S122. If p>pmax is determined in step S122, the process proceeds to step S132.
  • step S132 the CPU 11, as the generation unit 130, uses the contribution evaluation ⁇ p and the accuracy evaluation ⁇ p acquired by the acquisition unit 129, for example, by formula (5) to obtain the contribution evaluation ⁇ p and the accuracy evaluation ⁇ p Calculate a contribution scaling constant K to match the scale of .
  • step S133 the CPU 11, as the generator 130, acquires the overall contribution weight W2 specified by the user. Then, the CPU 11, as the generation unit 130, for each learning pattern, uses the contribution evaluation ⁇ p , the accuracy evaluation ⁇ p , the contribution scaling constant K, and the overall contribution weight W2, for example, by formula (6), the model Generate an evaluation function Lp . Then, the CPU 11, as the selection unit 131, selects a learning model that maximizes the model evaluation function Lp generated by the generation unit 130 from a plurality of learning models stored in the evaluation data set storage unit 127, and performs learning. The model evaluation process ends.
  • the learning model selected by the learning model evaluation process is stored in the selected learning model storage unit 132 (S19 in FIG. 5).
  • the learning model selection device similarly to the learning model selection device according to the first embodiment, the learning model selection device according to the second embodiment appropriately selects a learning model that provides the desired prediction accuracy and basis for prediction. can be selected.
  • the scales of the degree of contribution for each type of feature amount calculated for each learning model do not always match, if the scales are used as they are, the learning models cannot be compared fairly. For example, the sum of (SHAP i p ) of each learning pattern does not match, and a learning model with a large sum of (SHAP i p ) tends to be evaluated to have an unreasonably large contribution.
  • the contribution of each type of feature quantity is scaled from 0 to 100 as shown in formula (1), for example, so that the total c p of each learning pattern becomes 100. It is possible to fairly evaluate the relative degree of contribution for each type of feature quantity.
  • the contribution of a desired feature amount can be emphasized in evaluation.
  • the contribution weighting vector W1 as shown in FIG. 12, it is possible to emphasize the air-conditioning set value or air-conditioning room temperature difference indicated by the fourth feature identifier F 4 p with the largest weight.
  • the learning pattern 1 whose c 4 p corresponding to the feature identifier F 4 p is the largest among c i p has the largest contribution evaluation ⁇ p .
  • the model evaluation function Lp of the learning pattern 3 with the largest is the largest.
  • the room temperature fluctuates as predicted by the learning model in accordance with the air conditioning settings. Further, after a certain period of time has passed since the air conditioner was started, the room temperature becomes steady due to thermal equilibrium. I want to reproduce that behavior in the prediction of the learning model. Specifically, if the heating is started one hour earlier, the predicted room temperature will also rise one hour earlier. , that is, the behavior converges to the room temperature true value. After the air conditioner is started, the speed at which the predicted room temperature converges to the room temperature true value depends on the contribution of the air conditioning set value, and in the example of the second embodiment, depends on the contribution evaluation. In order to confirm that the air-conditioning set value contributes to room temperature prediction as expected, the behavior of the predicted room temperature is observed when the air-conditioning set value is shifted one hour earlier from the original data.
  • temperature is the room temperature true value
  • shifted_predict is the predicted room temperature when the air conditioning set value is shifted one hour earlier.
  • the air control temperature is the air conditioning set value or the air conditioning set value difference
  • the shifted air control temperature is the air conditioning set value shifted one hour earlier or the air conditioning set value difference.
  • the learning model of learning pattern 3 has the highest accuracy, but even if the air conditioner is started at around 7:00, the predicted room temperature converges to the true room temperature at around 10:00 (broken line circle in FIG. 19). ), deviating from the ideal behavior. In this case, it is considered that the degree of contribution of the air conditioning setting value to the prediction of the learning model is insufficient, so W2 is increased to 1.5 and the learning model is selected again.
  • FIG. 20 shows the prediction results when learning pattern 1 that maximizes the model evaluation function is selected.
  • the first modification is a stock price prediction regression problem using a deep learning model and stock trading time series data.
  • the future "current price” is used as the objective variable.
  • Data identifiers for material data include “current price”, “maximum purchase price”, “minimum selling price”, “maximum selling price number”, “maximum buying price number”, “total number of buy orders", “total number of sell orders”, etc. Used.
  • the base model identifier may be selected from two types, for example, LSTM (Long Short-Term Memory, Reference 4) and QRNN (Quasi-Recurrent Neural Networks, Reference 5).
  • the hyperparameters are the number of hidden layer nodes, the number of steps, the batch size, the dropout rate, and the number of layers for the layer of the base model identifier, the number and total number of nodes for the fully connected layer, the activation function, the number of nodes and the activation function for the layer, and an optimization function.
  • normalization processing may be added to all feature identifiers in the calculation formula of the learning data construction method.
  • the explanatory variables of the learning data become a two-dimensional matrix of [number of data x (number of features x number of steps)], which is set to [number of data x number of steps x number of features]
  • the learning data constructing method as a new feature identifier, "number of service usage days in the current month" may be created.
  • the calculation formula for this feature identifier is to divide the data by "customer ID”, group the data by the year and month of the index of the time-series data, and count the number of data whose "service usage time of the day” is 0 or more. It may be aggregated. Further, a process of converting the year and month into days may be added to the calculation formula for the "service subscription date”. Also, a process of converting the Nan value of the "service withdrawal date" to -1 may be added. Since "customer ID” and "gender” are categorical variables, these formulas may be defined to perform label encoding. In creating series columns using series parameters in the evaluation data set creation unit, data is divided for each “customer ID” before processing.
  • a third modification is the regression problem of house prices using a machine learning model and house feature data.
  • the "price" of the house is regressed from various information of the house.
  • Data identifiers for material data include “housing type (condominium, detached house, etc.)", “prefecture”, “municipalities”, “minutes on foot to nearest station”, “building age”, “floor layout (1K, 2LDK), etc. ”, “exclusive area”, “whether renovation”, “price”, etc. are used.
  • categorical variables including characters such as “housing type”, “prefecture”, “city”, “floor plan”, “renovation”, etc. may be specified. Since the material data in this problem is not time-series data, there is no need to define series parameters in the learning data construction method, and processing to create series columns is not performed.
  • a fourth variation is the problem of classifying iris varieties using a machine learning model and iris flower feature data.
  • "Sepal length”, “sepal width”, “petal length”, “petal width”, “cultivar” and the like are used as data identifiers of the material data.
  • the base model identifier may be selected from two types: support vector machine (reference 6) and logistic regression (reference 7).
  • the hyperparameters include kernel type, regularization method, evaluation function, whether to solve dual problems, algorithm termination conditions, severity of soft margins, and the like.
  • logistic regression it is the regularization method, the strength of the regularization, and so on.
  • the learning model selection process executed by the CPU by reading the software (program) in each of the above embodiments may be executed by various processors other than the CPU.
  • the processor is a PLD (Programmable Logic Device) whose circuit configuration can be changed after manufacturing, such as an FPGA (Field-Programmable Gate Array), and an ASIC (Application Specific Integrated Circuit) to execute specific processing.
  • a dedicated electric circuit or the like which is a processor having a specially designed circuit configuration, is exemplified.
  • the learning model selection process may be executed by one of these various processors, or a combination of two or more processors of the same or different type (for example, multiple FPGAs and a combination of a CPU and an FPGA). combination, etc.).
  • the hardware structure of these various processors is an electric circuit in which circuit elements such as semiconductor elements are combined.
  • the mode in which the learning model selection program including the generation processing program is pre-stored (installed) in the ROM 12 or storage 14 has been described, but the present invention is not limited to this.
  • Programs are stored in non-transitory storage media such as CD-ROM (Compact Disk Read Only Memory), DVD-ROM (Digital Versatile Disk Read Only Memory), and USB (Universal Serial Bus) memory.
  • CD-ROM Compact Disk Read Only Memory
  • DVD-ROM Digital Versatile Disk Read Only Memory
  • USB Universal Serial Bus
  • a non-transitory recording medium storing a program executable by a computer so as to execute the generating process,
  • the generation process includes For each of a plurality of learning models machine-learned using a plurality of types of feature quantities, the accuracy of the prediction result by the learning model and the contribution of at least one type of feature quantity specified by the user to the prediction result are obtained.
  • a non-temporary recording medium comprising generating an index for selecting a predetermined learning model from among the plurality of learning models from the accuracy and the contribution.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

An acquisition unit (29) acquires, for each of a plurality of learning models that have performed machine learning using a plurality of types of feature quantities, the accuracy of the result of the prediction by the learning model and the degree of contribution of at least one type of feature quantity specified by a user to the prediction result; and a generation unit (30) generates, from the accuracy and the degree of contribution, an index for selecting a prescribed learning model from among the plurality of learning models.

Description

生成装置、方法、及びプログラムGENERATING DEVICE, METHOD AND PROGRAM
 開示の技術は、生成装置、生成方法、及び生成プログラムに関する。 The disclosed technology relates to a generation device, a generation method, and a generation program.
 入力データのパターンを自動で機械学習し、動画像や音声の分類、時系列データの推移等を予測する学習モデルを作成する機械学習技術が普及している。また、学習モデルは、ベースとなる構造、パラメータ、入力するデータ形状等、学習モデルの振る舞いに関わる項目の設定によって、様々なパターンで作成され得る。そのため、機械学習技術の利用においては、予測精度が所定の基準を満たすように、適切なパターンの学習モデルを選択する必要がある。 Machine learning technology that automatically machine-learns input data patterns and creates learning models that predict the classification of video and audio, the transition of time-series data, etc. is becoming widespread. Also, the learning model can be created in various patterns by setting items related to the behavior of the learning model, such as the base structure, parameters, and input data shape. Therefore, when using machine learning technology, it is necessary to select a learning model with an appropriate pattern so that the prediction accuracy satisfies a predetermined standard.
 学習モデルの選択に関する技術として、同じ目的変数を予測する学習モデルであって、構造や利用する特徴量が異なる様々な学習モデルを生成し、生成した学習モデルを予測精度の降順に列挙する技術が提案されている(非特許文献1)。 As a technology related to learning model selection, there is a technology that generates various learning models that predict the same objective variable, but with different structures and feature values, and lists the generated learning models in descending order of prediction accuracy. proposed (Non-Patent Document 1).
 機械学習技術では、学習モデルの予測精度だけでなく、予測の根拠が重要になる場合がある。例えば、学習モデルによる予測結果に基づいて病気の診断を行う場合など、人間の意思決定を支援するタスクでは、学習モデルによる予測結果だけでなく、その予測の根拠を見て、予測結果の信頼性が判断される。そのため、予測精度だけでなく、予測の根拠も所定の基準を満たすように、学習モデルを適切に選択する必要がある。 In machine learning technology, not only the prediction accuracy of the learning model, but also the basis of the prediction may be important. For example, in a task that supports human decision-making, such as diagnosing a disease based on the prediction results of a learning model, it is necessary to look at not only the prediction results of the learning model, but also the grounds for the predictions, to determine the reliability of the prediction results. is judged. Therefore, it is necessary to appropriately select a learning model so that not only prediction accuracy but also prediction grounds satisfy predetermined standards.
 従来技術は、予め決められた指標に基づいて推定された予測結果の精度のみを基準として学習モデルを列挙しているため、上記のように予測の根拠も重視したい場合には、学習モデルが最適な順で列挙されているとは限らない、という問題がある。 In the prior art, learning models are listed based only on the accuracy of prediction results estimated based on predetermined indicators. There is a problem that they are not always listed in the correct order.
 開示の技術は、上記の点に鑑みてなされたものであり、所望の予測精度及び予測の根拠が得られる学習モデルを適切に選択するための指標を生成することを目的とする。 The disclosed technology has been made in view of the above points, and aims to generate an index for appropriately selecting a learning model that provides the desired prediction accuracy and basis for prediction.
 本開示の第1態様は、複数種類の特徴量を用いて機械学習された複数の学習モデルの中から所定の学習モデルを選択するための指標を生成する生成装置であって、前記複数の学習モデルの各々について、学習モデルによる予測結果の精度と、ユーザにより指定された少なくとも1種類の特徴量の前記予測結果に対する寄与度とを取得する取得部と、前記精度と前記寄与度とから前記指標を生成する生成部と、を含んで構成される。 A first aspect of the present disclosure is a generation device that generates an index for selecting a predetermined learning model from among a plurality of learning models machine-learned using a plurality of types of feature amounts, wherein the plurality of learning an acquisition unit that acquires, for each of the models, the accuracy of a prediction result by a learning model and the degree of contribution of at least one type of feature quantity specified by a user to the prediction result; and a generation unit that generates the
 本開示の第2態様は、複数種類の特徴量を用いて機械学習された複数の学習モデルの中から所定の学習モデルを選択するための指標を生成する生成方法であって、取得部が、前記複数の学習モデルの各々について、学習モデルによる予測結果の精度と、ユーザにより指定された少なくとも1種類の特徴量の前記予測結果に対する寄与度とを取得し、生成部が、前記精度と前記寄与度とから前記指標を生成する方法である。 A second aspect of the present disclosure is a generation method for generating an index for selecting a predetermined learning model from among a plurality of learning models machine-learned using a plurality of types of feature quantities, wherein an acquisition unit comprises: For each of the plurality of learning models, the accuracy of the prediction result by the learning model and the degree of contribution of at least one type of feature quantity specified by the user to the prediction result are obtained, and the generation unit obtains the accuracy and the contribution It is a method of generating the index from degrees.
 本開示の第3態様は、複数種類の特徴量を用いて機械学習された複数の学習モデルの中から所定の学習モデルを選択するための指標を生成する生成プログラムであって、コンピュータを、前記複数の学習モデルの各々について、学習モデルによる予測結果の精度と、ユーザにより指定された少なくとも1種類の特徴量の前記予測結果に対する寄与度とを取得する取得部、及び、前記精度と前記寄与度とから前記指標を生成する生成部として機能させるためのプログラムである。 A third aspect of the present disclosure is a generation program for generating an index for selecting a predetermined learning model from among a plurality of learning models machine-learned using a plurality of types of feature quantities, wherein the computer comprises: an acquisition unit that acquires, for each of a plurality of learning models, the accuracy of a prediction result by the learning model and the degree of contribution of at least one type of feature quantity specified by a user to the prediction result; and the accuracy and the degree of contribution. and a program for functioning as a generation unit that generates the index from
 開示の技術によれば、所望の予測精度及び予測の根拠が得られる学習モデルを適切に選択するための指標を生成することができる。 According to the disclosed technology, it is possible to generate an index for appropriately selecting a learning model that provides the desired prediction accuracy and grounds for prediction.
第1実施形態の概要を説明するための図である。It is a figure for explaining the outline of a 1st embodiment. SHAP値の一例を説明するための概略図である。4 is a schematic diagram for explaining an example of a SHAP value; FIG. 学習モデル選択装置のハードウェア構成を示すブロック図である。2 is a block diagram showing the hardware configuration of a learning model selection device; FIG. 第1実施形態に係る学習モデル選択装置の機能構成の一例を示すブロック図である。1 is a block diagram showing an example of a functional configuration of a learning model selection device according to a first embodiment; FIG. 学習モデル選択処理の流れを示すシーケンス図である。FIG. 10 is a sequence diagram showing the flow of learning model selection processing; 第2実施形態に係る学習モデル選択装置の機能構成の一例を示すブロック図である。FIG. 11 is a block diagram showing an example of a functional configuration of a learning model selection device according to a second embodiment; FIG. 材料データの一例を示す図である。It is a figure which shows an example of material data. 学習パターンセットの一例を示す図である。FIG. 4 is a diagram showing an example of a learning pattern set; 学習データの目的変数として作成されたカラムの一例を示す図である。It is a figure which shows an example of the column produced as the objective variable of learning data. 学習データの説明変数として作成された系列カラムの一例を示す図である。It is a figure which shows an example of the series column produced as an explanatory variable of learning data. 特徴識別子毎の寄与度の算出を説明するための図である。FIG. 10 is a diagram for explaining calculation of contribution for each feature identifier; 寄与度重みベクトル及び全体寄与度重みの一例を示す図である。FIG. 10 is a diagram showing an example of a contribution weight vector and an overall contribution weight; 取得部による算出結果の一例を示す図である。It is a figure which shows an example of the calculation result by an acquisition part. 取得部による取得結果、及び生成部による生成結果の一例を示す図である。4A and 4B are diagrams illustrating an example of an acquisition result by an acquisition unit and an example of a generation result by a generation unit; FIG. 評価用データセット作成処理の一例を示すフローチャートである。7 is a flowchart illustrating an example of evaluation data set creation processing; 学習モデル評価処理の一例を示すフローチャートである。6 is a flowchart showing an example of learning model evaluation processing; 全体寄与度重みの相違によるモデル評価関数の相違を説明するための図である。FIG. 10 is a diagram for explaining differences in model evaluation functions due to differences in overall contribution weights; 全体寄与度重みの調整を説明するための図である。FIG. 10 is a diagram for explaining adjustment of overall contribution weight; W2=1.0の場合に、モデル評価関数を最大化する学習パターンを選択した場合の予測結果の一例を示す図である。FIG. 10 is a diagram showing an example of a prediction result when a learning pattern that maximizes a model evaluation function is selected when W2=1.0; W2=1.5の場合に、モデル評価関数を最大化する学習パターンを選択した場合の予測結果の一例を示す図である。FIG. 10 is a diagram showing an example of a prediction result when a learning pattern that maximizes the model evaluation function is selected when W2=1.5;
 以下、開示の技術の実施形態の一例を、図面を参照しつつ説明する。なお、各図面において同一又は等価な構成要素及び部分には同一の参照符号を付与している。また、図面の寸法比率は、説明の都合上誇張されており、実際の比率とは異なる場合がある。 An example of an embodiment of the disclosed technology will be described below with reference to the drawings. In each drawing, the same or equivalent components and portions are given the same reference numerals. Also, the dimensional ratios in the drawings are exaggerated for convenience of explanation, and may differ from the actual ratios.
<第1実施形態>
 図1は、第1実施形態の概要を説明するための図である。図1に示すように、複数の学習モデル(図1の例では、学習モデルA及びB)の各々には、入力データが入力され、各学習モデルにおいて予測処理が行われ、予測結果である出力データが出力される。この予測結果である出力データと、出力データの正解とを比較することで、学習モデルの予測精度が得られる。
<First Embodiment>
FIG. 1 is a diagram for explaining the outline of the first embodiment. As shown in FIG. 1, input data is input to each of a plurality of learning models (learning models A and B in the example of FIG. 1), prediction processing is performed in each learning model, and output as a prediction result Data is output. The prediction accuracy of the learning model is obtained by comparing the output data, which is the prediction result, with the correct answer of the output data.
 従来では、この予測精度を用いて学習モデルの評価が行われる。一方、上記のように、予測精度だけではなく、予測の根拠も重視して学習モデルの評価を行いたい場合には、所望の特徴量が、学習モデルによる予測結果を得るために貢献していることを用いることが考えられる。所望の特徴量は、事前知識に基づき選択すればよい。例えば、肺がんになる確率を学習モデルにより予測しようとする場合、肺がんになる確率は、煙草を消費する量と関係がある事は知られているため、煙草を消費する量、又は、煙草を消費する量から抽出された値を、所望の特徴量とすればよい。 Conventionally, learning models are evaluated using this prediction accuracy. On the other hand, as described above, when it is desired to evaluate the learning model by emphasizing not only the prediction accuracy but also the basis of prediction, the desired feature amount contributes to obtaining the prediction result by the learning model. It is conceivable to use A desired feature amount may be selected based on prior knowledge. For example, when trying to predict the probability of developing lung cancer using a learning model, it is known that the probability of developing lung cancer is related to the amount of cigarettes consumed. A value extracted from the amount to be used may be used as a desired feature amount.
 上記の点を踏まえ、第1実施形態では、予測精度に加え、特徴量の寄与度も用いて、学習モデルを選択するための指標を生成する。特徴量の寄与度とは、学習モデルで利用される特徴量の種類毎の、予測結果に対する貢献度を示す値である。すなわち、ある特徴量の値が予測結果に与える影響が大きいほど、その特徴量の寄与度は大きいと言える。ここで、特徴量の種類とは、学習モデルの機械学習に用いる学習データに存在する各カラムを区別する情報である。すなわち、異なるカラム同士の特徴量の種類は異なる。ただし、後述する第2実施形態では、学習データとして時系列データを用い、学習データのカラムには、あるカラムの時系列をシフトしたカラムも含まれる。この場合、元のカラムと、時系列をシフトしたカラムとの特徴量の種類は同じであるとする。また、時系列をシフトしたカラムであっても、元のカラムの特徴量が目的変数、時系列をシフトしたカラムの特徴量が説明変数の場合には、元のカラムと、時系列をシフトしたカラムとでは、特徴量の種類は異なるものとして扱う。 Based on the above points, in the first embodiment, in addition to the prediction accuracy, the contribution of the feature amount is also used to generate an index for selecting a learning model. The contribution of feature amount is a value indicating the contribution to the prediction result for each type of feature amount used in the learning model. In other words, it can be said that the greater the influence of a feature value on the prediction result, the greater the contribution of that feature value. Here, the type of feature amount is information for distinguishing each column existing in the learning data used for machine learning of the learning model. That is, the types of feature amounts are different between different columns. However, in the second embodiment, which will be described later, time series data is used as learning data, and columns of learning data include columns obtained by shifting the time series of a certain column. In this case, it is assumed that the original column and the time series-shifted column have the same feature amount type. Also, even if it is a column whose time series has been shifted, if the feature of the original column is the target variable and the feature of the column whose time series is shifted is the explanatory variable, the original column and the time series are shifted. Columns and columns are treated as different types of feature quantities.
 寄与度の一例としては、例えば、SHAP(SHapley Additive exPlanations、参考文献1)値が挙げられる。 An example of the contribution is the SHAP (SHAPley Additive exPlanations, reference 1) value.
 参考文献1: Scott M.Lundberg and Su-In Lee, "A Unified Approach to Interpreting Model Predictions", Advances in Neural Information Processing Systems, pp. 4765-4774, 2017. Reference 1: Scott M. Lundberg and Su-In Lee, "A Unified Approach to Interpreting Model Predictions", Advances in Neural Information Processing Systems, pp. 4765-4774, 2017.
 図2に、SHAP値の概略図の一例を示す。図2の例では、横軸がSHAP値の大きさを表しており、右側にいくほど寄与度が正の向きに大きく、左側にいくほど寄与度が負の向きに大きいことを表している。また、図2の例では、各特徴量のデータ毎のSHAP値(図2中の各点)を、特徴量の種類毎にヒストグラム形式で表している。なお、図2の例では、種類が同じ特徴量であっても、時系列がシフトされている特徴量については、それぞれ区別して表している。また、各点の色の濃度が濃いほど、その点が示す特徴量の値が大きいことを表している。 Fig. 2 shows an example of a schematic diagram of the SHAP value. In the example of FIG. 2 , the horizontal axis represents the magnitude of the SHAP value, and the contribution increases in the positive direction toward the right side, and the contribution increases in the negative direction toward the left side. Also, in the example of FIG. 2, the SHAP value (each point in FIG. 2) for each data of each feature amount is expressed in a histogram format for each type of feature amount. Note that in the example of FIG. 2, even if the types of feature amounts are the same, the feature amounts whose time series are shifted are distinguished from each other. Also, the darker the color density of each point, the larger the value of the feature value indicated by that point.
 第1実施形態では、例えば上記のSHAP値のような特徴量の種類毎の寄与度のうち、所望の種類の特徴量の寄与度が高い学習モデルが選択されるように、学習モデルを選択するための指標を生成する。所望の特徴量の種類は、ユーザにより指定される。そして、生成された指標を用いて、予測精度、及び指定された種類の特徴量の寄与度が所定の基準を満たすように、学習モデルが選択される。以下、上記のように、複数種類の特徴量を用いて機械学習された複数の学習モデルの中から所定の学習モデルを選択するための指標を生成する機能を含む学習モデル選択装置について説明する。 In the first embodiment, a learning model is selected such that a learning model with a high contribution of a desired type of feature quantity is selected from the contributions of each type of feature quantity, such as the SHAP value. Generate an index for The type of desired feature amount is designated by the user. Then, using the generated index, a learning model is selected such that the prediction accuracy and the degree of contribution of the specified type of feature amount satisfy predetermined criteria. A learning model selection device including a function of generating an index for selecting a predetermined learning model from among a plurality of learning models machine-learned using a plurality of types of feature values as described above will be described below.
 図3は、第1実施形態に係る学習モデル選択装置10のハードウェア構成を示すブロック図である。図3に示すように、学習モデル選択装置10は、CPU(Central Processing Unit)11、ROM(Read Only Memory)12、RAM(Random Access Memory)13、ストレージ14、入力部15、表示部16、及び通信I/F(Interface)17を有する。各構成は、バス19を介して相互に通信可能に接続されている。 FIG. 3 is a block diagram showing the hardware configuration of the learning model selection device 10 according to the first embodiment. As shown in FIG. 3, the learning model selection device 10 includes 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 It has a communication I/F (Interface) 17 . Each component is communicably connected to each other via a bus 19 .
 CPU11は、中央演算処理ユニットであり、各種プログラムを実行したり、各部を制御したりする。すなわち、CPU11は、ROM12又はストレージ14からプログラムを読み出し、RAM13を作業領域としてプログラムを実行する。CPU11は、ROM12又はストレージ14に記憶されているプログラムに従って、上記各構成の制御及び各種の演算処理を行う。第1実施形態では、ROM12又はストレージ14には、後述する学習モデル選択処理を実行するための学習モデル選択プログラムが格納されている。 The CPU 11 is a central processing unit that 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 work area. The CPU 11 performs control of each configuration and various arithmetic processing according to programs stored in the ROM 12 or the storage 14 . In the first embodiment, the ROM 12 or storage 14 stores a learning model selection program for executing learning model selection processing, which will be described later.
 ROM12は、各種プログラム及び各種データを格納する。RAM13は、作業領域として一時的にプログラム又はデータを記憶する。ストレージ14は、HDD(Hard Disk Drive)、SSD(Solid State Drive)等の記憶装置により構成され、オペレーティングシステムを含む各種プログラム及び各種データを格納する。 The ROM 12 stores various programs and various data. The RAM 13 temporarily stores programs or data as a work area. The storage 14 is composed of storage devices such as HDD (Hard Disk Drive) and SSD (Solid State Drive), and stores various programs including an operating system and various data.
 入力部15は、マウス等のポインティングデバイス、及びキーボードを含み、各種の入力を行うために使用される。 The input unit 15 includes a pointing device such as a mouse and a keyboard, and is used for various inputs.
 表示部16は、例えば、液晶ディスプレイであり、各種の情報を表示する。表示部16は、タッチパネル方式を採用して、入力部15として機能してもよい。 The display unit 16 is, for example, a liquid crystal display, and displays various information. The display unit 16 may employ a touch panel system and function as the input unit 15 .
 通信I/F17は、学習モデル選択装置10外部の他の機器と通信するためのインタフェースであり、例えば、イーサネット(登録商標)若しくはFDDI等の有線通信の規格、又は、4G、5G、若しくはWi-Fi(登録商標)等の無線通信の規格が用いられる。 The communication I/F 17 is an interface for communicating with other devices outside the learning model selection device 10, and is, for example, a wired communication standard such as Ethernet (registered trademark) or FDDI, or 4G, 5G, or Wi-Fi. A wireless communication standard such as Fi (registered trademark) is used.
 次に、学習モデル選択装置10の機能構成について説明する。図4は、学習モデル選択装置10の機能構成の一例を示すブロック図である。図4に示すように、学習モデル選択装置10は、機能構成として、材料データ収集部21と、材料データ保存部22と、学習パターン送信部23と、評価用データセット作成部24と、評価用データセット保存部27とを含む。評価用データセット作成部24は、さらに検証用データ作成部25と、学習モデル作成部26とを含む。また、学習モデル選択装置10は、学習モデル評価部28と、選択学習モデル保存部32とを含む。学習モデル評価部28は、さらに取得部29と、生成部30と、選択部31とを含む。取得部29及び生成部30は、開示の技術の生成装置の一例である。各機能構成は、CPU11がROM12又はストレージ14に記憶された生成プログラムを含む学習モデル選択プログラムを読み出し、RAM13に展開して実行することにより実現される。 Next, the functional configuration of the learning model selection device 10 will be described. FIG. 4 is a block diagram showing an example of the functional configuration of the learning model selection device 10. As shown in FIG. As shown in FIG. 4, the learning model selection device 10 includes, as a functional configuration, a material data collection unit 21, a material data storage unit 22, a learning pattern transmission unit 23, an evaluation data set creation unit 24, an evaluation and data set storage unit 27 . The evaluation data set creation unit 24 further includes a verification data creation unit 25 and a learning model creation unit 26 . The learning model selection device 10 also includes a learning model evaluation unit 28 and a selected learning model storage unit 32 . The learning model evaluation unit 28 further includes an acquisition unit 29 , a generation unit 30 and a selection unit 31 . The acquisition unit 29 and the generation unit 30 are examples of the generation device of technology disclosed herein. Each functional configuration is realized by the CPU 11 reading out a learning model selection program including a generation program stored in the ROM 12 or storage 14, developing it in the RAM 13, and executing it.
 材料データ収集部21は、学習モデルの作成に利用する学習用データセット構築の材料となる材料データを収集する。材料データとは、目的変数及び説明変数として利用可能なデータであり、各データをそれぞれ区別するための固有のデータ識別子を備えるデータである。材料データ収集部21は、ユーザにより指定されたデータ識別子の入力を受け付け、受け付けたデータ識別子を備える材料データを収集する。材料データ収集部21は、例えば、センサから出力されるセンサ値、外部又は内部の記憶装置に記憶されたデータ等を、材料データとして収集してよい。材料データ収集部21は、収集した材料データを、材料データ保存部22に保存する。 The material data collection unit 21 collects material data used as materials for constructing a learning data set used to create a learning model. Material data is data that can be used as objective variables and explanatory variables, and is data that has a unique data identifier for distinguishing each data. The material data collection unit 21 receives an input of a data identifier designated by a user, and collects material data having the received data identifier. The material data collection unit 21 may collect, for example, sensor values output from sensors, data stored in an external or internal storage device, etc., as material data. The material data collection unit 21 stores the collected material data in the material data storage unit 22 .
 学習パターン送信部23は、ユーザにより指定された学習パターンセットの入力を受け付け、受け付けた学習パターンセットを、評価用データセット作成部24へ送信する。 The learning pattern transmission unit 23 accepts input of a learning pattern set specified by the user, and transmits the accepted learning pattern set to the evaluation data set creation unit 24 .
 学習モデルは、ベースとなる構造、パラメータ、入力するデータ形状等の違いにより、出力データの振る舞いが変化する。ここでは、学習モデルの出力データの振る舞いに影響を与える情報の設定である学習パターンを、ユーザが予め複数個作成してまとめたものを「学習パターンセット」という。各学習パターンには、各学習パターンを識別するためのインデックスが付与されている。また、各学習パターンの構成要素には、例えば、ベースモデル識別子、ハイパーパラメータ、及び学習データ構築方法が含まれる。 The behavior of the output data of the learning model changes due to differences in the base structure, parameters, input data shape, etc. Here, a "learning pattern set" is defined as a plurality of learning patterns, which are information settings that affect the behavior of the output data of the learning model, created in advance by the user and put together. Each learning pattern is given an index for identifying each learning pattern. Components of each learning pattern include, for example, a base model identifier, hyperparameters, and a learning data construction method.
 ベースモデル識別子は、学習モデルのベースとなるモデル構造を特定する識別子であり、例えば、学習モデルのAPI(Application Programming Interface)名等である。ハイパーパラメータは、ベースモデル識別子に対応した、機械学習の方法に関わるパラメータである。各ハイパーパラメータの値は一意に確定していてもよいし、複数の候補があってもよい。学習データ構築方法は、材料データを加工し、学習モデルに入力する説明変数及び目的変数を含む学習データを構築する方法である。学習データ構築方法として、学習データを構成する複数の特徴量の各々の、特徴量の種類を示す識別子である特徴識別子、特徴識別子毎の特徴量を得るための、材料データに対する計算方法等、複数の項目が設定されている。なお、上述したように、学習データとして時系列データを用い、学習データのカラムには、あるカラムの時系列をシフトしたカラムも含まれる場合、元のカラムと、時系列をシフトしたカラムとの特徴量の種類は同じである。したがって、元のカラムの特徴量と、時系列をシフトしたカラムの特徴量とでは、同じ特徴識別子が用いられる。ただし、元のカラムの特徴量が目的変数、時系列をシフトしたカラムの特徴量が説明変数の場合には、元のカラムの特徴量と、時系列をシフトしたカラムの特徴量とでは、異なる特徴識別子が用いられる。 The base model identifier is an identifier that identifies the model structure that is the basis of the learning model, and is, for example, the API (Application Programming Interface) name of the learning model. A hyperparameter is a parameter associated with a machine learning method that corresponds to a base model identifier. The value of each hyperparameter may be uniquely determined, or there may be multiple candidates. The learning data construction method is a method of processing material data and constructing learning data including explanatory variables and objective variables to be input to the learning model. As a learning data construction method, a feature identifier, which is an identifier indicating the type of feature quantity for each of the plurality of feature quantities that make up the learning data, a calculation method for material data to obtain the feature quantity for each feature identifier, etc. items are set. As described above, when time-series data is used as learning data, and the columns of the learning data include a column obtained by shifting the time series of a certain column, the original column and the column whose time series is shifted are The types of features are the same. Therefore, the same feature identifier is used for the feature amount of the original column and the feature amount of the column shifted in time series. However, if the feature of the original column is the objective variable and the feature of the column with the shifted time series is the explanatory variable, the feature of the original column and the column with the shifted time series will be different. Feature identifiers are used.
 評価用データセット作成部24は、検証用データ作成部25により作成された検証用データ、及び学習モデル作成部26により作成された学習モデルを評価用データとする。評価用データセット作成部24は、学習パターンの数、すなわち、学習パターンセットに含まれるインデックス数分の評価用データをまとめて評価用データセットとし、評価用データセット保存部27に保存する。 The evaluation data set creation unit 24 uses the verification data created by the verification data creation unit 25 and the learning model created by the learning model creation unit 26 as evaluation data. The evaluation data set creation unit 24 collects the evaluation data for the number of learning patterns, ie, the number of indexes included in the learning pattern set, as an evaluation data set, and stores the evaluation data set in the evaluation data set storage unit 27 .
 検証用データ作成部25は、材料データ保存部22から材料データを取得し、学習パターンに含まれる学習データ構築方法に従って、材料データから学習データを作成する。また、検証用データ作成部25は、学習データの一部を検証用データとして抽出し、残りの学習データを学習モデル作成部26へ出力する。検証用データは、作成された学習モデルの検証に用いるデータであり、学習モデルの機械学習に利用しないデータである。 The verification data creation unit 25 acquires material data from the material data storage unit 22 and creates learning data from the material data according to the learning data construction method included in the learning pattern. Also, the verification data creation unit 25 extracts a part of the learning data as verification data, and outputs the remaining learning data to the learning model creation unit 26 . Verification data is data used for verification of the created learning model, and is data not used for machine learning of the learning model.
 学習モデル作成部26は、学習パターンに含まれるベースモデル識別子及びハイパーパラメータに従って、検証用データ作成部25から出力された学習データを利用し、学習モデルを作成する。 The learning model creation unit 26 creates a learning model using the learning data output from the verification data creation unit 25 according to the base model identifier and hyperparameters included in the learning pattern.
 学習モデル評価部28は、評価用データセット保存部27に保存された複数の学習モデルの各々を、取得部29及び生成部30により生成された指標に基づいて評価し、選択部31により所望の学習モデルを選択する。そして、学習モデル評価部28は、選択部31により選択された学習モデルを選択学習モデル保存部32に保存する。 The learning model evaluation unit 28 evaluates each of the plurality of learning models stored in the evaluation data set storage unit 27 based on the indices generated by the acquisition unit 29 and the generation unit 30, and the selection unit 31 selects the desired Choose a learning model. The learning model evaluation unit 28 then stores the learning model selected by the selection unit 31 in the selected learning model storage unit 32 .
 取得部29は、各学習モデルの予測精度と、ユーザにより指定された少なくとも1種類の特徴量の、学習モデルによる予測結果に対する寄与度とを取得する。具体的には、取得部29は、検証用データに含まれる説明変数を学習モデルへ入力した際の学習モデルの出力データと、検証用データに含まれる目的変数との誤差に基づく予測精度を取得する。予測精度は、例えば、RMSE(Root Mean Square Error)に基づく値としてよい。また、取得部29は、検証用データを用いて、学習データを構成する特徴量の種類毎の寄与度を取得する。寄与度は、例えばSHAP値に基づく値としてよい。取得部29は、取得した学習モデル毎の予測精度及び寄与度を生成部30へ出力する。 The acquisition unit 29 acquires the prediction accuracy of each learning model and the degree of contribution of at least one type of feature quantity specified by the user to the prediction result of the learning model. Specifically, the acquisition unit 29 acquires the prediction accuracy based on the error between the output data of the learning model when the explanatory variables included in the verification data are input to the learning model and the objective variable included in the verification data. do. The prediction accuracy may be, for example, a value based on RMSE (Root Mean Square Error). In addition, the acquisition unit 29 acquires the degree of contribution for each type of feature quantity forming the learning data using the verification data. The contribution may be, for example, a value based on the SHAP value. The acquisition unit 29 outputs the prediction accuracy and the degree of contribution acquired for each learning model to the generation unit 30 .
 生成部30は、取得部29から出力された予測精度及び寄与度を用いて、学習モデル毎に、学習モデルを選択するための指標を生成する。生成部30は、ユーザにより指定された種類の特徴量についての寄与度のみを用いて、指標を生成してよい。また、生成部30は、ユーザにより指定された重みが付加された、特徴量の種類毎の寄与度を用いて指標を生成してもよい。これにより、予測精度と、所望の特徴量の寄与度、すなわち所望の予測の根拠とを考慮した指標を生成することができる。寄与度に重みを付加する場合は、さらに、いずれの種類の特徴量の寄与度を重視して指標を生成するかを調整することができる。 The generation unit 30 uses the prediction accuracy and the degree of contribution output from the acquisition unit 29 to generate an index for selecting a learning model for each learning model. The generation unit 30 may generate the index using only the degree of contribution of the type of feature specified by the user. Further, the generation unit 30 may generate an index using the degree of contribution for each type of feature amount to which a weight specified by the user is added. This makes it possible to generate an index that considers the prediction accuracy and the contribution of the desired feature amount, that is, the grounds for the desired prediction. When adding weight to the degree of contribution, it is possible to further adjust which type of feature amount to generate the index with emphasis on the degree of contribution.
 また、生成部30は、特徴量の種類毎の寄与度のスケールを一致させた上で、指標を生成してもよい。ここでのスケールとは、値の大きさの尺度のことである。これにより、各種類の特徴量について、相対的な寄与度の大きさを公平に評価可能な指標を生成することができる。また、生成部30は、予測精度と寄与度とのスケールを一致させて、指標を生成してもよい。これにより、予測精度と寄与度との大きさを公平に評価可能な指標を生成することができる。また、生成部30は、予測精度及び寄与度の少なくとも一方に重みを付加して指標を生成してよい。これにより、学習モデルを選択する際に、予測精度及び寄与度のいずれを重視するかを調整することができる。なお、上記のように、予測精度と寄与度とのスケールを一致させた上で、予測精度及び寄与度の少なくとも一方に重みを付加することで、予測精度及び寄与度のいずれを重視するかを、より適切に調整することができる。生成部30は、各学習モデルについて生成した指標を、選択部31へ出力する。 Also, the generation unit 30 may generate the index after matching the scale of the degree of contribution for each type of feature amount. A scale here is a measure of the magnitude of a value. This makes it possible to generate an index capable of fairly evaluating the relative degree of contribution for each type of feature quantity. Also, the generation unit 30 may generate an index by matching the scales of the prediction accuracy and the degree of contribution. As a result, it is possible to generate an index that can fairly evaluate the prediction accuracy and the degree of contribution. Further, the generator 30 may generate an index by adding weight to at least one of the prediction accuracy and the contribution. Thereby, when selecting a learning model, it is possible to adjust which of the prediction accuracy and the degree of contribution is emphasized. As described above, by matching the scales of the prediction accuracy and the degree of contribution and adding a weight to at least one of the prediction accuracy and the degree of contribution, it is possible to determine which of the prediction accuracy and the degree of contribution is more important. , can be adjusted more appropriately. The generation unit 30 outputs the index generated for each learning model to the selection unit 31 .
 選択部31は、生成部30から出力された各学習モデルの指標に基づいて、評価用データセット保存部27に保存された複数の学習モデルから、指標が最も高い学習モデルを選択する。なお、選択部31は、指標が所定値以上の1個以上の学習モデルを選択してもよいし、指標が上位所定個の学習モデルを選択してもよい。選択部31は、複数の学習モデルを選択した場合、選択した学習モデルを指標と共にユーザに提示して、ユーザから採用する学習モデルの選択を受け付けてもよい。 Based on the index of each learning model output from the generation unit 30, the selection unit 31 selects the learning model with the highest index from the plurality of learning models stored in the evaluation data set storage unit 27. Note that the selection unit 31 may select one or more learning models whose indices are equal to or greater than a predetermined value, or may select learning models whose indices are a predetermined number of higher ranks. When selecting a plurality of learning models, the selection unit 31 may present the selected learning models to the user together with the index, and accept the selection of the learning model to be adopted from the user.
 次に、学習モデル選択装置10の作用について説明する。図5は、学習モデル選択装置10による学習モデル選択処理の流れを示すシーケンス図である。CPU11がROM12又はストレージ14から、生成プログラムを含む学習モデル選択プログラムを読み出して、RAM13に展開して実行することにより、学習モデル選択処理が行なわれる。 Next, the action of the learning model selection device 10 will be described. FIG. 5 is a sequence diagram showing the flow of learning model selection processing by the learning model selection device 10. As shown in FIG. The learning model selection process is performed by the CPU 11 reading out a learning model selection program including a generating program from the ROM 12 or the storage 14, developing it in the RAM 13, and executing it.
 ステップS11において、CPU11は、材料データ収集部21として、ユーザにより指定されたデータ識別子の入力を受け付け、受け付けたデータ識別子を備える材料データを収集し、材料データ保存部22に保存する。次に、ステップS12において、CPU11は、学習パターン送信部23として、ユーザにより指定された学習パターンセットの入力を受け付け、受け付けた学習パターンセットを、評価用データセット作成部24へ送信する。 In step S11, the CPU 11, as the material data collection unit 21, receives the input of the data identifier specified by the user, collects the material data having the received data identifier, and saves it in the material data storage unit 22. Next, in step S<b>12 , the CPU 11 serves as the learning pattern transmission unit 23 to receive an input of a learning pattern set designated by the user, and transmits the received learning pattern set to the evaluation data set creation unit 24 .
 次に、ステップS13において、CPU11は、評価用データセット作成部24として、材料データ保存部22から材料データを取得する。次に、ステップS14において、CPU11は、評価用データセット作成部24として、評価用データセット作成処理を実行する。具体的には、CPU11は、評価用データセット作成部24の検証用データ作成部25として、学習パターンセットに含まれる学習パターン毎に、学習パターンに含まれる学習データ構築方法に従って、材料データから学習データを作成する。また、CPU11は、検証用データ作成部25として、作成した学習データの一部を検証用データとして抽出し、残りの学習データを学習モデル作成部26へ出力する。さらに、CPU11は、評価用データセット作成部24の学習モデル作成部26として、学習パターンに含まれるベースモデル識別子及びハイパーパラメータに従って、検証用データ作成部25から出力された学習データを利用し、学習モデルを作成する。 Next, in step S13, the CPU 11, acting as the evaluation data set creation section 24, acquires material data from the material data storage section 22. Next, in step S<b>14 , the CPU 11 performs evaluation data set creation processing as the evaluation data set creation unit 24 . Specifically, the CPU 11, as the verification data creation unit 25 of the evaluation data set creation unit 24, learns from the material data for each learning pattern included in the learning pattern set according to the learning data construction method included in the learning pattern. Create data. Further, CPU 11 , acting as verification data creation unit 25 , extracts part of the created learning data as verification data, and outputs the remaining learning data to learning model creation unit 26 . Furthermore, the CPU 11, as the learning model creation unit 26 of the evaluation data set creation unit 24, uses the learning data output from the verification data creation unit 25 according to the base model identifier and the hyperparameters included in the learning pattern, and performs learning. Create a model.
 次に、ステップS15において、CPU11は、評価用データセット作成部24として、検証用データ作成部25により作成された検証用データ、及び学習モデル作成部26により作成された学習モデルを評価用データとする。そして、CPU11は、評価用データセット作成部24として、学習パターンの数、すなわち、学習パターンセットに含まれるインデックス数分の評価用データをまとめて評価用データセットとし、評価用データセット保存部27に保存する。 Next, in step S15, the CPU 11, as the evaluation data set creation unit 24, uses the verification data created by the verification data creation unit 25 and the learning model created by the learning model creation unit 26 as evaluation data. do. Then, the CPU 11, as the evaluation data set creation unit 24, collects the evaluation data for the number of learning patterns, that is, the number of indexes included in the learning pattern set, as an evaluation data set, and sets the evaluation data set storage unit 27. Save to
 次に、ステップS16において、CPU11は、学習モデル評価部28として、評価用データセット保存部27に保存された評価用データセットを取得する。また、ステップS17において、CPU11は、学習モデル評価部28として、ユーザにより指定された特徴量の種類(図5中の「特徴量の指定」)の入力を受け付ける。なお、CPU11は、学習モデル評価部28として、特徴量の指定に替えて、寄与度に対する特徴量の種類毎の重み(図5中の「寄与度の重み」)を受け付けてもよい。さらに、CPU11は、学習モデル評価部28として、指標を生成する際に、予測精度及び寄与度の少なくとも一方に付与する重み(図5中の「全体の重み」)を受け付けてもよい。 Next, in step S16, the CPU 11, acting as the learning model evaluation unit 28, acquires the evaluation data set stored in the evaluation data set storage unit 27. Further, in step S17, the CPU 11, as the learning model evaluation unit 28, receives an input of the type of feature specified by the user ("designation of feature" in FIG. 5). Note that the CPU 11, as the learning model evaluation unit 28, may receive a weight for each type of feature amount with respect to the contribution ("contribution degree weight" in FIG. 5) instead of specifying the feature amount. Furthermore, the CPU 11, as the learning model evaluation unit 28, may receive a weight ("total weight" in FIG. 5) to be given to at least one of the prediction accuracy and the degree of contribution when generating the index.
 次に、ステップS18において、CPU11は、学習モデル評価部28として、学習モデル評価処理を実行する。具体的には、CPU11は、学習モデル評価部28の取得部29として、評価用データセットに含まれる学習モデル毎に、検証用データを用いて予測精度を取得する。また、CPU11は、取得部29として、学習モデル毎に、検証用データを用いて、特徴量の種類毎の寄与度を取得する。そして、CPU11は、学習モデル評価部28の生成部30として、取得部29で取得された予測精度、及びユーザにより指定された種類の特徴量についての寄与度を用いて、学習モデル毎に、学習モデルを選択するための指標を生成する。なお、特徴量の指定に替えて、寄与度の重みが受け付けられている場合には、CPU11は、生成部30として、特徴量の種類毎の寄与度に、寄与度の重みを付加して指標を生成する。さらに、全体の重みが受け付けられている場合には、CPU11は、生成部30として、予測精度及び寄与度の少なくとも一方に全体の重みを付加して指標を生成する。そして、CPU11は、学習モデル評価部28の選択部31として、生成部30により生成された各学習モデルの指標に基づいて、評価用データセット保存部27に保存された複数の学習モデルから、指標が最も高い学習モデルを選択する。 Next, in step S18, the CPU 11, as the learning model evaluation unit 28, executes learning model evaluation processing. Specifically, the CPU 11, as the acquisition unit 29 of the learning model evaluation unit 28, acquires prediction accuracy using verification data for each learning model included in the evaluation data set. In addition, the CPU 11, as the acquiring unit 29, acquires the degree of contribution for each type of feature amount for each learning model using the verification data. Then, the CPU 11, as the generation unit 30 of the learning model evaluation unit 28, uses the prediction accuracy acquired by the acquisition unit 29 and the contribution degree of the feature amount of the type specified by the user to perform learning for each learning model. Generate metrics for model selection. In addition, when the weight of the degree of contribution is accepted instead of the specification of the feature amount, the CPU 11, as the generation unit 30, adds the weight of the contribution degree to the degree of contribution for each type of feature amount to obtain an index. to generate Further, when the overall weight is accepted, the CPU 11, as the generation unit 30, adds the overall weight to at least one of the prediction accuracy and the degree of contribution to generate an index. Then, the CPU 11, as the selection unit 31 of the learning model evaluation unit 28, selects an index Choose the learning model with the highest .
 次に、ステップS19において、CPU11が、学習モデル評価部28として、選択部31により選択された学習モデル(図5中の「選択学習モデル」)を選択学習モデル保存部32に保存し、学習モデル選択処理は終了する。 Next, in step S19, the CPU 11, as the learning model evaluation unit 28, stores the learning model selected by the selection unit 31 ("selected learning model" in FIG. 5) in the selected learning model storage unit 32, and stores the learning model The selection process ends.
 なお、ステップS18において、CPU11が取得部29及び生成部30として実行する処理が、CPU11が学習モデル選択プログラムに含まれる生成プログラムを実行することにより行われる生成処理の一例である。また、生成処理は、開示の技術の生成方法の一例である。 It should be noted that the processing executed by the CPU 11 as the acquisition unit 29 and the generation unit 30 in step S18 is an example of the generation processing performed by the CPU 11 executing the generation program included in the learning model selection program. Also, the generation process is an example of a generation method of technology disclosed herein.
 従来は、学習モデルの評価において、予測結果に対する特徴量の種類毎の寄与度の大小や正負等は考慮されていない。そのため、学習モデルを「予測精度」及び「特徴量の種類毎の寄与度」の2つの指標で評価すると明示する場合、適切な学習モデルを選択できない場合がある。例えば、非特許文献1に記載の技術のように、構造や利用する特徴量が異なる複数の学習モデルを予測精度の降順に列挙したとしても、所望の予測精度及び予測の根拠を満たす最適な順に列挙されているとは限らない。これは、従来技術では、予め決められた指標に基づいて推定された予測精度のみを基準としてモデルの候補を挙げているためである。学習データや学習モデルの性質、学習モデルを選択した後に設計したコスト関数等によって、特徴量の種類毎の寄与度は変ってきてしまう。この点が従来技術では考慮されておらず、学習モデルの予測精度が高いことと、モデルの特徴量の寄与度の分布が所望の特徴量の寄与度の分布に近いこととの両方を満たす学習モデルを選択することが困難となっている。そのため、従来技術では、列挙された学習モデルから、人手で最適な学習モデルを探索する作業が必要となる。特に、特徴量の種類が増加すると、候補の学習モデルの数も膨大になり、学習モデル選択の作業自体が困難になる課題がある。 Conventionally, in the evaluation of learning models, the magnitude and positive/negative of the contribution of each type of feature quantity to the prediction results are not considered. Therefore, when it is specified that the learning model is evaluated by the two indices of "prediction accuracy" and "contribution of each type of feature amount", it may not be possible to select an appropriate learning model. For example, as in the technology described in Non-Patent Document 1, even if multiple learning models with different structures and feature amounts to be used are listed in descending order of prediction accuracy, the desired prediction accuracy and the basis for prediction are satisfied. Not necessarily listed. This is because the conventional technology selects model candidates based only on the prediction accuracy estimated based on the predetermined index. The degree of contribution of each type of feature amount changes depending on the learning data, the nature of the learning model, the cost function designed after the learning model is selected, and the like. This point is not taken into consideration in the prior art, and learning that satisfies both the high prediction accuracy of the learning model and the distribution of the contribution of the feature value of the model being close to the desired distribution of the contribution of the feature value. Choosing a model is difficult. Therefore, in the conventional technology, it is necessary to manually search for the optimum learning model from the enumerated learning models. In particular, when the number of types of feature amounts increases, the number of candidate learning models also becomes enormous, and there is a problem that the work of learning model selection itself becomes difficult.
 一方、第1実施形態に係る学習モデル選択装置は、複数の学習モデルの各々について、学習モデルの予測精度と、ユーザにより指定された少なくとも1種類の特徴量についての寄与度と、から指標を生成する。この指標は、ユーザにより指定された種類の特徴量による寄与及び予測精度の両方が加味されていると言い換えてもよい。そして、学習モデル選択装置は、この指標を用いて、複数種類の特徴量を用いて機械学習された複数の学習モデルの中から所定の学習モデルを選択する。これにより、第1実施形態に係る学習モデル選択装置は、所望の予測精度及び予測の根拠が得られる学習モデルを適切に選択することができる。 On the other hand, the learning model selection device according to the first embodiment generates an index for each of a plurality of learning models based on the prediction accuracy of the learning model and the degree of contribution of at least one type of feature specified by the user. do. In other words, this index takes into consideration both the contribution of the type of feature specified by the user and the prediction accuracy. Then, the learning model selection device uses this index to select a predetermined learning model from among a plurality of learning models machine-learned using a plurality of types of feature quantities. As a result, the learning model selection device according to the first embodiment can appropriately select a learning model from which desired prediction accuracy and grounds for prediction can be obtained.
<第2実施形態>
 次に第2実施形態について説明する。第2実施形態では、第1実施形態をより具体化した実施形態について説明する。具体的には、ある建物の内部に存在する、ドア等で外部と仕切られた空調利用部において、温度快適性の最適化を目標として、空調制御器の温度設定の最適制御方法の算出を強化学習で行う例である。強化学習エージェントのアクションである空調機の温度設定に応じて温度の変化を予測する環境モデルが、選択対象の学習モデルである。なお、第2実施形態に係る学習モデル選択装置のハードウェア構成は、図3に示す第1実施形態に係る学習モデル選択装置10のハードウェア構成と同様であるため、説明を省略する。
<Second embodiment>
Next, a second embodiment will be described. 2nd Embodiment describes embodiment which actualized 1st Embodiment more. Specifically, in an air-conditioning unit inside a building that is separated from the outside by a door or the like, the goal is to optimize temperature comfort. This is an example of learning. An environment model that predicts changes in temperature according to the temperature setting of an air conditioner, which is an action of a reinforcement learning agent, is a learning model to be selected. Note that the hardware configuration of the learning model selection device according to the second embodiment is the same as the hardware configuration of the learning model selection device 10 according to the first embodiment shown in FIG. 3, so description thereof will be omitted.
 第2実施形態に係る学習モデル選択装置110の機能構成について説明する。図6は、学習モデル選択装置110の機能構成の一例を示すブロック図である。図6に示すように、学習モデル選択装置110は、機能構成として、材料データ収集部121と、材料データ保存部122と、学習パターン送信部123と、評価用データセット作成部124と、評価用データセット保存部127とを含む。評価用データセット作成部124は、さらに検証用データ作成部125と、学習モデル作成部126とを含む。また、学習モデル選択装置110は、学習モデル評価部128と、選択学習モデル保存部132とを含む。学習モデル評価部128は、さらに取得部129と、生成部130と、選択部131とを含む。取得部129及び生成部130は、開示の技術の生成装置の一例である。各機能構成は、CPU11がROM12又はストレージ14に記憶された生成プログラムを含む学習モデル選択プログラムを読み出し、RAM13に展開して実行することにより実現される。 A functional configuration of the learning model selection device 110 according to the second embodiment will be described. FIG. 6 is a block diagram showing an example of the functional configuration of the learning model selection device 110. As shown in FIG. As shown in FIG. 6 , the learning model selection device 110 includes, as a functional configuration, a material data collection unit 121, a material data storage unit 122, a learning pattern transmission unit 123, an evaluation data set creation unit 124, an evaluation and data set storage 127 . Evaluation data set creation unit 124 further includes verification data creation unit 125 and learning model creation unit 126 . Learning model selection device 110 also includes a learning model evaluation unit 128 and a selected learning model storage unit 132 . Learning model evaluation unit 128 further includes acquisition unit 129 , generation unit 130 , and selection unit 131 . The acquisition unit 129 and the generation unit 130 are examples of the generation device of technology disclosed herein. Each functional configuration is realized by the CPU 11 reading out a learning model selection program including a generation program stored in the ROM 12 or storage 14, developing it in the RAM 13, and executing it.
 なお、第2実施形態に係る学習モデル選択装置110の機能構成と、第1実施形態に係る学習モデル選択装置10の機能構成とで、符号の末尾2桁が共通する機能構成同士において、共通する内容については、詳細な説明を省略する。 Note that the functional configuration of the learning model selection device 110 according to the second embodiment and the functional configuration of the learning model selection device 10 according to the first embodiment have the same functional configuration with the same last two digits of the code. A detailed description of the contents is omitted.
 材料データ収集部121は、空調制御に関する材料データを収集する。例えば、材料データ収集部121は、室温、外気温、人流、空調設定値、及びオープンフラグで表されるデータ識別子を備えた材料データの各々を収集する。室温は、空調利用部で計測される温度である。外気温は、屋外で計測される温度である。人流は、空調利用部の中に存在するユニークな人数である。ユニークな人数とは、単位時間当たりに空調利用部に存在する人数であり、単位時間内に空調利用部から出入りした場合でも、同一人物については重複してカウントしない人数(すなわち、延べ人数ではない)である。単位時間は、例えばデータのサンプリング間隔としてよい。空調設定値は、空調利用部に存在する空調機の温度設定値である。オープンフラグは、空調利用部を含む建物に人が出入りできるかどうかを示すフラグである。例えば、建物への出入りが可能な場合を「1」、出入りが不可能な場合を「0」としてよい。 The material data collection unit 121 collects material data related to air conditioning control. For example, the material data collection unit 121 collects each material data having data identifiers represented by room temperature, outside temperature, people flow, air conditioning settings, and open flags. The room temperature is the temperature measured by the air-conditioning unit. The outside air temperature is the temperature measured outdoors. People flow is the unique number of people present in the air conditioning utilization department. The unique number of people is the number of people who exist in the air conditioning usage area per unit time. ). The unit time may be, for example, a data sampling interval. The air conditioning setting value is the temperature setting value of the air conditioner that exists in the air conditioning utilization unit. The open flag is a flag that indicates whether or not a person can enter or leave the building containing the air-conditioning section. For example, "1" may be set when it is possible to enter/exit the building, and "0" may be set when it is impossible to enter/exit the building.
 材料データのうち、室温は、目的変数として利用される材料データであり、外気温、人流、空調設定値、及びオープンフラグは、説明変数として利用される材料データである。第2実施形態のように、学習モデルの用途が強化学習の環境モデルとしての運用を前提とする場合は、説明変数の中に、強化学習エージェントのアクションに相当するデータそのもの、又はそれを加工したデータを含むことが必要になる。なぜなら、強化学習エージェントのアクションにより環境モデルの出力が変化する必要があるためである。ここでは、空調設定値を利用した説明変数が必須となる。 Of the material data, room temperature is material data used as objective variables, and outside temperature, people flow, air conditioning set values, and open flags are material data used as explanatory variables. As in the second embodiment, when the use of the learning model is premised on operation as an environment model for reinforcement learning, the explanatory variables include the data itself corresponding to the action of the reinforcement learning agent, or the data corresponding to the action of the reinforcement learning agent. data must be included. This is because the actions of the reinforcement learning agent must change the output of the environment model. Here, explanatory variables using air conditioning set values are essential.
 材料データ収集部121、例えば、室温、外気温、空調設定値、及びオープンフラグを、BEMS(Building and Energy Management System)201から収集してよい。また、材料データ収集部121は、人流を、空調利用部に設置された人流検知センサ202から収集してよい。これらの材料データは、全て時系列データである。具体的には、各材料データは、データのサンプリング点の日時をインデックスとし、インデックスと、そのインデックスが示す日時におけるデータ値とが対応付けられた時系列データである。材料データ収集部121は、収集した材料データを材料データ保存部122に保存する。図7に、材料データ保存部122に保存される材料データの一例を示す。 The material data collection unit 121 , for example, room temperature, outside temperature, air conditioning set values, and open flags may be collected from the BEMS (Building and Energy Management System) 201 . Also, the material data collection unit 121 may collect people flow from the people flow detection sensor 202 installed in the air conditioning utilization unit. All of these material data are time-series data. Specifically, each piece of material data is time-series data in which the date and time of a data sampling point are used as an index, and the index and the data value at the date and time indicated by the index are associated with each other. The material data collection unit 121 stores the collected material data in the material data storage unit 122 . FIG. 7 shows an example of material data stored in the material data storage unit 122. As shown in FIG.
 学習パターン送信部123は、ユーザにより指定された学習パターンセットの入力を受け付け、受け付けた学習パターンセットを、評価用データセット作成部124へ送信する。図8に、学習パターンセットの一例を示す。図8の例において、学習パターン(p)は、学習パターンのインデックスである。ここでは、p=1,2,3である。また、以下では、インデックスがp(p=1,2,3)の学習パターンを「学習パターンp」と表記する。また、図8の例では、学習パターン1のベースモデル識別子は、Light GBM(Gradient Boosting Machine、参考文献2)である。また、学習パターン2及び3のベースモデル識別子は、XGBoost(eXtreme Gradient Boosting、参考文献3)である。学習パターン2と学習パターン3とでは、学習データ構築方法(詳細は後述)に一部相違がある。 The learning pattern transmission unit 123 accepts input of a learning pattern set specified by the user, and transmits the accepted learning pattern set to the evaluation data set creation unit 124 . FIG. 8 shows an example of a learning pattern set. In the example of FIG. 8, learning pattern (p) is the index of the learning pattern. Here p=1,2,3. Also, hereinafter, a learning pattern with an index of p (p=1, 2, 3) is referred to as a “learning pattern p”. Also, in the example of FIG. 8, the base model identifier of learning pattern 1 is Light GBM (Gradient Boosting Machine, Reference 2). Also, the base model identifier of learning patterns 2 and 3 is XGBoost (eXtreme Gradient Boosting, reference 3). Learning pattern 2 and learning pattern 3 are partially different in the learning data construction method (details will be described later).
 参考文献2:Ke et al., "LightGBM: A Highly Efficient Gradient Boosting Decision Tree", 2017.
 参考文献3:Tianqi Chen, Carlos Guestrin, "XGBoost: A Scalable Tree Boosting System", 2016.
Reference 2: Ke et al., "LightGBM: A Highly Efficient Gradient Boosting Decision Tree", 2017.
Reference 3: Tianqi Chen, Carlos Guestrin, "XGBoost: A Scalable Tree Boosting System", 2016.
 ここで、第2実施形態では、材料データが時系列データであり、上述の図7に示すような、複数のカラムを含むテーブルデータとして表現することができる。そのため、テーブルデータの異なるカラム同士の演算、同じカラムの時間差分の取得等により、学習データを構成する特徴量となる新しいカラムを作成可能である。さらに、説明変数の場合、上記のように作成した新しいカラムのインデックスをシフトさせたカラム、すなわち時系列をシフトさせたカラムを、新しいカラムとして作成可能である。以下では、このように時系列をシフトさせたカラムを「系列カラム」という。学習パターンの学習データ構築方法には、この新しいカラムの作成方法が定義される。 Here, in the second embodiment, the material data is time-series data, and can be expressed as table data including multiple columns, as shown in FIG. 7 above. Therefore, it is possible to create a new column as a feature amount that constitutes the learning data by performing calculations between different columns of table data, obtaining the time difference of the same column, or the like. Furthermore, in the case of explanatory variables, a column obtained by shifting the index of the new column created as described above, that is, a column whose time series is shifted can be created as a new column. Hereinafter, a column obtained by shifting the time series in this way will be referred to as a "series column". The method of creating this new column is defined in the learning data construction method of the learning pattern.
 図8の例では、学習データ構築方法として、特徴識別子F 、計算式E 、及び系列パラメータS1 、S2 、S3 が定義されている。特徴識別子F は、特徴量の種類を示す識別子である。iは特徴識別子のインデックスであり、ここでは、i=0,1,2,3,4,5である。したがって、特徴識別子F は、学習パターンpのi番目の種類の特徴量を表す。また、系列カラムの場合、時系列がシフトしているだけで、シフトさせる元となった材料データのカラム又は新たに作成されたカラム、及び系列カラムのそれぞれの特徴量は、本質的には同じ種類の特徴量であるため、同じ特徴識別子F を用いる。例えば、あるカラムAと、カラムAのデータを30分後方にシフトして新たに作成したカラムA’とは、両方ともAという同じ特徴識別子を持つ。なお、以下では、系列カラムのそれぞれを区別するために、例えばF -30minのように、シフトした時間を示す表記を特徴識別子に付記して表す。なお、i=0の特徴識別子F が示す特徴量を目的変数、i≧1の特徴識別子F が示す特徴量を説明変数とする。例えば、図8の1行目の室温階差(F )は、学習パターン1において、特徴識別子F で表される特徴量の種類が、目的変数である「室温階差」であることを表している。また、例えば、図8の2行目の室温階差(F )は、学習パターン1において、特徴識別子F で表される特徴量の種類が、説明変数である「室温階差」であることを表している。 In the example of FIG. 8, feature identifiers F i p , calculation formulas E i p , and series parameters S1 i p , S2 i p , and S3 i p are defined as the learning data construction method. The feature identifier F i p is an identifier that indicates the type of feature quantity. i is the index of the feature identifier, where i=0,1,2,3,4,5. Therefore, the feature identifier F i p represents the i-th kind of feature quantity of the learning pattern p. In addition, in the case of series columns, only the time series is shifted, and the feature values of the material data column or the newly created column that is the source of the shift and the series column are essentially the same. The same feature identifier F i p is used for the feature amount of the type. For example, a column A and a new column A' created by shifting the data in column A backward by 30 minutes both have the same feature identifier of A. In the following description, in order to distinguish between series columns, a notation indicating the shifted time, such as F i p −30min, is added to the feature identifier. Note that the feature quantity indicated by the feature identifier F i p with i=0 is set as the objective variable, and the feature quantity indicated by the feature identifier F i p with i ≧1 is set as the explanatory variable. For example, the room temperature difference (F 0 1 ) on the first line in FIG . It represents that. Further, for example, the room temperature difference (F 1 1 ) in the second row of FIG. It means that
 計算式E は、材料データから特徴量となる新しいカラムを計算するための式であり、材料データのデータ識別子を用いて規定される。例えば、図8の1行目の計算式は、時刻tの室温階差(F )を計算するための計算式E であり、E は、時刻tの室温から、時刻tの60分前の室温を減算することを規定している。以下では、時刻tの<データ識別子>又は<特徴識別子>を「<データ識別子>又は<特徴識別子>(t)」、例えば「室温(t)」、「室温階差(t)」のように表記する。 The calculation formula E i p is a formula for calculating a new column as a feature amount from the material data, and is defined using the data identifier of the material data. For example, the formula on the first line in FIG. 8 is a formula E 0 1 for calculating the room temperature difference (F 0 1 ) at time t, and It is specified that the room temperature 60 minutes before is subtracted. Below, <data identifier> or <feature identifier> at time t is expressed as "<data identifier> or <feature identifier>(t)", for example, "room temperature (t)" or "room temperature difference (t)". write.
 系列パラメータS1 、S2 、S3 は、計算式E で作成した新しいカラムXに対し、そのカラムXを基に系列カラムを作成するためのパラメータである。S1 は系列数、S2 は開始時点、S3 は終了時点を規定するパラメータである。具体的には、S2 ~S3 の区間を等間隔にS1 の数だけ分割し、Xを各時点にシフトした系列カラムを作成することを表す。特徴識別子F の場合、すなわち目的変数の場合、系列カラムを作成する必要はないため、系列パラメータは規定されない。 Series parameters S1 i p , S2 i p , and S3 i p are parameters for creating a series column based on new column X created by calculation formula E i p . S1 i p is the number of sequences, S2 i p is the start point, and S3 i p is the end point. Specifically, it represents that the section from S2 i p to S3 i p is divided by the number of S1 i p at equal intervals, and a sequence column is created by shifting X to each time point. For the feature identifier F 0 p , ie for the target variable, no series parameters are defined since there is no need to create series columns.
 検証用データ作成部125は、材料データ保存部122から材料データを取得し、学習パターンに含まれる学習データ構築方法に従って、材料データから学習データを作成する。図8に示す学習パターンセットの例を用いて、学習データ作成の具体例について説明する。検証用データ作成部125は、E =室温(t)-室温(t-60min)により、特徴識別子F で示される室温階差(t)を計算する。例えば、検証用データ作成部125は、[2020-01-01 09:00:00のF ]=[2020-01-01 09:00:00の室温]-[2020-01-01 08:00:00の室温]のように計算する。図9に、学習データの目的変数として作成された特徴識別子F で示される室温階差(t)の一例を示す。 The verification data creation unit 125 acquires material data from the material data storage unit 122 and creates learning data from the material data according to the learning data construction method included in the learning pattern. A specific example of learning data creation will be described using the example of the learning pattern set shown in FIG. The verification data creation unit 125 calculates the room temperature difference (t) indicated by the feature identifier F 0 1 by E 0 1 = room temperature (t)−room temperature (t−60min). For example, the verification data creation unit 125 determines [F 0 1 at 2020-01-01 09:00:00]=[Room temperature at 2020-01-01 09:00:00]-[2020-01-01 08: room temperature at 00:00]. FIG. 9 shows an example of the room temperature difference (t) indicated by the feature identifier F 0 1 created as the objective variable of the learning data.
 また、例えば、検証用データ作成部125は、計算式E と、系列パラメータS1 /S2 /S3 =6/-60min/-360minとを用いて、特徴識別子F で示される室温階差(t)の系列カラムを計算する。具体的には、検証用データ作成部125は、計算式E =室温(t)-室温(t-60min)で計算されるF を、-60minシフトしたF -60minを、室温(t-60min)-室温(t-120min)と計算する。例えば、検証用データ作成部125は、[2020-01-01 09:0:00のF -60min]=[2020-01-01 08:00:00の室温]-[2020-01-01 07:00:00の室温]と計算する。図10に、学習データの説明変数として作成された特徴識別子F ~F の系列カラムの一例を示す。なお、図8の例に従い、図10におけるF は室温階差、F は外気温、F は人流階差、F は空調設定差分、F はオープンフラグのそれぞれを示す特徴識別子である。 Further, for example, the verification data creation unit 125 uses the calculation formula E 1 1 and the sequence parameters S1 1 1 /S2 1 1 /S3 1 1 =6/−60 min/−360 min to calculate the feature identifier F 1 1 Calculate the series column of the room temperature difference (t) denoted by . Specifically, the verification data creation unit 125 shifts F 1 1 calculated by the formula E 1 1 = room temperature (t)−room temperature (t−60 min) by −60 min to obtain F 1 1 −60 min, Calculate as room temperature (t-60 min) - room temperature (t-120 min). For example, the verification data creation unit 125 calculates [F 1 1 -60 min at 2020-01-01 09:00:00]=[Room temperature at 2020-01-01 08:00:00]-[2020-01-01 Room temperature at 07:00:00]. FIG. 10 shows an example of series columns of feature identifiers F 1 1 to F 5 1 created as explanatory variables of learning data. In addition, according to the example of FIG. 8, F 1 1 in FIG. 10 is the room temperature difference, F 2 1 is the outside temperature, F 3 1 is the crowd flow difference, F 4 1 is the air conditioning setting difference, and F 5 1 is the open flag. is a feature identifier that indicates
 また、検証用データ作成部125は、学習データの一部を検証用データとして抽出し、残りの学習データを学習モデル作成部126へ出力する。例えば、検証用データ作成部125は、1か月分の材料データを取得した場合、1か月分の学習データを作成する。そして、検証用データ作成部125は、1か月のうち、事前に規定したある1週間分の学習データを検証用データとして抽出する。 Also, the verification data creation unit 125 extracts part of the learning data as verification data, and outputs the remaining learning data to the learning model creation unit 126 . For example, when one month's worth of material data is obtained, the verification data creating unit 125 creates one month's worth of learning data. Then, the verification data creation unit 125 extracts learning data for a predetermined one week out of one month as verification data.
 学習モデル作成部126は、学習パターンに含まれるベースモデル識別子が示すモデル構造にハイパーパラメータを設定し、調整するパラメータに初期値を設定した学習モデルに、学習データの説明変数を入力し、出力データを得る。そして、学習モデル作成部126は、出力データと目的変数とが近づくようにパラメータを更新することにより、学習モデルの機械学習を実行する。なお、ハイパーパラメータが一意に定まらず、範囲で指定されている場合、学習モデル作成部126は、学習モデルの性能が最も良くなるハイパーパラメータを探索しながら、学習モデルを作成してもよい。 The learning model creation unit 126 sets hyperparameters in the model structure indicated by the base model identifier included in the learning pattern, inputs explanatory variables of learning data to the learning model in which initial values are set for parameters to be adjusted, and outputs data. get Then, the learning model creation unit 126 executes machine learning of the learning model by updating the parameters so that the output data and the objective variable are closer to each other. Note that when hyperparameters are not uniquely defined and are specified as ranges, the learning model creation unit 126 may create a learning model while searching for hyperparameters that maximize the performance of the learning model.
 取得部129は、学習パターン毎に、検証用データを用いて、検証用データの説明変数と同じ要素数(説明変数のカラム数×検証用データのインデックス数)のSHAP値を絶対値に変換したSHAP を算出する。そして、図11に示すように、特徴識別子F に属する全カラムの検証用データの期間における、各要素のSHAP の平均(SHAP ) ̄(図11、図13、及び数式中では、「SHAP 」の上に「 ̄(オーバーライン)」)を算出する。取得部129は、下記(1)式により、全ての(SHAP ) ̄が0~100に収まるように、スケール変換したc を算出する。また、取得部129は、下記(2)式に示すように、c を並べた寄与度評価ベクトルc(数式中では太字で表記)を作成する。すなわち、c は、特徴識別子F をで示される特徴量の種類についての寄与度に相当する。 For each learning pattern, the acquisition unit 129 converts the SHAP values of the same number of elements as the explanatory variables of the verification data (the number of columns of the explanatory variables×the number of indices of the verification data) into absolute values using the verification data. Calculate SHAP i p . Then, as shown in FIG. 11, the average of SHAP i p of each element in the verification data period of all columns belonging to the feature identifier F i p (SHAP i p ) (FIGS. 11, 13 and in the formula Now, calculate ``(overline)'' on ``SHAP i p ''. The acquisition unit 129 calculates scale-converted c i p such that all (SHAP i p ) ̂ falls within 0 to 100 using the following equation (1). In addition, the acquisition unit 129 creates a contribution evaluation vector c p (shown in bold in the formula) in which c i p are arranged, as shown in the following formula (2). In other words, c i p corresponds to the degree of contribution for the type of feature amount indicated by the feature identifier F i p .
Figure JPOXMLDOC01-appb-M000001
Figure JPOXMLDOC01-appb-M000001
 また、取得部129は、ユーザから指定された寄与度重みベクトルW1(数式中では太字で表記)を取得する。寄与度重みベクトルW1は、例えば図12に示すように、[w ,w ,w ,w ,w (Tは転置を表す)のように、各要素が寄与度評価ベクトルcの各要素に対応した重みを表すベクトルである。寄与度重みベクトルW1は、ユーザが事前に作成したものであり、各要素の重みは、学習モデルを選択する際に重視したい度合いに応じた値を設定しておけばよい。例えば、第2実施形態のように、「強化学習の環境モデル構築」という文脈においては、「強化学習エージェントのアクションに関する特徴量」の重みを大きく指定してよい。ここでは、「空調設定値」が該当する。なお、重みとして、0又は1の2値を用いることにより、第1実施形態で説明したような特徴量の指定を実現することができる。取得部129は、下記(3)式に示すように、寄与度評価ベクトルcと寄与度重みベクトルW1とを乗算して、寄与度評価αを取得する。 The acquisition unit 129 also acquires the contribution weight vector W1 (shown in bold in the formula) specified by the user. As shown in FIG. 12, for example, the contribution weight vector W1 is represented by [w 1 p , w 2 p , w 3 p , w 4 p , w 5 p ] T (T represents transposition). is a vector representing the weight corresponding to each element of the contribution evaluation vector cp . The contribution weight vector W1 is created in advance by the user, and the weight of each element may be set to a value corresponding to the degree of importance to be given when selecting a learning model. For example, as in the second embodiment, in the context of "environment model construction for reinforcement learning", a large weight may be specified for the "feature amount relating to the action of the reinforcement learning agent". Here, "air conditioning set value" corresponds. By using a binary value of 0 or 1 as the weight, it is possible to specify the feature quantity as described in the first embodiment. The acquisition unit 129 acquires the contribution evaluation α p by multiplying the contribution evaluation vector c p by the contribution weight vector W1 as shown in the following equation (3).
Figure JPOXMLDOC01-appb-M000002
Figure JPOXMLDOC01-appb-M000002
 また、取得部129は、検証用データを用いて平均2乗誤差RMSEを算出し、例えば下記(4)式に示すように、RMSEの逆数を精度評価βとして取得する。取得部129は、取得した寄与度評価α及び精度評価βを生成部130へ出力する。 The acquisition unit 129 also calculates the mean square error RMSE p using the verification data, and acquires the reciprocal of the RMSE p as the accuracy evaluation β p , as shown in the following equation (4), for example. The acquiring unit 129 outputs the acquired contribution evaluation α p and accuracy evaluation β p to the generating unit 130 .
Figure JPOXMLDOC01-appb-M000003
Figure JPOXMLDOC01-appb-M000003
 生成部130は、取得部129から出力された寄与度評価α及び精度評価βを用いて、例えば下記(5)式により、寄与度評価αと精度評価βとのスケールを一致させるための、寄与度スケーリング定数Kを算出する。 Using the contribution evaluation α p and the accuracy evaluation β p output from the acquisition unit 129, the generating unit 130 matches the scales of the contribution evaluation α p and the accuracy evaluation β p , for example, according to the following equation (5). Calculate the contribution scaling constant K for
Figure JPOXMLDOC01-appb-M000004
Figure JPOXMLDOC01-appb-M000004
 また、生成部130は、例えば図12に示すような全体寄与度重みW2を取得する。全体寄与度重みW2は、ユーザにより事前に設定された値であり、予測精度を1とした場合に、寄与度をどの程度重視するかに応じた値を設定しておけばよい。生成部130は、寄与度評価α、精度評価β、寄与度スケーリング定数K、及び全体寄与度重みW2を用いて、例えば下記(6)式により、モデル評価関数Lを生成する。 Also, the generator 130 acquires the overall contribution weight W2 as shown in FIG. 12, for example. The overall contribution weight W2 is a value set in advance by the user, and if the prediction accuracy is set to 1, a value may be set according to how much weight is given to the contribution. The generation unit 130 generates the model evaluation function L p using the contribution evaluation α p , the accuracy evaluation β p , the contribution scaling constant K, and the overall contribution weight W2, for example, according to Equation (6) below.
Figure JPOXMLDOC01-appb-M000005
Figure JPOXMLDOC01-appb-M000005
 なお、寄与度スケーリング定数Kに替えて、(5)式を逆数にした予測精度スケーリング定数K’を用いてもよい。この場合、(6)式において、K’をβの項に乗算する。また、全体寄与度重みW2に替えて、寄与度を1とした場合に、予測精度をどの程度重視するかに応じた重みである全体予測精度重みW2’を用いてもよい。この場合、(6)式において、W2’をβの項に乗算する。 Note that instead of the contribution scaling constant K, a prediction accuracy scaling constant K' obtained by reciprocating the equation (5) may be used. In this case, the β p term is multiplied by K′ in equation (6). Further, instead of the overall contribution weight W2, an overall prediction accuracy weight W2', which is a weight according to how much importance is placed on the prediction accuracy when the contribution is set to 1, may be used. In this case, in equation (6), the term β p is multiplied by W2′.
 図13に、各学習パターンについて、取得部129で算出される(SHAP ) ̄、寄与度評価ベクトルc、及びRMSEの一例を示す。また、図14に、各学習パターンについて、取得部129で取得される寄与度評価α及び精度評価β、生成部130で算出される寄与度スケーリング定数K、スケール変換後の寄与度評価α×K、及び生成部130で生成されるモデル評価関数Lの一例を示す。 FIG. 13 shows an example of (SHAP i p ) −, contribution evaluation vector c p , and RMSE p calculated by the acquisition unit 129 for each learning pattern. Further, FIG. 14 shows, for each learning pattern, the contribution evaluation α p and the accuracy evaluation β p obtained by the obtaining unit 129, the contribution scaling constant K calculated by the generating unit 130, and the contribution evaluation α after scale conversion. An example of p ×K and a model evaluation function L p generated by the generation unit 130 is shown.
 選択部131は、評価用データセット保存部127に保存された複数の学習モデルから、生成部130により生成されたモデル評価関数Lが最大になる学習モデルを選択する。 The selection unit 131 selects a learning model that maximizes the model evaluation function L p generated by the generation unit 130 from a plurality of learning models stored in the evaluation data set storage unit 127 .
 次に、学習モデル選択装置110の作用について説明する。第2実施形態においても、第1実施形態と同様に、CPU11がROM12又はストレージ14から、生成プログラムを含む学習モデル選択プログラムを読み出して、RAM13に展開して実行することにより、図5に示す学習モデル選択処理が行なわれる。ここでは、図5のステップS14における評価用データ作成処理、及びステップS18における学習モデル評価処理の各々のより詳細な処理について、図15及び図16に示すフローチャートを用いて説明する。 Next, the action of the learning model selection device 110 will be described. Also in the second embodiment, as in the first embodiment, the CPU 11 reads out a learning model selection program including a generation program from the ROM 12 or the storage 14, develops it in the RAM 13, and executes it, so that the learning shown in FIG. A model selection process is performed. Here, more detailed processing of each of the evaluation data creation processing in step S14 of FIG. 5 and the learning model evaluation processing in step S18 will be described using the flowcharts shown in FIGS. 15 and 16. FIG.
 まず、図15に示す評価用データセット作成処理について説明する。 First, the evaluation data set creation process shown in FIG. 15 will be described.
 ステップS101において、CPU11は、評価用データセット作成部124として、学習モデルセット及び検証用データセットを初期化する。具体的には、CPU11は、評価用データセット作成部124として、作成された学習モデルを追加するための空集合、及び作成された検証用データを追加するための空集合を用意する。また、CPU11は、評価用データセット作成部124として、学習パターンのインデックスを示す変数pに1を設定する。 In step S101, the CPU 11, as the evaluation data set creation unit 124, initializes the learning model set and the verification data set. Specifically, the CPU 11, as the evaluation data set creating unit 124, prepares an empty set for adding the created learning model and an empty set for adding the created verification data. Further, the CPU 11, as the evaluation data set creation unit 124, sets 1 to the variable p indicating the index of the learning pattern.
 次に、ステップS102において、CPU11は、評価用データセット作成部124として、pがインデックスの最大値pmax(ここでは、pmax=3)以下か否かを判定する。p≦pmaxの場合には、処理はステップS103へ移行する。 Next, in step S102, the CPU 11, as the evaluation data set creation unit 124, determines whether or not p is equal to or less than the maximum index value pmax (here, pmax=3). If p≤pmax, the process proceeds to step S103.
 ステップS103では、CPU11は、評価用データセット作成部124として、学習データセットを初期化する。具体的には、CPU11は、評価用データセット作成部124として、作成された学習データを追加するための空集合を用意する。そして、CPU11は、検証用データ作成部125として、特徴識別子のインデックスを示す変数iに0を設定する。 In step S103, the CPU 11, acting as the evaluation data set creation unit 124, initializes the learning data set. Specifically, the CPU 11, as the evaluation data set creation unit 124, prepares an empty set for adding the created learning data. Then, the CPU 11, as the verification data creation unit 125, sets 0 to the variable i indicating the index of the feature identifier.
 次に、ステップS104において、CPU11は、検証用データ作成部125として、iがインデックスの最大値imax(ここでは、imax=5)以下か否かを判定する。i≦imaxの場合には、処理はステップS105へ移行する。 Next, in step S104, the CPU 11, as the verification data creation unit 125, determines whether i is equal to or less than the maximum index value imax (here, imax=5). If i≤imax, the process proceeds to step S105.
 ステップS105では、CPU11は、検証用データ作成部125として、計算式E で使用する材料データを材料データ保存部122から取得し、取得した材料データに計算式E を適用し、新しいカラムXを作成する。 In step S105, the CPU 11, as the verification data creation unit 125, acquires the material data used in the calculation formula E i p from the material data storage unit 122, applies the calculation formula E i p to the acquired material data, and creates a new Create column X.
 次に、ステップS106において、CPU11は、検証用データ作成部125として、iが0か否か、すなわちカラムXに相当する特徴識別子F が示す特徴量が目的変数か否かを判定する。i=0の場合には、処理はステップS107へ移行し、CPU11は、検証用データ作成部125として、カラムXを学習データセットに追加する。一方、i≧1の場合には、処理はステップS108へ移行する。ステップS108では、CPU11は、検証用データ作成部125として、系列パラメータS1 、S2 、S3 を読み込み、S2 ~S3 の区間を等間隔にS1 の数だけ分割し、Xを各時点にシフトした系列カラムを作成する。そして、CPU11は、検証用データ作成部125として、作成した系列カラムを学習データセットに追加する。 Next, in step S106, the CPU 11, as the verification data creation unit 125, determines whether or not i is 0, that is, whether or not the feature quantity indicated by the feature identifier F i p corresponding to column X is the objective variable. When i=0, the process proceeds to step S107, and the CPU 11, acting as the verification data creation unit 125, adds the column X to the learning data set. On the other hand, if i≧1, the process proceeds to step S108. In step S108, the CPU 11, as the verification data creation unit 125, reads the series parameters S1 i p , S2 i p , and S3 i p , and divides the interval from S2 i p to S3 i p at equal intervals by the number of S1 i p . Split and create series columns with X shifted to each time point. Then, the CPU 11, as the verification data creation unit 125, adds the created series column to the learning data set.
 次に、ステップS109において、CPU11は、検証用データ作成部125として、iを1インクリメントして、処理はステップS104に戻る。ステップS104において、i>imaxと判定されると、処理はステップS110へ移行する。 Next, in step S109, the CPU 11, acting as the verification data creation unit 125, increments i by 1, and the process returns to step S104. If i>imax is determined in step S104, the process proceeds to step S110.
 ステップS110では、CPU11は、検証用データ作成部125として、学習データセットに含まれる一部の学習データを検証用データとして抽出し、検証用データセットに追加する。また、CPU11は、検証用データ作成部125として、残りの学習データを学習モデル作成部126へ出力する。 In step S110, the CPU 11, as the verification data creation unit 125, extracts part of the learning data included in the learning data set as verification data and adds it to the verification data set. Further, CPU 11 outputs the remaining learning data to learning model creating section 126 as verification data creating section 125 .
 次に、ステップS111において、CPU11は、学習モデル作成部126として、学習パターンpのベースモデル識別子で指定されたモデル構造を、ベースモデル識別子からAPIを呼び出す等して取得し、学習パターンpのハイパーパラメータを設定する。そして、CPU11は、学習モデル作成部126として、検証用データ作成部125から出力された残りの学習データを利用して、ベースモデル識別子が示すモデル構造にハイパーパラメータが設定された学習モデルの機械学習を実行する。CPU11は、学習モデル作成部126として、例えば、グリッドサーチ交差検証で学習モデルを評価しながら、機械学習を実行する。 Next, in step S111, the CPU 11, as the learning model creation unit 126, acquires the model structure specified by the base model identifier of the learning pattern p by calling an API from the base model identifier, and so on. Set parameters. Then, as the learning model creating unit 126, the CPU 11 uses the remaining learning data output from the verification data creating unit 125 to machine-learn a learning model in which hyperparameters are set in the model structure indicated by the base model identifier. to run. As the learning model creation unit 126, the CPU 11 executes machine learning while evaluating the learning model by grid search cross-validation, for example.
 次に、ステップS112において、CPU11は、学習モデル作成部126として、学習モデルセットに、完成した学習モデルを追加する。次に、ステップS113において、CPU11は、評価用データセット作成部124として、pを1インクリメントして、処理はステップS102に戻る。ステップS102において、p>pmaxと判定されると、評価用データセット作成処理は終了する。 Next, in step S112, the CPU 11, as the learning model creation unit 126, adds the completed learning model to the learning model set. Next, in step S113, the CPU 11, acting as the evaluation data set creating unit 124, increments p by 1, and the process returns to step S102. If p>pmax is determined in step S102, the evaluation data set creation process ends.
 評価用データセット作成処理により作成された検証用データセット及び学習モデルセットが、評価用データセットとして、評価用データセット保存部127に保存される(図5のS17)。 The verification data set and the learning model set created by the evaluation data set creation process are stored in the evaluation data set storage unit 127 as evaluation data sets (S17 in FIG. 5).
 次に、図16に示す学習モデル評価処理について説明する。 Next, the learning model evaluation process shown in FIG. 16 will be described.
 ステップS121において、CPU11は、学習モデル評価部128として、学習パターンのインデックスを示す変数pに1を設定する。次に、ステップS122において、CPU11は、学習モデル評価部128として、pがインデックスの最大値pmax(ここでは、pmax=3)以下か否かを判定する。p≦pmaxの場合には、処理はステップS123へ移行する。 In step S121, the CPU 11, as the learning model evaluation unit 128, sets 1 to the variable p indicating the index of the learning pattern. Next, in step S122, the CPU 11, as the learning model evaluation unit 128, determines whether or not p is equal to or less than the maximum index value pmax (here, pmax=3). If p≤pmax, the process proceeds to step S123.
 ステップS123では、CPU11は、取得部129として、学習パターンpの検証用データを用いて、検証用データの説明変数と同じ要素数のSHAP値を絶対値に変換したSHAP を算出する。次に、ステップS124において、CPU11は、取得部129として、特徴識別子のインデックスを示す変数iに1を設定する。 In step S123, the CPU 11, as the acquiring unit 129, uses the verification data of the learning pattern p to calculate SHAP i p by converting the SHAP values of the same number of elements as the explanatory variables of the verification data into absolute values. Next, in step S124, the CPU 11, as the acquiring unit 129, sets 1 to the variable i indicating the index of the feature identifier.
 次に、ステップS125において、CPU11は、取得部129として、iがインデックスの最大値imax(ここでは、imax=5)以下か否かを判定する。i≦imaxの場合には、処理はステップS126へ移行する。 Next, in step S125, the CPU 11, as the acquisition unit 129, determines whether or not i is equal to or less than the maximum index value imax (here, imax=5). If i≤imax, the process proceeds to step S126.
 ステップS126では、CPU11は、取得部129として、特徴識別子F に属する全カラムの検証用データの期間における、各要素のSHAP の平均(SHAP ) ̄を算出する。次に、ステップS127において、CPU11は、取得部129として、iを1インクリメントして、処理はステップS125に戻る。ステップS125において、i>imaxと判定されると、処理はステップS128へ移行する。 In step S126, the CPU 11, as the acquisition unit 129, calculates the average ( SHAP ip ) of SHAP ip of each element during the verification data period of all columns belonging to the feature identifier F ip . Next, in step S127, the CPU 11, as the acquiring unit 129, increments i by 1, and the process returns to step S125. If i>imax is determined in step S125, the process proceeds to step S128.
 ステップS128では、CPU11は、取得部129として、例えば(1)式により、全ての(SHAP ) ̄が0~100に収まるようにスケール変換したc を算出する。次に、ステップS129において、CPU11は、取得部129として、(2)式に示すように、c を並べた寄与度評価ベクトルcを作成する。また、CPU11は、取得部129として、ユーザから指定された寄与度重みベクトルW1を取得し、(3)式に示すように、寄与度評価ベクトルcと寄与度重みベクトルW1とを乗算して、寄与度評価αを取得する。 In step S128, the CPU 11, as the acquisition unit 129, calculates c i p that is scale-converted so that all (SHAP i p ) are within the range of 0 to 100, for example, according to equation (1). Next, in step S129, the CPU 11, as the acquiring unit 129, creates a contribution evaluation vector c p in which c i p are arranged as shown in the equation (2). Further, the CPU 11, as the acquiring unit 129, acquires the contribution weighting vector W1 specified by the user, and multiplies the contribution evaluation vector cp by the contribution weighting vector W1 as shown in equation (3). , obtain a contribution estimate α p .
 次に、ステップS130において、CPU11は、取得部129として、学習パターンpの検証用データを用いて平均2乗誤差RMSEを算出し、例えば(4)式に示すように、RMSEの逆数を精度評価βとして取得する。次に、ステップS131において、CPU11は、学習モデル評価部128として、pを1インクリメントして、処理はステップS122に戻る。ステップS122において、p>pmaxと判定されると、処理はステップS132へ移行する。 Next, in step S130, the CPU 11, as the acquiring unit 129, calculates the mean square error RMSE p using the verification data of the learning pattern p, and obtains the reciprocal of the RMSE p as shown in the equation (4), for example. Obtained as the accuracy estimate β p . Next, in step S131, the CPU 11, as the learning model evaluation unit 128, increments p by 1, and the process returns to step S122. If p>pmax is determined in step S122, the process proceeds to step S132.
 ステップS132では、CPU11は、生成部130として、取得部129により取得された寄与度評価α及び精度評価βを用いて、例えば(5)式により、寄与度評価αと精度評価βとのスケールを一致させるための、寄与度スケーリング定数Kを算出する。 In step S132, the CPU 11, as the generation unit 130, uses the contribution evaluation αp and the accuracy evaluation βp acquired by the acquisition unit 129, for example, by formula (5) to obtain the contribution evaluation αp and the accuracy evaluation βp Calculate a contribution scaling constant K to match the scale of .
 次に、ステップS133において、CPU11は、生成部130として、ユーザにより指定された全体寄与度重みW2を取得する。そして、CPU11は、生成部130として、学習パターン毎に、寄与度評価α、精度評価β、寄与度スケーリング定数K、及び全体寄与度重みW2を用いて、例えば(6)式により、モデル評価関数Lを生成する。そして、CPU11は、選択部131として、評価用データセット保存部127に保存された複数の学習モデルから、生成部130により生成されたモデル評価関数Lが最大になる学習モデルを選択し、学習モデル評価処理は終了する。 Next, in step S133, the CPU 11, as the generator 130, acquires the overall contribution weight W2 specified by the user. Then, the CPU 11, as the generation unit 130, for each learning pattern, uses the contribution evaluation α p , the accuracy evaluation β p , the contribution scaling constant K, and the overall contribution weight W2, for example, by formula (6), the model Generate an evaluation function Lp . Then, the CPU 11, as the selection unit 131, selects a learning model that maximizes the model evaluation function Lp generated by the generation unit 130 from a plurality of learning models stored in the evaluation data set storage unit 127, and performs learning. The model evaluation process ends.
 学習モデル評価処理により選択された学習モデルは、選択学習モデル保存部132に保存される(図5のS19)。 The learning model selected by the learning model evaluation process is stored in the selected learning model storage unit 132 (S19 in FIG. 5).
 以上、説明したように、第2実施形態に係る学習モデル選択装置においても、第1実施形態に係る学習モデル選択装置と同様に、所望の予測精度及び予測の根拠が得られる学習モデルを適切に選択することができる。 As described above, similarly to the learning model selection device according to the first embodiment, the learning model selection device according to the second embodiment appropriately selects a learning model that provides the desired prediction accuracy and basis for prediction. can be selected.
 また、各学習モデルについて算出された特徴量の種類毎の寄与度のスケールは、必ずしも一致しないため、そのまま利用すると学習モデル間の比較を公平に行うことができない。例えば、各学習パターンの(SHAP ) ̄の合計は一致せず、(SHAP ) ̄の合計が大きい学習モデルは、寄与度が不当に大きく評価され易くなる。上記第2実施形態では、特徴量の種類毎の寄与度を、例えば(1)式に示すように、0~100にスケール変換を行うことで、各学習パターンのcの合計が100となり、各種類の特徴量について、相対的な寄与度の大きさを公平に評価することができる。 In addition, since the scales of the degree of contribution for each type of feature amount calculated for each learning model do not always match, if the scales are used as they are, the learning models cannot be compared fairly. For example, the sum of (SHAP i p ) of each learning pattern does not match, and a learning model with a large sum of (SHAP i p ) tends to be evaluated to have an unreasonably large contribution. In the second embodiment, the contribution of each type of feature quantity is scaled from 0 to 100 as shown in formula (1), for example, so that the total c p of each learning pattern becomes 100. It is possible to fairly evaluate the relative degree of contribution for each type of feature quantity.
 また、第2実施形態では、特徴量の種類毎の個別の重みを表す「寄与度重みベクトル」を用いることで、所望の特徴量の寄与度を、評価において重視することができる。例えば、図12に示すように寄与度重みベクトルW1を設計することで、最も重みが大きい4番目の特徴識別子F が示す空調設定値又は空調室温差分を重視することができる。これにより、図13及び図14に示すように、特徴識別子F に対応するc がc の中で最も大きい学習パターン1の寄与度評価αが最大になっている。 In addition, in the second embodiment, by using a “contribution weighting vector” that represents individual weights for each type of feature amount, the contribution of a desired feature amount can be emphasized in evaluation. For example, by designing the contribution weighting vector W1 as shown in FIG. 12, it is possible to emphasize the air-conditioning set value or air-conditioning room temperature difference indicated by the fourth feature identifier F 4 p with the largest weight. As a result, as shown in FIGS. 13 and 14, the learning pattern 1 whose c 4 p corresponding to the feature identifier F 4 p is the largest among c i p has the largest contribution evaluation α p .
 また、寄与度と精度とのスケールは必ずしも一致しないため、寄与度評価及び精度評価のどちらかが大き過ぎる又は小さ過ぎる場合がある。例えば、図14の例では、寄与度評価αが精度評価βに比べて全体的に大きい。そのため、仮にK=1でモデル評価関数Lを生成した場合、寄与度評価が大きくなり過ぎ、ユーザの意図に関わらず、精度評価の違いがモデル評価関数Lにほとんど影響しなくなってしまう。第2実施形態では、例えば(5)式に示すように、寄与度評価と精度評価とのスケールを一致させるための寄与度スケーリング定数Kを算出して寄与度評価αに乗算することで、図14に示すように、寄与度評価αと精度評価βとのスケールがほぼ同じになり、公平に評価を行うことができる。 Also, since the scales of contribution and accuracy do not always match, either contribution evaluation or accuracy evaluation may be too large or too small. For example, in the example of FIG. 14, the contribution evaluation α p is generally larger than the accuracy evaluation β p . Therefore, if the model evaluation function L p is generated with K=1, the contribution evaluation becomes too large, and regardless of the user's intention, the difference in accuracy evaluation hardly affects the model evaluation function L p . In the second embodiment, for example, as shown in formula (5), by calculating a contribution scaling constant K for matching the scales of the contribution evaluation and the accuracy evaluation and multiplying the contribution evaluation α p , As shown in FIG. 14, the scales of the contribution degree evaluation α p and the accuracy evaluation β p are almost the same, and the evaluation can be performed fairly.
 また、第2実施形態のようにKを設計することで、ユーザは直感的に全体寄与度重みW2を設計することができる。例えば、寄与度評価と精度評価とを同じ程度に重視する場合はW2=1、寄与度評価を重視する場合はW2>1、精度評価を重視する場合はW2<1、のように設計することができる。例えば、第2実施形態では、W2=1.5とした例を示しているが、W2=0.5にした場合には、精度評価が重視され、図17に示すように、精度評価βが最も大きい学習パターン3のモデル評価関数Lが最も大きくなっている。 Also, by designing K as in the second embodiment, the user can intuitively design the overall contribution weight W2. For example, if the contribution evaluation and the accuracy evaluation are given equal importance, W2=1, if the contribution evaluation is given importance, W2>1, and if the accuracy evaluation is given importance, W2<1. can be done. For example, in the second embodiment, an example in which W2 =1.5 is shown. The model evaluation function Lp of the learning pattern 3 with the largest is the largest.
 ここで、第2実施形態と同様の具体例を用いて、W2の調整方法について説明する。前提として、空調設定値に応じて学習モデルにより予測される室温が変動する挙動が望ましい。また、空調機を起動してから一定時間を経過すると、熱平衡により室温が定常的になる。学習モデルの予測で、その挙動を再現したい。具体的には、1時間早く暖房を起動すると、予測室温も1時間早く立ち上がり、空調機を起動してから4時間経過すると、予測室温が、空調機を1時間早く起動していない場合の室温、すなわち室温真値に収束する挙動である。空調機の起動後、予測室温が室温真値に収束する速さは、空調設定値の寄与度に依存しており、第2実施形態の例では寄与度評価に依存する。空調設定値が想定通りに室温の予測に寄与していることを確認するために、元のデータから空調設定値を1時間前にシフトした場合の予測室温の挙動を観察する。 Here, a method for adjusting W2 will be described using a specific example similar to that of the second embodiment. As a premise, it is desirable that the room temperature fluctuates as predicted by the learning model in accordance with the air conditioning settings. Further, after a certain period of time has passed since the air conditioner was started, the room temperature becomes steady due to thermal equilibrium. I want to reproduce that behavior in the prediction of the learning model. Specifically, if the heating is started one hour earlier, the predicted room temperature will also rise one hour earlier. , that is, the behavior converges to the room temperature true value. After the air conditioner is started, the speed at which the predicted room temperature converges to the room temperature true value depends on the contribution of the air conditioning set value, and in the example of the second embodiment, depends on the contribution evaluation. In order to confirm that the air-conditioning set value contributes to room temperature prediction as expected, the behavior of the predicted room temperature is observed when the air-conditioning set value is shifted one hour earlier from the original data.
 上記の前提の下でのW2の調整の手順は、以下のとおりである。まず、図18に示すように、W2=1.0の場合に、モデル評価関数を最大化する学習パターン3を選択した場合の予測結果を図19に示す。なお、図19及び後述する図20において、temperatureは室温真値、shifted_predictは空調設定値を1時間前にシフトした場合の予測室温である。また、air control temperatureは空調設定値又は空調設定値差分、Shifted air control temperatureは1時間前にシフトした空調設定値又は空調設定値差分である。 The procedure for adjusting W2 under the above assumptions is as follows. First, as shown in FIG. 18, FIG. 19 shows a prediction result when learning pattern 3 that maximizes the model evaluation function is selected when W2=1.0. Note that in FIG. 19 and FIG. 20 described later, temperature is the room temperature true value, and shifted_predict is the predicted room temperature when the air conditioning set value is shifted one hour earlier. Also, the air control temperature is the air conditioning set value or the air conditioning set value difference, and the shifted air control temperature is the air conditioning set value shifted one hour earlier or the air conditioning set value difference.
 学習パターン3の学習モデルは最も精度が高いが、7時頃に空調機を起動しても10時頃には予測室温が室温真値に収束してしまっており(図19中の破線の丸で囲んだ部分)、理想の挙動とずれている。この場合、学習モデルの予測に対する、空調設定値の寄与度が足りないと考えられるため、W2=1.5に増大して、もう一度学習モデルを選択する。 The learning model of learning pattern 3 has the highest accuracy, but even if the air conditioner is started at around 7:00, the predicted room temperature converges to the true room temperature at around 10:00 (broken line circle in FIG. 19). ), deviating from the ideal behavior. In this case, it is considered that the degree of contribution of the air conditioning setting value to the prediction of the learning model is insufficient, so W2 is increased to 1.5 and the learning model is selected again.
 図18に示すように、W2=1.5の場合に、モデル評価関数を最大化する学習パターン1を選択した場合の予測結果を図20に示す。この学習モデルは、精度は学習パターン3の学習モデルに比べてやや低下するが、7時頃に空調機を起動した後、11時頃に予測室温が室温真値に収束しており(図20中の破線の丸で囲んだ部分)、理想の挙動に近い。したがって、空調設定値の寄与度は十分と考え、W2=1.5で選択された学習モデルを採用する。なお、予測室温が室温真値に収束する時刻が12時など遅い場合は、寄与度が高過ぎると考え、W2を低下させて、もう一度学習モデルの選択を行うことになる。 As shown in FIG. 18, when W2=1.5, FIG. 20 shows the prediction results when learning pattern 1 that maximizes the model evaluation function is selected. The accuracy of this learning model is slightly lower than that of the learning model of learning pattern 3, but after starting the air conditioner at around 7:00, the predicted room temperature converges to the true room temperature at around 11:00 (Fig. 20 The part circled by the dashed line in the middle) is close to the ideal behavior. Therefore, the contribution of the air conditioning set value is considered sufficient, and the learning model selected with W2=1.5 is adopted. If the time at which the predicted room temperature converges to the room temperature true value is late, such as 12:00, the degree of contribution is considered too high, and W2 is lowered to select the learning model again.
<変形例>
 第2実施形態では、室温や空調設定値等の時系列データと、LightGBM等の決定木モデルによる回帰問題とを取り扱う場合について説明したが、開示の技術は、他の種類のデータや問題に対しても適用可能である。以下、各変形例について、主に第2実施形態と異なる点を説明する。
<Modification>
In the second embodiment, the case of handling time-series data such as room temperature and air conditioning set values and regression problems by decision tree models such as LightGBM has been described, but the disclosed technology is applicable to other types of data and problems. is also applicable. In the following, each modified example will be described mainly on the differences from the second embodiment.
 1つ目の変形例として、深層学習モデル及び株取引の時系列データを用いた、株価予測の回帰問題が挙げられる。この問題では、ある銘柄の株取引に関するデータを基に、将来の「現在価格」を目的変数として回帰する。材料データのデータ識別子としては、「現在価格」、「最高買価」、「最低売価」、「最高売価格数」、「最高買価格数」、「買い注文総数」、「売り注文総数」等が用いられる。ベースモデル識別子は、例えば、LSTM(Long Short-Term Memory、参考文献4)、及びQRNN(Quasi-Recurrent Neural Networks、参考文献5)の2種類から選択する場合が考えられる。ハイパーパラメータは、ベースモデル識別子の層に関する隠れ層ノード数、ステップ数、バッチサイズ、ドロップアウト率、及び層数、全結合層に関するノード数及び総数、活性化関数層に関するノード数及び活性化関数、並びに、最適化関数である。また、銘柄によって取引に関するデータの大小が大きく異なるため、学習データ構築方法の計算式において、全ての特徴識別子に対して正規化処理を追加してもよい。また、評価用データセット作成部において、学習データの説明変数が[データ数×(特徴量数×ステップ数)]の2次元行列になるが、これを[データ数×ステップ数×特徴量数]の3次元行列に変換する処理を加える。 The first modification is a stock price prediction regression problem using a deep learning model and stock trading time series data. In this problem, based on the stock trading data of a certain stock, the future "current price" is used as the objective variable. Data identifiers for material data include "current price", "maximum purchase price", "minimum selling price", "maximum selling price number", "maximum buying price number", "total number of buy orders", "total number of sell orders", etc. Used. The base model identifier may be selected from two types, for example, LSTM (Long Short-Term Memory, Reference 4) and QRNN (Quasi-Recurrent Neural Networks, Reference 5). The hyperparameters are the number of hidden layer nodes, the number of steps, the batch size, the dropout rate, and the number of layers for the layer of the base model identifier, the number and total number of nodes for the fully connected layer, the activation function, the number of nodes and the activation function for the layer, and an optimization function. In addition, since the size of transaction-related data varies greatly depending on the brand, normalization processing may be added to all feature identifiers in the calculation formula of the learning data construction method. Also, in the evaluation data set creation unit, the explanatory variables of the learning data become a two-dimensional matrix of [number of data x (number of features x number of steps)], which is set to [number of data x number of steps x number of features] Add processing to convert to a 3D matrix of
 また、2つ目の変形例として、機械学習モデル及び会員情報の時系列データを用いた、会員制有料サービス加入状態の分類問題が挙げられる。この問題では、ある会員制有料のサービスについて、顧客の利用履歴等の時系列データを基に、将来の「サービスの加入状態(加入中又は退会済み)」を予測する。材料データのデータ識別子としては、「顧客ID」、「性別」、「サービス加入日」、「サービス退会日(退会していない人はNan値)」、「その日のサービス利用時間」、「サービス加入状態」等が用いられる。時系列データのインデックスは、顧客IDが異なる場合は同じインデックスが重複し得る。また、学習データ構築方法において、新しい特徴識別子として、「当月のサービス利用日数」を作成してもよい。この特徴識別子についての計算式は、「顧客ID」毎にデータを分割した上で、時系列データのインデックスの年月でデータをグルーピングし、「その日のサービス利用時間」が0以上のデータ数を集計するものとしてよい。また、「サービス加入日」の計算式には、年及び月を日に換算する処理を加えてもよい。また、「サービス退会日」のNan値は-1に変換する処理を加えてもよい。「顧客ID」及び「性別」はカテゴリ変数のため、これらの計算式では、ラベルエンコーディングを行うように規定してもよい。評価用データセット作成部の系列パラメータを用いた系列カラム作成においては、「顧客ID」毎にデータを分割してから処理を行う。 Also, as a second modification, there is a problem of classifying subscription status of paid membership services using a machine learning model and time-series data of member information. In this problem, the future "service subscription status (subscribed or unsubscribed)" is predicted based on time-series data such as the customer's usage history for a certain fee-based membership service. Data identifiers of material data include "customer ID", "sex", "service subscription date", "service withdrawal date (Nan value for those who have not withdrawn)", "service usage time of the day", "service subscription state” etc. are used. The indexes of the time-series data may overlap with the same index if the customer IDs are different. In addition, in the learning data constructing method, as a new feature identifier, "number of service usage days in the current month" may be created. The calculation formula for this feature identifier is to divide the data by "customer ID", group the data by the year and month of the index of the time-series data, and count the number of data whose "service usage time of the day" is 0 or more. It may be aggregated. Further, a process of converting the year and month into days may be added to the calculation formula for the "service subscription date". Also, a process of converting the Nan value of the "service withdrawal date" to -1 may be added. Since "customer ID" and "gender" are categorical variables, these formulas may be defined to perform label encoding. In creating series columns using series parameters in the evaluation data set creation unit, data is divided for each “customer ID” before processing.
 3つ目の変形例として、機械学習モデル及び住宅の特徴データを用いた、住宅価格の回帰問題が挙げられる。この問題では、住宅の様々な情報から、その住宅の「価格」を回帰する。材料データのデータ識別子としては、「住宅種類(マンション、一軒家等)」、「都道府県」、「市町村」、「最寄り駅までの徒歩分数」、「築年数」、「間取り(1K、2LDK)等」、「専有面積」、「改装の有無」、「価格」等が用いられる。また、学習データ構築方法の計算式において、「住宅種類」、「都道府県」、「市町村」、「間取り」、「改装の有無」等の、文字を含むカテゴリ変数は、ラベルエンコーディングを行うように規定してもよい。この問題での材料データは、時系列データではないため、学習データ構築方法において系列パラメータを規定する必要はなく、系列カラムを作成する処理は行われない。 A third modification is the regression problem of house prices using a machine learning model and house feature data. In this problem, the "price" of the house is regressed from various information of the house. Data identifiers for material data include "housing type (condominium, detached house, etc.)", "prefecture", "municipalities", "minutes on foot to nearest station", "building age", "floor layout (1K, 2LDK), etc. ”, “exclusive area”, “whether renovation”, “price”, etc. are used. In addition, in the calculation formula of the learning data construction method, categorical variables including characters such as "housing type", "prefecture", "city", "floor plan", "renovation", etc. may be specified. Since the material data in this problem is not time-series data, there is no need to define series parameters in the learning data construction method, and processing to create series columns is not performed.
 4つ目の変形例として、機械学習モデル及びアヤメの花の特徴データを用いた、アヤメの品種の分類問題が挙げられる。この問題では、アヤメの花の様々な特徴データを基に、その「品種」を分類する。材料データのデータ識別子としては、「がく片の長さ」、「がく片の幅」、「花びらの長さ」、「花びらの幅」、「品種」等が用いられる。ベースモデル識別子は、サポートベクトルマシン(参考文献6)及びロジスティック回帰(参考文献7)の2種類から選択する場合が考えられる。ハイパーパラメータは、サポートベクトルマシンの場合、カーネル種類、正則化方法、評価関数、双対問題を解くか否か、アルゴリズム終了条件、ソフトマージンの厳しさ等である。ロジスティック回帰の場合、正則化方法、正則化の強さ等である。また、学習データ構築方法において、新しい特徴識別子として、計算式(「がく片の長さ」×「がく片の幅」)で計算される「がく片情報」、及び計算式(「花びらの長さ」×「花びらの幅」)で計算される「花びら情報」を追加してもよい。学習データ構築方法の計算式において、「品種」はカテゴリ変数のため、計算式でラベルエンコーディングを行うように規定してもよい。この問題での材料データは、時系列データではないため、学習データ構築方法において系列パラメータを規定する必要はなく、系列カラムを作成する処理は行われない。 A fourth variation is the problem of classifying iris varieties using a machine learning model and iris flower feature data. In this problem, we classify the 'varieties' of iris flowers based on various characteristic data. "Sepal length", "sepal width", "petal length", "petal width", "cultivar" and the like are used as data identifiers of the material data. The base model identifier may be selected from two types: support vector machine (reference 6) and logistic regression (reference 7). In the case of a support vector machine, the hyperparameters include kernel type, regularization method, evaluation function, whether to solve dual problems, algorithm termination conditions, severity of soft margins, and the like. For logistic regression, it is the regularization method, the strength of the regularization, and so on. In addition, in the learning data construction method, as new feature identifiers, "sepal information" calculated by a calculation formula ("sepal length" x "sepal width") and a calculation formula ("petal length ”דWidth of petal”). In the calculation formula of the learning data constructing method, since "cultivar" is a categorical variable, it may be specified to perform label encoding in the calculation formula. Since the material data in this problem is not time-series data, there is no need to define series parameters in the learning data construction method, and processing to create series columns is not performed.
参考文献4:S. Hochreiter, J. Schmidhuber, "Long short-term memory", Neural Computation 9 (8), pp. 1735-1780, 1997.
参考文献5:J. Bradbury, et al, "Quasi-Recurrent Neural Networks", ICLP, 2016.
参考文献6:Ioannis Tsochantaridis, Thorsten Joachims, Thomas Hofmann, Yasemin Altun, "Large Margin Methods for Structured and Interdependent Output Variables", The Journal of Machine Learning Research 6 (9), pp. 1453-1484, 2005.
参考文献7:D. R. Cox, "The regression analysis of binary sequences (with discussion)", Journal of the Royal Statistical Society, Series B (Methodological), Vol. 20, No. 2, pp. 215-242, 1958. 
Reference 4: S. Hochreiter, J. Schmidhuber, "Long short-term memory", Neural Computation 9 (8), pp. 1735-1780, 1997.
Reference 5: J. Bradbury, et al, "Quasi-Recurrent Neural Networks", ICLP, 2016.
Reference 6: Ioannis Tsochantaridis, Thorsten Joachims, Thomas Hofmann, Yasemin Altun, "Large Margin Methods for Structured and Interdependent Output Variables", The Journal of Machine Learning Research 6 (9), pp. 1453-1484, 2005.
Reference 7: D. R. Cox, "The regression analysis of binary sequences (with discussion)", Journal of the Royal Statistical Society, Series B (Methodological), Vol. 20, No. 2, pp. 215-242, 1958.
 なお、上記各実施形態でCPUがソフトウェア(プログラム)を読み込んで実行した学習モデル選択処理を、CPU以外の各種のプロセッサが実行してもよい。この場合のプロセッサとしては、FPGA(Field-Programmable Gate Array)等の製造後に回路構成を変更可能なPLD(Programmable Logic Device)、及びASIC(Application Specific Integrated Circuit)等の特定の処理を実行させるために専用に設計された回路構成を有するプロセッサである専用電気回路等が例示される。また、学習モデル選択処理を、これらの各種のプロセッサのうちの1つで実行してもよいし、同種又は異種の2つ以上のプロセッサの組み合わせ(例えば、複数のFPGA、及びCPUとFPGAとの組み合わせ等)で実行してもよい。また、これらの各種のプロセッサのハードウェア的な構造は、より具体的には、半導体素子等の回路素子を組み合わせた電気回路である。 Note that the learning model selection process executed by the CPU by reading the software (program) in each of the above embodiments may be executed by various processors other than the CPU. In this case, the processor is a PLD (Programmable Logic Device) whose circuit configuration can be changed after manufacturing, such as an FPGA (Field-Programmable Gate Array), and an ASIC (Application Specific Integrated Circuit) to execute specific processing. A dedicated electric circuit or the like, which is a processor having a specially designed circuit configuration, is exemplified. In addition, the learning model selection process may be executed by one of these various processors, or a combination of two or more processors of the same or different type (for example, multiple FPGAs and a combination of a CPU and an FPGA). combination, etc.). More specifically, the hardware structure of these various processors is an electric circuit in which circuit elements such as semiconductor elements are combined.
 また、上記各実施形態では、生成処理プログラムを含む学習モデル選択プログラムがROM12又はストレージ14に予め記憶(インストール)されている態様を説明したが、これに限定されない。プログラムは、CD-ROM(Compact Disk Read Only Memory)、DVD-ROM(Digital Versatile Disk Read Only Memory)、及びUSB(Universal Serial Bus)メモリ等の非一時的(non-transitory)記憶媒体に記憶された形態で提供されてもよい。また、プログラムは、ネットワークを介して外部装置からダウンロードされる形態としてもよい。 Also, in each of the above-described embodiments, the mode in which the learning model selection program including the generation processing program is pre-stored (installed) in the ROM 12 or storage 14 has been described, but the present invention is not limited to this. Programs are stored in non-transitory storage media such as CD-ROM (Compact Disk Read Only Memory), DVD-ROM (Digital Versatile Disk Read Only Memory), and USB (Universal Serial Bus) memory. may be provided in the form Alternatively, the program may be downloaded from an external device via a network.
 以上の実施形態に関し、さらに以下の付記を開示する。 Regarding the above embodiments, the following additional remarks are disclosed.
 (付記項1)
 メモリと、
 前記メモリに接続された少なくとも1つのプロセッサと、
 を含み、
 前記プロセッサは、
 複数種類の特徴量を用いて機械学習された複数の学習モデルの各々について、学習モデルによる予測結果の精度と、ユーザにより指定された少なくとも1種類の特徴量の前記予測結果に対する寄与度とを取得し、
 前記精度と前記寄与度とから、前記複数の学習モデルの中から所定の学習モデルを選択するための指標を生成する
 ように構成されている生成装置。
(Appendix 1)
memory;
at least one processor connected to the memory;
including
The processor
For each of a plurality of learning models machine-learned using a plurality of types of feature quantities, the accuracy of the prediction result by the learning model and the contribution of at least one type of feature quantity specified by the user to the prediction result are obtained. death,
A generation device configured to generate an index for selecting a predetermined learning model from among the plurality of learning models from the accuracy and the degree of contribution.
 (付記項2)
 生成処理を実行するようにコンピュータによって実行可能なプログラムを記憶した非一時的記録媒体であって、
 前記生成処理は、
 複数種類の特徴量を用いて機械学習された複数の学習モデルの各々について、学習モデルによる予測結果の精度と、ユーザにより指定された少なくとも1種類の特徴量の前記予測結果に対する寄与度とを取得し、
 前記精度と前記寄与度とから、前記複数の学習モデルの中から所定の学習モデルを選択するための指標を生成する
 ことを含む非一時的記録媒体。
(Appendix 2)
A non-transitory recording medium storing a program executable by a computer so as to execute the generating process,
The generation process includes
For each of a plurality of learning models machine-learned using a plurality of types of feature quantities, the accuracy of the prediction result by the learning model and the contribution of at least one type of feature quantity specified by the user to the prediction result are obtained. death,
A non-temporary recording medium comprising generating an index for selecting a predetermined learning model from among the plurality of learning models from the accuracy and the contribution.
10、110  学習モデル選択装置
11   CPU
12   ROM
13   RAM
14   ストレージ
15   入力部
16   表示部
17   通信I/F
19   バス
21、121  材料データ収集部
22、122  材料データ保存部
23、123  学習パターン送信部
24、124  評価用データセット作成部
25、125  検証用データ作成部
26、126  学習モデル作成部
27、127  評価用データセット保存部
28、128  学習モデル評価部
29、129  取得部
30、130  生成部
31、131  選択部
32、132  選択学習モデル保存部
201 BEMS
202 人流検知センサ
10, 110 learning model selection device 11 CPU
12 ROMs
13 RAM
14 storage 15 input unit 16 display unit 17 communication I/F
19 buses 21, 121 material data collection units 22, 122 material data storage units 23, 123 learning pattern transmission units 24, 124 evaluation data set creation units 25, 125 verification data creation units 26, 126 learning model creation units 27, 127 Evaluation data set storage units 28 and 128 Learning model evaluation units 29 and 129 Acquisition units 30 and 130 Generation units 31 and 131 Selection units 32 and 132 Selected learning model storage unit 201 BEMS
202 people flow detection sensor

Claims (8)

  1.  複数種類の特徴量を用いて機械学習された複数の学習モデルの中から所定の学習モデルを選択するための指標を生成する生成装置であって、
     前記複数の学習モデルの各々について、学習モデルによる予測結果の精度と、ユーザにより指定された少なくとも1種類の特徴量の前記予測結果に対する寄与度とを取得する取得部と、
     前記精度と前記寄与度とから前記指標を生成する生成部と、
     を含む生成装置。
    A generation device for generating an index for selecting a predetermined learning model from among a plurality of learning models machine-learned using a plurality of types of feature quantities,
    an acquisition unit that acquires, for each of the plurality of learning models, the accuracy of a prediction result by the learning model and the degree of contribution of at least one type of feature specified by a user to the prediction result;
    a generation unit that generates the index from the accuracy and the contribution;
    generator, including
  2.  前記生成部は、ユーザにより指定された重みを付加した、前記特徴量の種類毎の寄与度を用いて前記指標を生成する請求項1に記載の生成装置。 The generation device according to claim 1, wherein the generation unit generates the index using the degree of contribution for each type of the feature amount to which a weight specified by the user is added.
  3.  前記生成部は、大きさの尺度を一致させた、前記特徴量の種類毎の寄与度を用いて前記指標を生成する請求項2に記載の生成装置。 3. The generation device according to claim 2, wherein the generation unit generates the index using the degree of contribution for each type of the feature amount with a scale of magnitude matched.
  4.  前記生成部は、前記精度の大きさと前記寄与度の大きさとの尺度を一致させて前記指標を生成する請求項1~請求項3のいずれか1項に記載の生成装置。 The generation device according to any one of claims 1 to 3, wherein the generation unit generates the index by matching the scale of the degree of accuracy and the degree of contribution.
  5.  前記生成部は、前記精度及び前記寄与度の少なくとも一方に重みを付加して前記指標を生成する請求項1~請求項4のいずれか1項に記載の生成装置。 The generation device according to any one of claims 1 to 4, wherein the generation unit adds weight to at least one of the accuracy and the degree of contribution to generate the index.
  6.  前記学習モデルは、空調利用部の温度最適化を目標として、空調制御器の温度設定の最適制御方法の算出を強化学習で行う場合における、強化学習エージェントのアクションである空調機の温度設定に応じて温度の変化を予測する環境モデルであり、
     前記特徴量は、前記空調利用部の温度及び前記空調機の温度設定値を含む空調制御に関する特徴量である
     請求項1~請求項5のいずれか1項に記載の生成装置。
    The learning model aims at optimizing the temperature of the air-conditioning unit and uses reinforcement learning to calculate the optimum control method for the temperature setting of the air-conditioning controller. is an environmental model that predicts changes in temperature using
    The generation device according to any one of claims 1 to 5, wherein the feature amount is a feature amount related to air conditioning control including the temperature of the air conditioning use unit and the temperature setting value of the air conditioner.
  7.  複数種類の特徴量を用いて機械学習された複数の学習モデルの中から所定の学習モデルを選択するための指標を生成する生成方法であって、
     取得部が、前記複数の学習モデルの各々について、学習モデルによる予測結果の精度と、ユーザにより指定された少なくとも1種類の特徴量の前記予測結果に対する寄与度とを取得し、
     生成部が、前記精度と前記寄与度とから前記指標を生成する
     生成方法。
    A generation method for generating an index for selecting a predetermined learning model from among a plurality of learning models machine-learned using a plurality of types of feature quantities,
    an acquisition unit acquiring, for each of the plurality of learning models, the accuracy of prediction results by the learning models and the contribution of at least one type of feature specified by a user to the prediction results;
    A generation method, wherein a generation unit generates the index from the accuracy and the degree of contribution.
  8.  複数種類の特徴量を用いて機械学習された複数の学習モデルの中から所定の学習モデルを選択するための指標を生成する生成プログラムであって、
     コンピュータを、
     前記複数の学習モデルの各々について、学習モデルによる予測結果の精度と、ユーザにより指定された少なくとも1種類の特徴量の前記予測結果に対する寄与度とを取得する取得部、及び、
     前記精度と前記寄与度とから前記指標を生成する生成部
     として機能させるための生成プログラム。
    A generation program for generating an index for selecting a predetermined learning model from among a plurality of learning models machine-learned using a plurality of types of feature quantities,
    the computer,
    an acquisition unit that acquires, for each of the plurality of learning models, the accuracy of a prediction result by the learning model and the degree of contribution of at least one type of feature specified by a user to the prediction result;
    A generation program for functioning as a generation unit that generates the index from the accuracy and the contribution.
PCT/JP2021/003735 2021-02-02 2021-02-02 Generation device, method, and program WO2022168163A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2022579183A JPWO2022168163A1 (en) 2021-02-02 2021-02-02
PCT/JP2021/003735 WO2022168163A1 (en) 2021-02-02 2021-02-02 Generation device, method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2021/003735 WO2022168163A1 (en) 2021-02-02 2021-02-02 Generation device, method, and program

Publications (1)

Publication Number Publication Date
WO2022168163A1 true WO2022168163A1 (en) 2022-08-11

Family

ID=82741149

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/003735 WO2022168163A1 (en) 2021-02-02 2021-02-02 Generation device, method, and program

Country Status (2)

Country Link
JP (1) JPWO2022168163A1 (en)
WO (1) WO2022168163A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008123011A (en) * 2005-10-25 2008-05-29 Sony Corp Information processor, information processing method, and program
WO2017168458A1 (en) * 2016-03-28 2017-10-05 日本電気株式会社 Prediction model selection system, prediction model selection method, and prediction model selection program
US10510022B1 (en) * 2018-12-03 2019-12-17 Sas Institute Inc. Machine learning model feature contribution analytic system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008123011A (en) * 2005-10-25 2008-05-29 Sony Corp Information processor, information processing method, and program
WO2017168458A1 (en) * 2016-03-28 2017-10-05 日本電気株式会社 Prediction model selection system, prediction model selection method, and prediction model selection program
US10510022B1 (en) * 2018-12-03 2019-12-17 Sas Institute Inc. Machine learning model feature contribution analytic system

Also Published As

Publication number Publication date
JPWO2022168163A1 (en) 2022-08-11

Similar Documents

Publication Publication Date Title
Tang et al. Machine learning approach to uncovering residential energy consumption patterns based on socioeconomic and smart meter data
US11151147B1 (en) Data mining management server
Jota et al. Building load management using cluster and statistical analyses
Bata et al. Short-term water demand forecasting using hybrid supervised and unsupervised machine learning model
Rodríguez Fernández et al. Using the Big Data generated by the Smart Home to improve energy efficiency management
Tak et al. Recurrent type-1 fuzzy functions approach for time series forecasting
WO2015040789A1 (en) Product recommendation device, product recommendation method, and recording medium
JP6344396B2 (en) ORDER QUANTITY DETERMINING DEVICE, ORDER QUANTITY DETERMINING METHOD, PROGRAM, AND ORDER QUANTITY DETERMINING SYSTEM
Amalnick et al. An intelligent algorithm for final product demand forecasting in pharmaceutical units
JP6330901B2 (en) Hierarchical hidden variable model estimation device, hierarchical hidden variable model estimation method, payout amount prediction device, payout amount prediction method, and recording medium
JP6477703B2 (en) CM planning support system and sales forecast support system
Tang et al. A total sales forecasting method for a new short life-cycle product in the pre-market period based on an improved evidence theory: application to the film industry
CN117057852B (en) Internet marketing system and method based on artificial intelligence technology
Michalakopoulos et al. A machine learning-based framework for clustering residential electricity load profiles to enhance demand response programs
WO2022168163A1 (en) Generation device, method, and program
Nasios et al. Blending gradient boosted trees and neural networks for point and probabilistic forecasting of hierarchical time series
de Sá et al. Algorithm recommendation for data streams
Gao et al. Financial sequence prediction based on swarm intelligence algorithms and internet of things
KR20210125276A (en) Server and method for providing commercial analysis services by genetic algorithm
Zhang et al. Regional economic prediction model using backpropagation integrated with bayesian vector neural network in big data analytics
Nahid et al. Home occupancy classification using machine learning techniques along with feature selection
Sitepu et al. Analysis of Fuzzy C-Means and Analytical Hierarchy Process (AHP) Models Using Xie-Beni Index
Reddy et al. Classification and Clustering Methods
KR102510463B1 (en) Method for providing market analysis information
US20230385664A1 (en) A computer-implemented method for deriving a data processing and inference pipeline

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21924560

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022579183

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21924560

Country of ref document: EP

Kind code of ref document: A1