Imbalanced learning data processing device, imbalanced learning data processing program, and non-transitory recording medium having imbalanced learning data processing program recorded thereon
The iterative imbalance reduction process addresses the issue of exacerbation in training data imbalances by selectively adding and deleting data points, enhancing the learning model's ability to predict rare values.
Patent Information
- Application Number
- JP2024563892
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2044-06-17
AI Technical Summary
Existing methods for reducing imbalances in training data groups can exacerbate imbalances in other data items, leading to ineffective prediction of rare values in learning models.
An imbalance reduction processing unit that performs oversampling or undersampling on specific data items while iteratively changing the focus to different data items, adding new training data with minority values and deleting majority values to reduce imbalances across multiple data items.
Effectively reduces imbalances in training data sets, enabling learning models to accurately predict rare values by considering minority data points.
Smart Images

Figure 0007808821000001 
Figure 0007808821000002 
Figure 0007808821000003
Abstract
Description
[Technical Field]
[0001] This specification discloses an imbalance learning data processing device, an imbalance learning data processing program, and a non-transitory recording medium on which the imbalance learning data processing program is recorded. [Background technology]
[0002] A learning model is trained using a training data group consisting of multiple training data. Such a training data group may have an imbalance. An imbalance in a training data group means that the training data group (when the training data has multiple data items, the value of at least one data item in each training data) is extremely biased. For example, in a training data group in which each training data can take two values, "normal" or "abnormal," if there are 10,000 pieces of training data with a value of "normal" and only 10 pieces of training data with a value of "abnormal," the training data group can be said to be imbalanced. In this specification, a value that is more numerous in a training data group is called a "majority value," and a value that is less numerous in a training data group is called a "minority value."
[0003] A learning model trained using an imbalanced set of training data tends to output values based mainly on the training data with the majority value, without giving much consideration to the training data with the minority value in the training data set (in extreme terms, ignoring the training data with the minority value). For example, when training is performed using an imbalanced set of training data in which there are 10,000 pieces of training data with the value of the objective variable being "normal" and 10 pieces of training data with the value of the objective variable being "abnormal," the learning model is trained to output "normal" as the output data (objective variable) for almost all of the input data (explanatory variables).
[0004] In an environment where the value of the objective variable is "abnormal" only with a small probability, if a learning model trained in this way is used, the learning model will output "normal" as output data (objective variable) for almost all input data (explanatory variables), resulting in a high accuracy rate. For example, in an environment where the value of the objective variable is "abnormal" with only a 0.1% probability, a learning model that outputs "normal" as output data for almost all input data will achieve a high accuracy rate of 99.9%.
[0005] However, there may be cases where a learning model is used to detect values that appear rarely (rare values). For example, this may involve predicting whether a patient has a rare disease (objective function) based on various measurements of the patient (explanatory variables). In such cases, the trained learning model must be able to accurately predict rare values.
[0006] One way to form a learning model that can appropriately predict rare values is to train the learning model using a group of training data with little bias (in other words, a balanced group of training data). If only an imbalanced group of training data is available, the training data can be preprocessed to reduce the imbalance in the training data, and then the preprocessed training data can be used to train the training data.
[0007] Conventionally, techniques for reducing imbalance in training data groups have been proposed. For example, Non-Patent Document 1 discloses, as techniques for reducing imbalance in training data groups, oversampling, which increases the number of minority values in the training data group to the same as the number of majority values, and undersampling, which reduces the number of majority values in the training data group to the same as the number of minority values. Patent Document 1 also discloses a process in which a group of defect images as training data groups is plotted in a two-dimensional feature space according to their features, multiple defect images having similar features are grouped together to form clusters, and when an imbalance occurs in the number of defect images included in each cluster, defect images are supplemented (oversampling) to clusters formed from a small number of defect images. Patent Document 2 also discloses a process in which multiple clusters are formed in a training data group, the rarity of each cluster is calculated, and oversampling is performed on clusters whose rarity exceeds the average value. [Prior art documents] [Patent documents]
[0008] [Patent Document 1] Japanese Patent Application Laid-Open No. 2014-178229 [Patent Document 2] Japanese Patent Publication No. 2023-035089 [Non-patent literature]
[0009] [Non-Patent Document 1] Masahiko Isshiki, Digital Advantage, "What is Imbalanced Data?", @IT, https: / / atmarkit.itmedia.co.jp / ait / articles / 2208 / 31 / news039.html Summary of the Invention [Problem to be solved by the invention]
[0010] Incidentally, there are cases where training data has multiple data items. Furthermore, there are cases where an imbalance occurs in the values of at least some of the multiple data items. In such cases, increasing the amount of training data having a minority value as the value of the data item causing the imbalance (oversampling) or decreasing the amount of training data having a majority value as the value of the data item causing the imbalance (undersampling) may result in an imbalance occurring in the values of other data items, or the imbalance may be exacerbated.
[0011] This will be explained in detail with reference to FIGS. 9 and 10. For simplicity, FIG. 9 shows only the values of data items X1 and X2 of a training data group LDG consisting of eight training data LDs. Note that data items X1 and X2 may be explanatory variables or response variables. Here, data item X1 is a data item whose value can be either near 300 or near 10, and data item X2 is a data item whose value can be either near 500 or near 200. Looking at data item X1, there are six pieces of training data LD whose value is near 300 and two pieces of training data LD (training data LDa and LDb) whose value is near 10, which means that there is an imbalance in the values of data item X1. On the other hand, looking at data item X2, there are four pieces of training data LD whose value is near 500 and four pieces of training data LD whose value is near 200, which means that there is no imbalance in the values of data item X2.
[0012] Consider a case where the number of pieces of training data LDa and LDb having a decimal value as the value of data item X1 is increased (oversampling) in order to eliminate the imbalance in the values of data item X1. For example, consider a case where the number of pieces of training data LDa and LDb is increased by two. Then, as shown in FIG. 10 , in the training data group LDG′ after oversampling, when looking at data item X1, there are six pieces of training data LD with values around 300 and six pieces of training data LD with values around 10. This means that the imbalance in the values of data item X1 has been reduced (eliminated). However, when looking at data item X2 in the training data group LDG′ after oversampling, there are four pieces of training data LD with values around 500 and eight pieces of training data LD with values around 200. This means that the values of data item X2 are more imbalanced than in the training data group LDG before oversampling.
[0013] The example in Figure 10 is an example of a case where oversampling is performed to address the imbalance in the values of data item X1. However, even if undersampling is performed to address the imbalance in the values of data item X1, the values of data item X2 may similarly become more imbalanced than in the training data group LDG before undersampling.
[0014] The purpose of the imbalanced training data processing device disclosed in this specification is to reduce imbalances in the values of each data item of each training data when each training data included in a training data group has multiple data items. [Means for solving the problem]
[0015] The imbalance training data processing device disclosed in this specification is an imbalance training data processing device that performs processing to reduce imbalance in a training data group having a plurality of data items, and includes an imbalance reduction processing unit that performs at least one of an oversampling process in which one of the plurality of data items is a data item of interest, and new training data having a minority value that is a value with a relatively low frequency in a frequency distribution of values of the data item of interest is added to the training data group, or an undersampling process in which deletion-target training data having a majority value that is a value with a relatively high frequency in a frequency distribution of values of the data item of interest is deleted from the training data group, and the imbalance reduction processing unit repeatedly performs the imbalance reduction processing while changing the data item of interest for the plurality of data items.
[0016] The imbalance reduction processing unit may add more new training data to the training data set in the oversampling process as the degree of imbalance in the values of the data item of interest in the training data set increases.
[0017] The imbalance reduction processing unit may be configured to delete more of the deletion-target training data from the training data set in the undersampling process as the degree of imbalance in the values of the data item of interest in the training data set increases.
[0018] The imbalance reduction processing unit may perform the oversampling process by newly generating the new training data having a minority value as the value of the data item of interest, without duplicating the training data included in the training data group.
[0019] In the undersampling process, the imbalance reduction processing unit may preferentially delete the new learning data added by the oversampling process executed prior to the undersampling process, over the learning data included in the learning data group before the imbalance reduction process is executed.
[0020] The imbalance reduction processing unit may divide the learning data group into training data for learning a learning model and test data for evaluating the learned learning model, and perform the imbalance reduction processing separately for each of the training data and the test data.
[0021] The imbalance reduction processing unit may divide the learning data group into training data for learning a learning model and test data for evaluating the learned learning model, and may not perform the imbalance reduction processing on the test data.
[0022] The imbalance reduction processing unit may divide the learning data group into the training data and the test data such that the test data includes learning data having the minority value.
[0023] The device may further include a learning processing unit that executes a learning process to train a learning model, and that, when instructed by a user to perform the learning process using the learning data group on which the imbalance reduction process has been performed, performs the learning process using the learning data group on which the imbalance reduction process has been performed, and, when instructed by a user to perform the learning process using the learning data group on which the imbalance reduction process has not been performed, performs the learning process using the learning data group on which the imbalance reduction process has not been performed.
[0024] Furthermore, an imbalanced training data processing program disclosed in this specification is an imbalanced training data processing program for performing processing to reduce imbalance in a training data group having a plurality of data items, and causes a computer to function as an imbalance reduction processing unit that performs at least one of an oversampling process in which one of the plurality of data items is a data item of interest, and new training data having a minority value that is a value with a relatively low frequency in a frequency distribution of values of the data item of interest is added to the training data group, or an undersampling process in which deletion-target training data having a majority value that is a value with a relatively high frequency in a frequency distribution of values of the data item of interest is deleted from the training data group, and the imbalance reduction processing unit repeatedly performs the imbalance reduction processing while changing the data item of interest for the plurality of data items.
[0025] Furthermore, a recording medium disclosed in this specification is a non-transitory computer-readable recording medium having recorded thereon an imbalance training data processing program for performing processing to reduce imbalance in a training data set having a plurality of data items, the imbalance reduction processing causing a computer to function as an imbalance reduction processing unit that performs at least one of an oversampling process in which one of the plurality of data items is a data item of interest, and new training data having a minority value that is a value with a relatively low frequency in a frequency distribution of values of the data item of interest is added to the training data set, or an undersampling process in which deletion-target training data having a majority value that is a value with a relatively high frequency in a frequency distribution of values of the data item of interest is deleted from the training data set, and the imbalance reduction processing unit repeatedly performs the imbalance reduction processing while changing the data item of interest for the plurality of data items. [Effects of the Invention]
[0026] According to the imbalanced training data processing device disclosed in the present specification, when each training data included in a training data group has multiple data items, it is possible to reduce imbalance in the values of the multiple data items that each training data has. [Brief explanation of the drawings]
[0027] [Figure 1] 1 is a schematic diagram illustrating the configuration of an imbalance learning data processing device according to an embodiment of the present invention. [Figure 2] FIG. 10 is a conceptual diagram illustrating an example of a training data group. [Figure 3] 10 is an example of a histogram of values of data items that are the targets of calculation of the degree of imbalance. [Figure 4] FIG. 10 is a conceptual diagram illustrating an example of a training data group after a first imbalance reduction process. [Figure 5] FIG. 10 is a conceptual diagram illustrating an example of a training data group after a second imbalance reduction process. [Figure 6] 10 is a flowchart showing the flow of processing of the imbalance learning data processing device according to the present embodiment. [Figure 7] FIG. 10 is a diagram showing prediction results of a Gaussian regression model trained using an imbalanced training data set. [Figure 8] FIG. 10 is a diagram showing prediction results of a Gaussian regression model trained using a training data set on which the iterative imbalance reduction process according to the present embodiment has been performed. [Figure 9] FIG. 10 is a conceptual diagram illustrating an example of a training data group. [Figure 10] FIG. 1 is a conceptual diagram illustrating an example of a group of training data after conventional oversampling processing. DETAILED DESCRIPTION OF THE INVENTION
[0028] FIG. 1 is a schematic diagram of the configuration of an imbalance training data processing device 10 according to this embodiment. The imbalance training data processing device 10 according to this embodiment is configured by a server computer. However, the imbalance training data processing device 10 may be any device as long as it can perform the functions described below. For example, the imbalance training data processing device 10 may be a personal computer or a mobile terminal such as a smartphone. Furthermore, the functions described below may be performed by multiple devices working together. In this case, the multiple devices correspond to the imbalance training data processing device 10.
[0029] The communication interface 12 is configured by, for example, a network adapter. The communication interface 12 enables the imbalance training data processing device 10 to communicate with other devices (e.g., a user terminal used by a user) and to receive various information from other devices and transmit various information to other devices. Note that the communication interface 12 is not an essential component of the imbalance training data processing device 10.
[0030] The memory 14 includes, for example, a hard disk drive (HDD), a solid state drive (SSD), a read-only memory (ROM), or a random access memory (RAM). The memory 14 may be provided separately from the processor 22 (described later), or at least a portion of the memory 14 may be provided within the processor 22. The memory 14 stores an imbalance training data processing program for operating each unit of the imbalance training data processing device 10. The imbalance training data processing program can also be stored in a computer-readable non-transitory storage medium such as a USB (Universal Serial Bus) memory or an SD card. The imbalance training data processing device 10 can read and execute the imbalance training data processing program from such a storage medium.
[0031] As shown in FIG. 1, the memory 14 stores a learning model 16 and a learning data group 20 consisting of a plurality of learning data 18.
[0032] The learning model 16 is a model that predicts and outputs output data according to input data. The learning model 16 can also be said to be a function that represents the relationship between input data and output data corresponding to the input data. Examples of the learning model 16 include, but are not limited to, a neural network, a Bayesian analysis model, a Gaussian regression model, or a random forest model.
[0033] The learning model 16 is trained using the training data group 20, and is thereby able to predict and output output data corresponding to input data with high accuracy. Specifically, input data (explanatory variables) from the training data 18 constituting the training data group 20 is input to the learning model 16. The learning model 16 predicts and outputs output data (objective variables) corresponding to the input data. Then, the parameters of the learning model 16 (for example, if the learning model 16 is a neural network, the weights and biases of each neuron) are adjusted so that the difference between the teacher data (objective variables) from the training data 18 and the output data of the learning model 16 becomes small. By repeating this process, the learning model 16 is trained, and the trained learning model 16 becomes able to output output data corresponding to input data with high accuracy.
[0034] FIG. 2 is a conceptual diagram showing an example of a training data group 20. Each training data 18 included in the training data group 20 according to this embodiment has a plurality of data items. In the example of FIG. 2, each training data 18 has a data item X1, a data item X2, a data item X3, and so on. The plurality of data items included in each training data 18 include explanatory variables (input data input to the learning model 16) and objective variables (teaching data corresponding to the output data of the learning model 16). Note that the objective variable is not essential, and each training data 18 does not necessarily need to include an objective variable.
[0035] In this embodiment, an imbalance occurs in the training data set 20. Specifically, an imbalance occurs in the values of at least some of the data items included in each training data 18.
[0036] Returning to FIG. 1, the processor 22 includes at least one of a general-purpose processing device (e.g., a CPU (Central Processing Unit)) and a dedicated processing device (e.g., an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or a programmable logic device). The processor 22 may not be a single processing device, but may be configured by the cooperation of multiple processing devices located in physically separate locations. As shown in FIG. 1, the processor 22 performs the functions of an imbalance reduction processing unit 24, a learning processing unit 26, and a data processing unit 28 according to an imbalance learning data processing program stored in the memory 14.
[0037] The imbalance reduction processing unit 24 performs processing to reduce imbalance in the imbalanced training data set 20. In particular, in this embodiment, the imbalance reduction processing unit 24 reduces imbalance in the values of multiple data items that each training data 18 has. Below, details of the processing performed by the imbalance reduction processing unit 24 will be described with reference to FIGS. 3 to 5, using as an example a case where the training data set 20 has the content shown in FIG. 2.
[0038] First, the imbalance reduction processing unit 24 selects one of the multiple data items included in each of the learning data 18 as a data item of interest. In this embodiment, the imbalance reduction processing unit 24 calculates an imbalance degree, which is an index indicating the degree of imbalance in the values of the data items included in each of the learning data 18, and selects a data item of interest based on the imbalance degree.
[0039] An example of a method for calculating the degree of imbalance of the values of each data item is as follows. Fig. 3 is an example of a histogram of the values of the data item that is the subject of the imbalance degree calculation. The imbalance reduction processing unit 24 divides a domain D, which is the range that the values of the data item can take, into a plurality of data ranges R. The data width of each data range R is the same. In the example of Fig. 3, the domain D is divided into five data ranges Ra to Re, but the number of data ranges R into which the domain D is divided may be determined appropriately.
[0040] The imbalance reduction processing unit 24 calculates the frequency included in each data range R, and calculates the degree of imbalance in the value of that data item using the ratio (Nmax / Nmin) of the maximum frequency Nmax to the minimum frequency Nmin among the frequencies in each data range R. The greater the degree of imbalance, the greater the imbalance in the values of that data range. For example, in the example of FIG. 3, the frequency of data range Rc is Nmax and the frequency of data range Re is Nmin, so the degree of imbalance in that data item is calculated as (frequency of data range Rc / frequency of data range Re).
[0041] The imbalance reduction processing unit 24 may calculate the degree of imbalance between the values of the data items using a method other than the above.
[0042] The imbalance reduction processing unit 24 selects as a data item of interest a data item whose calculated imbalance degree is equal to or greater than a predetermined first imbalance degree threshold. That is, the imbalance reduction processing unit 24 selects as a data item of interest a data item whose value is causing an imbalance. If there are multiple data items whose calculated imbalance degrees are equal to or greater than the first imbalance degree threshold, the imbalance reduction processing unit 24 selects as a data item of interest the data item with the largest imbalance degree. The data item of interest may be an explanatory variable or a target variable.
[0043] Next, the imbalance reduction processing unit 24 executes an imbalance reduction process to reduce the imbalance in the values of the selected data item of interest. The imbalance reduction process may be at least one of an oversampling process and an undersampling process. The oversampling process is a process of adding new training data having a minority value, which is a value with a relatively low frequency in the frequency distribution of the values of the data item of interest, to the training data set 20. The undersampling process is a process of deleting, from the training data set 20, training data to be deleted having a majority value, which is a value with a relatively high frequency in the frequency distribution of the values of the data item of interest.
[0044] As will be described in detail later, the imbalance reduction process is repeatedly performed. In this specification, the original training data group 20 before the imbalance reduction process is performed is referred to as training data group 20o. The training data group 20 after the first imbalance reduction process is performed is referred to as training data group 20-1, and the training data group 20 after the second imbalance reduction process is performed is referred to as training data group 20-2. When no particular distinction is made between the training data groups 20o, 20-1, and 20-2, they are simply referred to as training data group 20. Furthermore, in this specification, the training data 18 originally included in the training data group 20o is referred to as original training data 18A, and the training data 18 added by the imbalance reduction process (oversampling process) is referred to as new training data 18B.
[0045] 2, and data item X2 is selected as the data item of interest. Furthermore, the value "45" of data item X2 in the original training data 18Aa is assumed to be a minority value in the frequency distribution of the values of data item X2. In this situation, a case where oversampling processing is performed as the first imbalance reduction processing will be described.
[0046] As will be described below, the imbalance reduction processing unit 24 performs the imbalance reduction processing on the training data set 20o, but it is preferable that the imbalance reduction processing unit 24 leave the original training data set 20o before performing the imbalance reduction processing in the memory 14.
[0047] Fig. 4 is a diagram showing a training data set 20-1 after a first imbalance reduction process (oversampling process in this case) has been performed on the training data set 20o shown in Fig. 2. As can be seen from a comparison of Fig. 2 and Fig. 4, the imbalance reduction processor 24 performs an oversampling process, which is the first imbalance reduction process, and adds new training data 18B having a minority value in data item X2 to the training data set 20.
[0048] For example, the imbalance reduction processor 24 performs oversampling processing to add new training data 18Ba obtained by replicating the original training data 18Aa to the training data set 20o. That is, the new training data 18Ba has the same values for all data items as the original training data 18Aa.
[0049] Alternatively, the imbalance reduction processor 24 may perform oversampling processing by generating new training data 18B (e.g., new training data 18Bb and 18Bc in FIG. 4) having a decimal value as the value of the data item of interest, without duplicating the original training data 18Aa, and adding the generated new training data to the training data set 20o. For example, the new training data 18Bb has the same value as the original training data 18Aa for the data item X2, which is the data item of interest, but the values of the other data items (data item X3 in the example of FIG. 4) are different from those of the original training data 18Aa. Furthermore, the new training data 18Bc has different values for the data items of interest from those of the original training data 18Aa. In this way, the values of the data items of interest in the new training data 18B do not necessarily have to be identical to those of the original training data 18Aa.
[0050] However, if the value of a certain data item in new training data 18B is significantly different from the value of that data item in original training data 18Aa, the new training data 18B may not be appropriate training data 18. Therefore, it is preferable that the value of a certain data item in new training data 18B be close to the value of that data item in original training data 18Aa. For example, it is preferable that the value of a certain data item in new training data 18Bc be a value included in the same data range R (see FIG. 3) as the value of that data item in original training data 18Aa.
[0051] The new learning data 18Bb and 18Bc can be generated, for example, by inputting original learning data 18Aa having a decimal value as the value of the data item of interest and information indicating the data item of interest into a learning model other than the learning model 16, such as a generation AI (Artificial Intelligence).
[0052] 4 shows the training data set 20-1 after oversampling has been performed as the first imbalance reduction process, but undersampling may also be performed as the first imbalance reduction process. For example, in the training data set 20o shown in FIG. 2, the value "88" of data item X2, which is a data item of interest in the original training data 18Ab, is assumed to be the majority value in the frequency distribution of the values of data item X2. In this case, the imbalance reduction processor 24 may delete the original training data 18Ab, which is the training data to be deleted, from the training data set 20o as the first imbalance reduction process.
[0053] As described above, the imbalance reduction processor 24 may add a plurality of new training data 18B in the oversampling process. In this case, the greater the imbalance in the values of the data item of interest in the training data set 20o, the more new training data 18B the imbalance reduction processor 24 may add to the training data set 20o in the oversampling process.
[0054] Similarly, the imbalance reduction processor 24 may delete multiple pieces of deletion-target learning data in the undersampling process. In this case, the greater the degree of imbalance in the values of the data item of interest in the learning data set 20o, the more deletion-target learning data the imbalance reduction processor 24 may delete from the learning data set 20o in the undersampling process.
[0055] After the first imbalance reduction process, the imbalance reduction processor 24 changes the data item of interest among the multiple data items included in each of the learning data 18. In other words, the imbalance reduction processor 24 selects a data item other than the data item of interest related to the previous imbalance reduction process (data item X2 in the above example) as a new data item of interest.
[0056] The method for selecting a new data item of interest may be the same as the method for selecting a data item of interest the first time. That is, the imbalance reduction processing unit 24 calculates the imbalance degree for each value of a plurality of data items (excluding the previous data item of interest) included in each piece of learning data 18, and selects a new data item of interest based on the imbalance degree.
[0057] After selecting a new data item of interest, the imbalance reduction processing unit 24 executes a second imbalance reduction process to reduce the imbalance in the value of the new data item of interest. Here, it is assumed that data item X1 is selected as the new data item of interest in the training data set 20-1 shown in FIG. 4 . It is also assumed that the value "437" of data item X1 in the original training data 18Aa, the value "469" of data item X1 in the original training data 18Ac, the value "437" of data item X1 in the new training data 18Ba, the value "437" of data item X1 in the new training data 18Bb, and the value "435" of data item X1 in the new training data 18Bc are the majority values in the frequency distribution of the values of data item X1. A case where undersampling is executed as the second imbalance reduction process in this situation will be described.
[0058] Fig. 5 is a diagram showing the training data set 20-2 after a second imbalance reduction process (undersampling process in this example) has been performed on the training data set 20-1 shown in Fig. 4. As can be seen from a comparison of Fig. 4 and Fig. 5, the imbalance reduction processor 24 performs the undersampling process, which is the second imbalance reduction process, to delete the new training data 18Bb and the new training data 18Bc having the majority value in the data item X1 from the training data set 20-1.
[0059] In the undersampling process as the imbalance reduction process, the imbalance reduction processor 24 may preferentially delete new training data 18B added by an oversampling process (as an earlier imbalance reduction process) executed prior to the undersampling process, rather than the original training data 18A. For example, in the examples of FIGS. 4 and 5, the candidates for training data to be deleted in the undersampling process include original training data 18Aa, original training data 18Ac, new training data 18Ba, new training data 18Bb, and new training data 18Bc. Among them, the imbalance reduction processor 24 preferentially deletes new training data 18Ba, new training data 18Bb, and new training data 18Bc over the original training data 18Aa and original training data 18Ac in the undersampling process. This is because the original training data 18A is raw data representing the content to be learned by the learning model 16, while the new training data 18B may not necessarily be so. From this perspective, the imbalance reduction processing unit 24 may preferentially delete the new training data 18B that is newly generated without duplicating the original training data 18Aa over the new training data 18B obtained by duplicating the original training data 18Aa in the undersampling process.
[0060] After the second imbalance reduction process, the imbalance reduction processing unit 24 further changes the data item of interest among the multiple data items contained in each of the learning data 18. Here, too, the imbalance reduction processing unit 24 selects a data item other than the data item of interest related to the previous imbalance reduction process (data item X1 in the above example) as a new data item of interest. Then, the imbalance reduction processing unit 24 executes the imbalance reduction process to reduce the imbalance in the value of the newly selected data item of interest.
[0061] In this way, the imbalance reduction processor 24 repeatedly executes the imbalance reduction process while changing the data item of interest among the multiple data items of each of the training data 18 included in the training data group 20. In this specification, multiple imbalance reduction processes are collectively referred to as the repeated imbalance reduction process. In the repeated imbalance reduction process, the same data item may be selected as the data item of interest multiple times.
[0062] As described above, a single imbalance reduction process may cause imbalances in the values of data items other than the data item of interest, or may exacerbate the imbalances. However, according to the repeated imbalance reduction process of this embodiment, the imbalance reduction process is executed for multiple data items, and therefore the imbalances in the values of data items other than the data item of interest that may occur in each imbalance reduction process are gradually evened out, and it is expected that the imbalances in the values of each of the multiple data items in each of the learning data 18 will eventually be reduced.
[0063] In the oversampling process as the imbalance reduction process from the second time onwards, a number of new training data 18B different from that in the oversampling process as the imbalance reduction process up to the previous time may be added to the training data group 20. For example, as the number of times the imbalance reduction process is performed increases, a smaller number of new training data 18B may be added to the training data group 20.
[0064] Similarly, in the undersampling process as the imbalance reduction process from the second time onwards, a different number of deletion-target learning data items may be deleted from the training data set 20 than in the undersampling process as the imbalance reduction process up to the previous time. For example, as the number of imbalance reduction processes increases, a smaller number of deletion-target learning data items may be deleted from the training data set 20.
[0065] The imbalance reduction processing unit 24 stops the iterative imbalance reduction process when a predetermined iteration stop condition is satisfied. The iteration stop condition may be, for example, a condition that the imbalance degrees of all data items become less than a predetermined second imbalance threshold. The second imbalance threshold may be the same as or different from the first imbalance threshold referenced when selecting the data item of interest. By using the iteration stop condition, it is possible to obtain, through the iterative imbalance reduction process, a training data set 20 in which the imbalance degrees of all data items are less than the second imbalance threshold.
[0066] The repetition stopping condition may also be, for example, that the number of times the imbalance reduction process has been executed reaches a predetermined number, that the processing time of the repetitive imbalance reduction process reaches a predetermined time, or that the number of training data 18 included in the training data group 20 reaches a predetermined number.
[0067] The imbalance reduction processing unit 24 preferably divides the learning data group 20 into training data for training the learning model 16 and test data for evaluating the learned learning model 16, and then performs imbalance reduction processing separately for the training data and the test data. This is to prevent new learning data 18B, which is a copy of the training data, from being mixed into the test data, which would result in an unreasonably good evaluation result for the learning model 16.
[0068] The imbalance reduction processor 24 may not perform the imbalance reduction process on the test data in order to prevent the evaluation result of the learning model 16 from being unduly improved due to the test data including new learning data 18B obtained by duplicating the original learning data 18A.
[0069] When dividing the learning data group 20 into training data and test data, the imbalance reduction processor 24 may ensure that learning data having minority values is included in the test data. For example, the imbalance reduction processor 24 clusters the training data using the K-means method or the like, and extracts test data from each cluster. If, for example, learning data having 10,000 normal values and 10 abnormal values is divided into training data and test data, and the test data does not include any abnormal values, which are minority values (in other words, the test data contains only normal values), the trained learning model 16 may end up outputting only normal values.
[0070] Returning to FIG. 1 , the learning processing unit 26 trains the learning model 16 using the learning data group 20 in which imbalance has been reduced by the iterative imbalance reduction process performed by the imbalance reduction processing unit 24. Specifically, the learning processing unit 26 inputs input data (explanatory variables) from the learning data 18 constituting the learning data group 20 in which imbalance has been reduced to the learning model 16. The learning model 16 predicts and outputs output data (objective variable) corresponding to the input data. Then, the learning processing unit 26 adjusts the parameters of the learning model 16 (for example, if the learning model 16 is a neural network, the weights and biases of each neuron) so as to reduce the difference between the teacher data (objective variable) from the learning data 18 and the output data of the learning model 16. The learning processing unit 26 trains the learning model 16 by repeating the above-described learning process.
[0071] As described above, the learning model 16 trained using an imbalanced training data set 20 (e.g., the original training data set 20o) outputs output data without much consideration of minority values, and therefore cannot detect rare values. On the other hand, the learning model 16 trained using a training data set 20 in which imbalance in the values of each data item has been reduced by repeatedly performing the imbalance reduction process outputs output data with sufficient consideration of minority values, and therefore can suitably detect rare values.
[0072] The learning processing unit 26 may determine, in response to a user instruction, whether to train the learning model 16 using the learning data set 20 in which imbalance has been reduced by the iterative imbalance reduction processing performed by the imbalance reduction processing unit 24, or to train the learning model 16 using the original learning data set 20o on which the iterative imbalance reduction processing has not been performed. That is, when the user instructs the learning processing to be performed using the learning data set 20 on which the iterative imbalance reduction processing has been performed, the learning processing unit 26 may train the learning model 16 using the learning data set 20 on which the iterative imbalance reduction processing has been performed, and when the user instructs the learning processing to be performed using the original learning data set 20o on which the iterative imbalance reduction processing has not been performed, the learning processing unit 26 may train the learning model 16 using the original learning data set 20o on which the iterative imbalance reduction processing has not been performed.
[0073] When rare values are important and the learning model 16 is to be detected, it is preferable to train the learning model 16 using the training data set 20 on which the repetitive imbalance reduction process has been performed. On the other hand, there are cases where rare values are truly noise data and it is preferable to train the learning model 16 so that the rare values are ignored and output. In such cases, it is preferable to train the learning model 16 using the original training data set 20o on which the repetitive imbalance reduction process has not been performed. By allowing the user to select the training data 18 for training the learning model 16 from the training data set 20 on which the imbalance has been reduced and the original training data set 20o, the user can train the learning model 16 appropriately depending on the purpose of the learning model 16 or the environment in which the learning model 16 is used.
[0074] The data processing unit 28 inputs the input data to be processed into the learning model 16 that has been trained by the learning processing unit 26. The trained learning model 16 predicts and outputs output data corresponding to the input data. Based on the output data of the learning model 16, the data processing unit 28 obtains output data corresponding to the input data.
[0075] The above is an overview of the imbalance learning data processing device 10 according to this embodiment. The flow of processing by the imbalance learning data processing device 10 according to this embodiment will be described below with reference to the flowchart shown in FIG.
[0076] In step S10, the imbalance reduction processing unit 24 selects one of the multiple data items included in each of the training data 18 included in the training data group 20 as a data item of interest.
[0077] In step S12, the imbalance reduction processor 24 executes an imbalance reduction process (oversampling process or undersampling process) to reduce the imbalance in the values of the data item of interest selected in step S10. Note that the imbalance reduction processor 24 leaves the original training data set 20o in the memory 14 before the imbalance reduction process is executed.
[0078] In step S14, the imbalance reduction processing unit 24 determines whether a predetermined repetition stop condition has been met. If the repetition stop condition has not been met, the process returns to step S10. In step S10 again, the imbalance reduction processing unit 24 changes the data item of interest. That is, the imbalance reduction processing unit 24 selects a data item other than the data item of interest related to the previous imbalance reduction processing as the data item of interest. Thereafter, the processes of steps S12 and S14 are repeated. By repeating the processes of steps S10 to S14, the imbalance reduction processing is repeatedly executed.
[0079] In step S14, if the repetition stop condition is satisfied, the process proceeds to step S16.
[0080] In step S16, the imbalance reduction processing unit 24 stops the iterative imbalance reduction process. This results in a training data set 20 in which the imbalance in the values of each of the multiple data items in each training data set 18 has been reduced. Meanwhile, the memory 14 also stores the original training data set 20o.
[0081] In step S18, the learning processing unit 26 determines a user instruction indicating whether to use the learning data set 20 with reduced imbalance (i.e., the learning data set 20 on which the imbalance reduction process has been repeatedly performed in steps S10 to S14) or the original learning data set 20o to train the learning model 16.
[0082] If the user instructs that the training data set 20 with reduced imbalance be used, the process proceeds to step S20, where the training processing unit 26 trains the training model 16 using the training data set 20 with reduced imbalance.
[0083] If the user instructs to use the original training data group 20o, the process proceeds to step S22, where the training processing unit 26 trains the training model 16 using the original training data group 20o.
[0084] 6, the determination of the user's instruction as to whether to use the training data set 20 with reduced imbalance or the original training data set 20o (step S18) is performed after the imbalance reduction process (step S12), but the determination of the user's instruction may be performed before the imbalance reduction process. For example, the determination of the user's instruction may be performed first, and if the user instructs to use the training data set with reduced imbalance, the processes of steps S10 to S16 and step S20 may be performed.
[0085] Hereinafter, with reference to FIGS. 7 and 8, the effect of training the training model 16 using the training data set 20 on which the imbalance reduction process has been repeatedly performed will be described.
[0086] FIG. 7 is a diagram showing prediction results of a Gaussian regression model as a learning model 16, which has been trained using an imbalanced training data set 20 (e.g., the original training data set 20o). FIG. 8 is a diagram showing prediction results of a Gaussian regression model trained using a training data set 20 on which an imbalance reduction process has been repeatedly performed. In FIGS. 7 and 8, circles represent training data LD (whose values are simply represented by their positions on a two-dimensional plane), and solid lines represent prediction results of the Gaussian regression model. In FIGS. 7 and 8, multiple training data LD are distributed to show a certain trend, but one of the training data LDr deviates from the trend of the other training data LD. In other words, it is shown that the training data LDr has a minority value.
[0087] A Gaussian regression model trained using an imbalanced training data set 20 outputs output data without much consideration of minority values. Therefore, as shown in Figure 7, the Gaussian regression model almost ignores training data LDr having minority values and outputs output data that is consistent with the other training data LD. In other words, the Gaussian regression model cannot detect rare values.
[0088] On the other hand, a Gaussian regression model trained using the training data set 20 on which the imbalance reduction process has been repeatedly performed outputs output data with sufficient consideration given to minority values. Therefore, as shown in Fig. 8, the Gaussian regression model outputs output data that is in line with the training data LDr containing minority values. In other words, the Gaussian regression model can detect rare values.
[0089] The above describes an embodiment of the imbalance learning data processing device according to the present disclosure. However, the imbalance learning data processing device according to the present disclosure is not limited to the above embodiment, and various modifications are possible as long as they do not deviate from the spirit of the present disclosure. [Explanation of symbols]
[0090] 10 Imbalance learning data processing device, 12 Communication interface, 14 Memory, 16 Learning model, 18 Learning data, 20 Learning data group, 22 Processor, 24 Imbalance reduction processing unit, 26 Learning processing unit, 28 Data processing unit.
Claims
1. An imbalanced training data processing device that performs processing to reduce imbalance in a training data group having a plurality of data items, an imbalance reduction processing unit that performs at least one of an oversampling process in which one of the plurality of data items is designated as a data item of interest, and new learning data having a minority value that is a value with a relatively low frequency in a frequency distribution of values of the data item of interest is added to the learning data group, or an undersampling process in which deletion-target learning data having a majority value that is a value with a relatively high frequency in a frequency distribution of values of the data item of interest is deleted from the learning data group; Equipped with the imbalance reduction processing unit repeatedly executes the imbalance reduction processing while changing the target data item among the plurality of data items. An imbalance learning data processing device comprising:
2. the imbalance reduction processing unit adds more of the new training data to the training data group in the oversampling process as the degree of imbalance in the values of the data item of interest in the training data group increases. The imbalance learning data processing device according to claim 1 .
3. the imbalance reduction processing unit is configured to delete a larger number of the deletion-target learning data from the learning data group in the undersampling process as the degree of imbalance in the values of the data item of interest in the learning data group increases. The imbalance learning data processing device according to claim 1 .
4. the imbalance reduction processing unit, as the oversampling processing, does not duplicate the learning data included in the learning data group, but newly generates the new learning data having a minority value as the value of the data item of interest. The imbalance learning data processing device according to claim 1 .
5. the imbalance reduction processing unit, in the undersampling process, preferentially deletes the new learning data added by the oversampling process executed prior to the undersampling process over the learning data included in the learning data group before the imbalance reduction process is executed. The imbalance learning data processing device according to claim 1 .
6. the imbalance reduction processing unit divides the learning data group into training data for training a learning model and test data for evaluating the learned learning model, and performs the imbalance reduction processing separately for each of the training data and the test data. The imbalance learning data processing device according to claim 1 .
7. the imbalance reduction processing unit divides the learning data group into training data for learning a learning model and test data for evaluating the learned learning model, and does not perform the imbalance reduction processing on the test data. The imbalance learning data processing device according to claim 1 .
8. the imbalance reduction processing unit divides the learning data group into the training data and the test data such that the test data includes learning data having the minority value.
8. The imbalance learning data processing device according to claim 6 or 7.
9. a learning processing unit that executes a learning process to train a learning model, wherein, when instructed by a user to perform the learning process using the learning data group on which the imbalance reduction process has been performed, the learning processing unit performs the learning process using the learning data group on which the imbalance reduction process has been performed, and, when instructed by a user to perform the learning process using the learning data group on which the imbalance reduction process has not been performed, the learning processing unit performs the learning process using the learning data group on which the imbalance reduction process has not been performed; The imbalance learning data processing apparatus according to claim 1 , further comprising:
10. An imbalanced training data processing program for performing processing to reduce imbalance in a training data group having a plurality of data items, Computer, an imbalance reduction processing unit that performs at least one of an oversampling process in which one of the plurality of data items is designated as a data item of interest, and new learning data having a minority value that is a value with a relatively low frequency in a frequency distribution of values of the data item of interest is added to the learning data group, or an undersampling process in which deletion-target learning data having a majority value that is a value with a relatively high frequency in a frequency distribution of values of the data item of interest is deleted from the learning data group; It functions as the imbalance reduction processing unit repeatedly executes the imbalance reduction processing while changing the target data item among the plurality of data items. An imbalanced learning data processing program characterized by:
11. A computer-readable non-transitory recording medium having recorded thereon an imbalance training data processing program for performing processing to reduce imbalance in a training data group having a plurality of data items, Computer, an imbalance reduction processing unit that performs at least one of an oversampling process in which one of the plurality of data items is designated as a data item of interest, and new learning data having a minority value that is a value with a relatively low frequency in a frequency distribution of values of the data item of interest is added to the learning data group, or an undersampling process in which deletion-target learning data having a majority value that is a value with a relatively high frequency in a frequency distribution of values of the data item of interest is deleted from the learning data group; It functions as the imbalance reduction processing unit repeatedly executes the imbalance reduction processing while changing the target data item among the plurality of data items. A computer-readable non-transitory recording medium having recorded thereon an imbalance learning data processing program characterized by:
Citation Information
Patent Citations
Resampling apparatus, information processing system, resampling method, and resampling program
JP2023035089A
Teacher data creation method, image classification method and image classification device
JP2014178229A