Outlier removal method and device
By using evaluation index operations and judgment processing in machine learning, the problem of difficult outliers in the data sparse environment is solved, and the prediction accuracy of the regression model is improved.
Patent Information
- Application Number
- CN202411285084.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-09-26
- Filing Date
- 2024-09-13
- Publication Date
- 2025-03-28
AI Technical Summary
In machine learning, learning outliers contained in data will lead to a decrease in prediction accuracy of the regression model, especially when data is sparse, it is difficult to properly remove outliers.
By segmenting the learning data into training data and test data, a regression model is created that illustrates the correlation between the variable and the target variable, and using the test data and training data to calculate evaluation indicators (such as MAE, MAPE and decision coefficient R2), repeat this process to determine whether the data is outlier, and finally remove the data determined to be outlier.
Effectively remove outliers from learning data, improving the prediction accuracy of machine learning models, especially when data is sparse.
Smart Images

Figure CN119719999A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method and a device for removing outliers. Background Art
[0002] Various prediction methods using machine learning are known. For example, in the case of predicting the physical properties of unknown materials, data obtained through test manufacturing and the like is used as learning data (training data) for machine learning, the correlation between the material combination and the physical properties is learned, and the prediction is performed using a regression model obtained from the learning results.
[0003] In addition, as prior art document information related to the invention of the present application, there is Patent Document 1.
[0004] Patent Document 1: Japanese Patent Application Publication No. 2020-30738 Summary of the invention
[0005] However, when the learning data contains erroneous data or data with large errors, i.e., outliers, the prediction accuracy of the regression model obtained using the learning data will decrease. Therefore, it is desirable to remove outliers from the learning data before machine learning. However, it is difficult to properly determine which data is an outlier. In particular, when the learning data is sparse data, it is difficult to properly remove outliers.
[0006] Therefore, an object of the present invention is to provide an outlier removal method and apparatus capable of appropriately removing outliers.
[0007] The present invention aims to solve the above-mentioned problems and provides an outlier removal method for removing outliers contained in learning data containing data of explanatory variables and target variables for machine learning, the outlier removal method comprising the following steps: an evaluation index calculation step, which comprises a model making step of dividing the learning data into training data and test data and using the training data to make a regression model representing the correlation between the explanatory variables and the target variable, a first evaluation index calculation step of using the test data to calculate the evaluation index for the regression model and setting it as the first evaluation index, and a second evaluation index calculation step of using the training data to calculate the evaluation index for the regression model and setting it as the second evaluation index, and the model making step, the first evaluation index calculation step and the second evaluation index calculation step are repeated a predetermined number of times; an outlier determination step, which, based on the calculation result of the evaluation index calculation step, uses both the first evaluation index and the second evaluation index when using the data as the test data as indicators for each of the data contained in the learning data; and an outlier removal step of removing the data determined to be outliers in the outlier determination step.
[0008] In addition, the present invention aims to solve the above-mentioned problems and provides an outlier removal device, which removes outliers contained in learning data containing explanatory variables and target variables for machine learning, and the outlier removal device comprises: an evaluation index calculation processing unit, which runs a model making process, a first evaluation index calculation process, and a second evaluation index calculation process, and repeats the model making process, the first evaluation index calculation process, and the second evaluation index calculation process a predetermined number of times, wherein the model making process divides the learning data into training data and test data and uses the training data to make a regression representing the correlation between the explanatory variable and the target variable. model, the first evaluation index calculation step uses the test data to calculate the evaluation index of the regression model and sets it as the first evaluation index, and the second evaluation index calculation step uses the training data to calculate the evaluation index of the regression model and sets it as the second evaluation index; an outlier determination processing unit, which, based on the calculation result of the evaluation index calculation processing unit, uses both the first evaluation index and the second evaluation index when the data is used as the test data for each of the data included in the learning data, to determine whether the data is an outlier; and an outlier removal processing unit, which removes the data determined as an outlier by the outlier determination processing unit.
[0009] According to the present invention, it is possible to provide an outlier removal method and apparatus capable of appropriately removing outliers. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 This is a schematic diagram of the structure of an outlier removal device according to one embodiment of the present invention.
[0011] Figure 2 This is a diagram showing an example of learning data.
[0012] Figure 3 (a) is a diagram for explaining evaluation index calculation processing, and (b) is a diagram showing an example of ranking data.
[0013] Figure 4 This is a flowchart of an outlier removal method according to one embodiment of the present invention.
[0014] Figure 5 This is a flowchart of the evaluation index calculation process.
[0015] Figure 6 It is a flowchart of the outlier calculation process.
[0016] Figure 7 is a flow chart of the outlier removal process.
[0017] Figure 8 This is a graph showing changes in the average value of the second evaluation index (coefficient of determination) when outliers are removed. DETAILED DESCRIPTION
[0018] [Implementation Method]
[0019] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings.
[0020] Figure 1 : is a schematic diagram of the outlier removal device 1 of the present embodiment. The outlier removal device 1 is a device for removing outliers contained in the learning data 31 used for machine learning. An outlier is a value that deviates greatly from other data due to, for example, measurement error, reading error of a measuring instrument, input error, or human error, or the influence of noise. By detecting and removing outliers from the learning data 31, it is expected that the prediction accuracy when machine learning is performed using the learning data 31 will be improved.
[0021] The outlier removal device 1 includes a control unit 2 and a storage unit 3. The outlier removal device 1 is a computer such as a personal computer or a server device, and includes a computing element such as a CPU, a memory such as a RAM or a ROM, a storage device such as a hard disk, and a communication interface as a communication device such as a LAN card.
[0022] The control unit 2 includes a data acquisition processing unit 21, an evaluation index calculation processing unit 22, an outlier determination processing unit 23, and an outlier removal processing unit 24. Details of each unit will be described later. The storage unit 3 is implemented by a predetermined storage area of a memory or a storage device.
[0023] In addition, the outlier removal device 1 has a display 4 and an input device 5. The display 4 is, for example, a liquid crystal display, and the input device 5 is, for example, a keyboard, a mouse, etc. In addition, the display 4 may be formed by a touch panel, and the display 4 may also serve as the input device 5. In addition, the display 4 and the input device 5 may be formed separately from the outlier removal device 1, and may be formed so as to be able to communicate with the outlier removal device 1 by wireless communication or the like. In this case, the display 4 or the input device 5 may also be formed by a portable terminal such as a tablet computer or a smart phone.
[0024] (Data Acquisition Processing Unit 21)
[0025] The data acquisition processing unit 21 performs data acquisition processing for acquiring the learning data 31 from an external device. In the data acquisition processing, the learning data 31 is acquired via a network, for example, from a prediction device or the like that uses the learning data 31. In addition, the learning data 31 may also be input to the outlier removal device 1 via a medium such as a USB memory, and the method for acquiring the learning data 31 is not particularly limited.
[0026] (Learning data 31)
[0027] Here, the learning data 31 will be described. Figure 2 31 is a diagram showing an example of the learning data 31. The learning data 31 is a database used as training data in machine learning, and includes data of explanatory variables and target variables used in machine learning. Figure 2 In the example of , the amount of materials such as polymers and fillers is used as an explanatory variable, and the physical properties of the composite material manufactured using the material (here, tear strength) are used as the target variable. By using the learning data 31 for machine learning, a regression model representing the correlation between the explanatory variable (the amount of each material) and the target variable (physical property) is created, and the physical properties obtained when the composite material is manufactured with the unknown material can be predicted. Here, the case where the learning data 31 contains 30 data in the initial state is described.
[0028] (Evaluation Index Calculation Processing Unit 22)
[0029] The evaluation index calculation processing unit 22 performs an evaluation index calculation process of repeating three steps of a model preparation step, a first evaluation index calculation step, and a second evaluation index calculation step a predetermined number of times. The evaluation index calculation process corresponds to the evaluation index calculation step of the present invention.
[0030] In the model making process, the learning data 31 is divided into training data and test data, and the training data is used to make a regression model (learned model) that represents the correlation between the explanatory variable and the target variable. Figure 3 As shown in (a), the evaluation index calculation processing unit 22 first randomly divides the learning data 31 into training data and test data. In this embodiment, only one data included in the learning data 31 (30) is used as test data, and the remaining data is used as training data (29). After the data is divided, machine learning is performed using the training data, and as a result of the machine learning, a regression model representing the correlation between the explanatory variable and the target variable is created.
[0031] In the first evaluation index calculation step, the evaluation index of the regression model produced in the model production step is calculated using the test data as the first evaluation index. More specifically, in the first evaluation index calculation step, the test data (here, 1) is applied to the regression model produced in the model production step to obtain the predicted value of the target variable, and the first evaluation index representing the degree of consistency (prediction accuracy) or prediction error between the predicted value and the measured value (the value of the target variable in the test data) is obtained. The obtained first evaluation index is stored in the storage unit 3 as the first evaluation index data 32.
[0032] In the second evaluation index calculation step, the training data (here 29) are used to calculate the evaluation index for the regression model produced in the model production step and set as the second evaluation index. More specifically, in the second evaluation index calculation step, the training data are applied to the regression models produced in the model production step, the predicted values of the target variable (here 29) are obtained, and the second evaluation index representing the degree of consistency (prediction accuracy) or prediction error between the predicted value and the measured value (the value of the target variable in the training data) is obtained. The obtained second evaluation index is stored in the storage unit 3 as the second evaluation index data 33.
[0033] As the first evaluation index and the second evaluation index, the determination coefficient R can be used. 2etc. are indicators representing prediction accuracy, indicators representing prediction error. When prediction error is used as the first evaluation indicator or the second evaluation indicator, as prediction error, mean error (ME), mean absolute error (MAE), root mean square error (RMSE), mean error rate (MPE), mean absolute error rate (MAPE), root mean square error rate (RMSPE), etc. can be used. More preferably, as prediction error, at least one of ME, MAE and RMSE and one of MPE, MAPE and RMSPE can be used. This is because, when only MAE, ME or RMSE is used, although there is sufficient margin when the value of the target variable (here is tear strength) is small, if the value of the target variable (here is tear strength) becomes large, the judgment becomes extremely difficult, and it is possible that data that are not outliers will be judged as outliers. In addition, when only MAPE, MPE or RMSPE is used, there is a sufficient margin when the value of the target variable (here, tear strength) is large, but if the value of the target variable (here, tear strength) becomes small, the judgment becomes extremely difficult, and data that is not an outlier may be judged as an outlier. In this embodiment, MAE and MAPE are used as the first evaluation index. In addition, the determination coefficient R is used as the second evaluation index. 2 In addition, when using MAE, MAPE, etc. as the second evaluation indicator, the same number of MAE, MAPE, etc. as the training data will be obtained, so the average value or median value can be used as the representative value as the second evaluation indicator.
[0034] The evaluation index calculation processing unit 22 repeats the three steps of the model preparation step, the first evaluation index calculation step, and the second evaluation index calculation step a preset number of times. In this embodiment, the number of data divided as test data is set to 1, so the number of repetitions is the same as the number of data included in the learning data 31 (here, 30 times). In addition, all the data included in the learning data 31 are always selected once as test data.
[0035] (Outlier determination processing unit 23)
[0036] The outlier determination processing unit 23 performs outlier determination processing on each data contained in the learning data 31 based on the calculation result (first evaluation index data 32 and second evaluation index data 33) of the evaluation index calculation processing unit 22, using both the first evaluation index and the second evaluation index when the data is used as test data as indicators to determine whether the data is an outlier.
[0037] In this embodiment, the outlier determination processing unit 23 performs the sorting of the first evaluation index and the sorting of the second evaluation index, and calculates the index value when each data is used as test data based on the ranking of the two. Here, as the index value, the total value of the ranking of the first evaluation index and the second evaluation index, that is, the ranking total is used. The calculated ranking and the ranking total are stored in the storage unit 3 as ranking data 34.
[0038] Figure 3 (b) is a diagram showing an example of the ranking data 34. Figure 3 As shown in (b), the ranking data 34 includes the ranking of the first evaluation index and the second evaluation index when each data is used as test data, and the ranking total as the index value. MAE and MAPE used as the first evaluation index are sorted in such a way that the larger their values are, the lower the ranking is (the larger the ranking number is). Therefore, the larger the ranking number is, the greater the possibility that the test data is an outlier. In addition, the determination coefficient R used as the second evaluation index is 2 , and the ranking is also carried out in a way that the larger the value, the lower the rank (the larger the rank number). 2 The larger the value of , the higher the prediction accuracy. If the prediction accuracy is high only by removing the training data from the test data, the possibility that the test data is an outlier increases.
[0039] Thus, in this embodiment, the larger the ranking numbers of both the first evaluation index and the second evaluation index, the greater the possibility that the test data is an outlier. Therefore, the total ranking of these rankings is used as an index value for determining outliers. In addition, by using MAE, MAPE, etc. as the first evaluation index, the determination coefficient R is used. 2 As the second evaluation index, the ranking process can be performed using the same algorithm (the larger the value, the larger the rank number), and the process can be simplified.
[0040] Then, the outlier determination processing unit 23 compares the rank of MAE as the first evaluation index and the rank of MAPE with the determination coefficient R as the second evaluation index. 2 The total value of the ranking is taken as the total ranking. In addition, here, when calculating the total ranking, the ranking of MAE and the ranking of MAPE are added together, and weighting is performed in a manner that the influence of the first evaluation indicator is greater than that of the second evaluation indicator. However, this is not limited to this. For example, the ranking of the first evaluation indicator can be calculated by averaging the ranking of MAE and the ranking of MAPE, and the total ranking can be calculated by adding the ranking of the second evaluation indicator. In this way, the method of calculating the total ranking as an indicator value can be appropriately changed, and the weighting can be appropriately adjusted by considering the trend of the learning data 31 to be used.
[0041] In addition, the outlier determination processing unit 23 determines whether a predetermined termination condition is satisfied. When the termination condition is satisfied, the outlier determination processing unit 23 determines that there is no outlier in the learning data 31 and terminates the processing. When the termination condition is not satisfied, the outlier determination processing unit 23 terminates the processing by removing the data with the largest value of the total ranking of the index value (in Figure 3 In the example of (b), the fourth data) is judged as an outlier.
[0042] The end condition can be set appropriately, but for example, the determination coefficient R used as the second evaluation index may be set. 2 When the average value of is saturated, it is determined that the termination condition is met. 2 Whether the average value is saturated can be determined based on the coefficient of determination R 2 The determination can be made by looking at the change in the average value (the difference between the values before and after the outlier is excluded). 2 When the average value or median value of becomes above a preset threshold value, it is determined that the termination condition is satisfied. In addition, the termination condition can be any condition as long as it can be determined that the prediction accuracy is sufficiently high, and can be set appropriately.
[0043] (Outlier Removal Processing Unit 24)
[0044] The outlier removal processing unit 24 performs an outlier removal process for removing data determined as outliers in the outlier determination process. The outlier removal process corresponds to the outlier removal step of the present invention.
[0045] The outlier removal processing unit 24 is configured to remove only one piece of data determined to be an outlier in the outlier determination process. This is because there may be an outlier whose prediction accuracy decreases (prediction error increases) due to the influence of other outliers, and data that is not an outlier is not removed.
[0046] The outlier removal processing unit 24 removes one piece of data determined as an outlier in the outlier determination process from the learning data 31 and updates the learning data 31. The outlier removal processing unit 24 stores the data removed as an outlier as outlier data 35 in the storage unit 3.
[0047] (Outlier Removal Method)
[0048] Figure 4 Flowchart of the outlier removal method of this embodiment. Figure 4 As shown, first, in step S1 , the data acquisition processing unit 21 performs a data acquisition process of acquiring the learning data 31 from an external device or the like. The acquired learning data 31 is stored in the storage unit 3 .
[0049] Then, in step S2, an evaluation index calculation process is performed. In the evaluation index calculation process, Figure 5 As shown, first, in step S21, the initial value 1 is substituted into the variable n indicating the number of repetitions. In addition, a value (here 30) is substituted into the variable n indicating the maximum number of repetitions. max . Thereafter, in step S22, the evaluation index calculation processing unit 22 divides the learning data 31 into training data and test data. At this time, for example, the nth data is used as the test data, and the rest of the data is used as the training data. Then, in step S23, the evaluation index calculation processing unit 22 uses the training data to create a regression model. Thereafter, in step S24, the evaluation index calculation processing unit 22 applies the test data to the created regression model to obtain MAE and MAPE as the first evaluation index. Thereafter, in step S25, the evaluation index calculation processing unit 22 stores the obtained MAE and MAPE as the first evaluation index data 32 in the storage unit 3. Thereafter, in step S26, the evaluation index calculation processing unit 22 applies the training data to the created regression model to obtain the determination coefficient R as the second evaluation index. 2 Then, in step S27, the evaluation index calculation processing unit 22 converts the obtained determination coefficient R 2 The second evaluation index data 33 is stored in the storage unit 3. Then, in step S28, it is determined whether the variable n is n max If the result of step S28 is "No" (N), the process returns to step S22 after incrementing n in step S29. If the result of step S28 is "Yes" (Y), the process returns to step S22. Figure 4 Step S3.
[0050] In step S3, outlier determination processing is performed. In the outlier determination processing, if Figure 6 As shown, first, in step S31, the outlier determination processing unit 23 determines whether a predetermined termination condition is met. If it is determined as "yes" (Y) in step S31, the processing is terminated. If it is determined as "no" (N) in step S31, in step S32, the first evaluation index and the second evaluation index are sorted, and in step S33, the total ranking when each data is used as test data is calculated. Thereafter, in step S34, the ranking calculated in step S32 and the total ranking calculated in step S33 are stored as ranking data 34 in the storage unit 3. Thereafter, return and enter Figure 4 Step S4.
[0051] In step S4, outlier removal processing is performed. In the outlier removal processing, if Figure 7As shown, first, in step S41, the outlier removal processing unit 24 removes the data with the largest total rank to update the learning data 31, and in step S42, the removed data is stored in the storage unit 3 as outlier data 35. Then, return to Figure 4 Step S2.
[0052] (Change in prediction accuracy caused by removing outliers)
[0053] The change in prediction accuracy when outliers are removed using the outlier removal method of the present embodiment is studied. As learning data 31, data having 30 data is used, as explanatory variables, the mixing amounts of 5 materials and material information that digitizes the characteristics of the material composition (such as the volume ratio of the filler, etc.) are used, and as the target variable, tear strength is used.
[0054] The data of the learning data 31 is segmented, a regression model is created using the training data obtained by the segmentation, a first evaluation index (MAE and MAPE) is measured by applying the test data obtained by the segmentation to the regression model, and a second evaluation index (determination coefficient R) is measured by applying the training data to the regression model. 2 ) is repeated the same number of times as the number of data (more specifically, 30 times for the first time and 29 times after removing one outlier), and the first evaluation index and the second evaluation index are obtained for each data when the data is used as test data. Then, the first evaluation index and the second evaluation index of each data are sorted to find the total rank. Then, the data with the largest total rank is repeatedly removed.
[0055] Figure 8 The determination coefficient R as the second evaluation index is shown. 2 The change in the average value of Figure 8 As shown in the figure, it can be seen that as outliers, the more data are removed, the lower the coefficient of determination R 2 The higher the average value, the higher the prediction accuracy. That is, it can be seen that the outlier removal method of this embodiment can appropriately remove outliers. In addition, when the number of trials (the number of data removed as outliers) increases, the determination coefficient R 2 Therefore, it is also confirmed that the end condition of the process of ending the outlier removal depends on the determination coefficient R 2 Is the average value of saturated?
[0056] (Functions and Effects of Implementation Methods)
[0057] As described above, the outlier removal method of the present embodiment comprises: an evaluation index calculation step, which comprises a model making step of dividing the learning data 31 into training data and test data and using the training data to make a regression model representing the correlation between the explanatory variable and the target variable, a first evaluation index calculation step of using the test data to calculate the evaluation index for the regression model and setting it as the first evaluation index, and a second evaluation index calculation step of using the training data to calculate the evaluation index for the regression model and setting it as the second evaluation index, and the model making step, the first evaluation index calculation step and the second evaluation index calculation step are repeated a predetermined number of times; an outlier determination step, which determines whether each data contained in the learning data 31 is an outlier based on the calculation result of the evaluation index calculation step, using both the first evaluation index and the second evaluation index when the data is used as test data as indicators; and an outlier removal step, which removes the data determined to be an outlier in the outlier determination step.
[0058] Thus, when outliers are included in the learning data 31, the outliers can be appropriately removed by considering the prediction accuracy of both the test data and the training data. As a result, the learning data 31 from which the outliers have been appropriately removed can be used for machine learning, and the prediction accuracy of physical property predictions, etc. can be improved. In addition, as the reason why the prediction accuracy becomes low (the prediction error becomes larger), in addition to the existence of outliers, many other reasons can be listed, such as poor regression models caused by overlearning, insufficient learning, and inappropriate hyperparameter values. For example, when only the test data is considered (when only the first evaluation index is used as an index), due to these reasons, although it is not an outlier, it is possible to remove it as an outlier. In the present embodiment, the training data (the second evaluation index is also considered) is also considered to determine the outliers, thereby suppressing the influence of the above-mentioned other reasons and appropriately removing the outliers.
[0059] (Variation Example)
[0060] Although not mentioned in the above embodiment, the outlier removal device 1 can also be assembled into a prediction device that predicts physical properties, etc. using the learning data 31. In this case, the prediction device includes: a regression model preparation unit that performs machine learning using the learning data 31 from which outliers have been removed to prepare a regression model that represents the correlation between the explanatory variable and the target variable; and a prediction unit that uses the regression model prepared by the regression model preparation unit to predict physical properties, etc.
[0061] In addition, in the above-mentioned embodiment, in the evaluation index calculation process, there is only one test data when the data is divided, but there may be multiple test data. In this case, in order to obtain multiple first evaluation indicators and second evaluation indicators when arbitrary data are used as test data, the number of repetitions of the evaluation index calculation process is set to be large, and the average values and medians of multiple first evaluation indicators and second evaluation indicators when arbitrary data are used as test data are sorted as indicators, and outliers are determined based on the results of the sorting. However, in this case, the calculation load becomes large and the calculation takes time, so in order to perform simpler processing, it can be said that it is more preferable to set only one test data.
[0062] (Summary of Implementation Methods)
[0063] Next, the technical ideas grasped from the above-described embodiments are described by citing the reference numerals in the embodiments. However, the symbols in the following description do not limit the components in the scope of the claimed patent protection to the components specifically shown in the embodiments.
[0064] [1] An outlier removal method for removing outliers contained in learning data (31) containing data of explanatory variables and target variables for machine learning, the outlier removal method comprising the following steps: an evaluation index calculation step, comprising a model making step of dividing the learning data (31) into training data and test data and using the training data to make a regression model representing the correlation between the explanatory variables and the target variable, a first evaluation index calculation step of using the test data to calculate an evaluation index for the regression model and setting it as a first evaluation index, and a second evaluation index calculation step of using the training data to calculate an evaluation index for the regression model and setting it as a second evaluation index, wherein the model making step, the first evaluation index calculation step and the second evaluation index calculation step are repeated a predetermined number of times; an outlier determination step, based on the calculation result of the evaluation index calculation step, for each of the data contained in the learning data (31), using both the first evaluation index and the second evaluation index when the data is used as the test data as indicators to determine whether the data is an outlier; and an outlier removal step of removing data determined to be an outlier in the outlier determination step.
[0065] [2] According to the outlier removal method described in [1], in the outlier determination process, the first evaluation index and the second evaluation index are sorted, and the index value when any data is used as the test data is calculated based on the ranking of the two, and whether the any data is an outlier is determined based on the obtained index value.
[0066] [3] According to the outlier removal method described in [1] or [2], in the evaluation index calculation step, the segmentation is performed in a manner that only one data included in the learning data (31) is used as the test data and the remaining data is used as the training data.
[0067] [4] According to the outlier removal method described in any one of [1] to [3], prediction error is used in at least one of the first evaluation index and the second evaluation index, and as the prediction error, any one of mean error (ME), mean absolute error (MAE) and root mean square error (RMSE) and any one of mean error rate (MPE), mean absolute error rate (MAPE) and root mean square error rate (RMSPE) is used.
[0068] [5] According to the outlier removal method described in [4], the prediction error is used as the first evaluation index, and the determination coefficient is used as the second evaluation index.
[0069] [6] An outlier removal device (1) that removes outliers contained in learning data (31) that includes data of explanatory variables and target variables for machine learning, the outlier removal device comprising: an evaluation index calculation processing unit (22) that performs a model preparation step of dividing the learning data (31) into training data and test data and using the training data to prepare a regression model that represents the correlation between the explanatory variables and the target variables, a first evaluation index calculation step of using the test data to calculate an evaluation index for the regression model and setting it as a first evaluation index, and a first evaluation index calculation step of using the training data to calculate the evaluation index for the regression model and setting it as a first evaluation index. A second evaluation indicator calculation step, which is set as a second evaluation indicator, repeats the model making step, the first evaluation indicator calculation step and the second evaluation indicator calculation step a predetermined number of times; an outlier determination processing unit (23), which, based on the calculation result of the evaluation indicator calculation processing unit (22), uses both the first evaluation indicator and the second evaluation indicator when the data is used as the test data for each of the data included in the learning data (31), to determine whether the data is an outlier; and an outlier removal processing unit (24), which removes the data determined as an outlier by the outlier determination processing unit (23).
[0070] (Note)
[0071] The embodiments of the present invention are described above, but the embodiments described above do not limit the invention involved in the scope of the patent protection requested. In addition, it should be noted that the combination of features described in the embodiments is not necessarily all necessary for the means to solve the problems of the invention. In addition, the present invention can be implemented by appropriate deformation within the scope of its purpose.
[0072] Explanation of symbols
[0073] 1…Outlier removal device
[0074] 2…Control unit
[0075] 21…Data acquisition processing unit
[0076] 22…Evaluation index calculation processing unit
[0077] 23…Outlier determination processing unit
[0078] 24…Outlier removal processing unit
[0079] 3… Storage
[0080] 31…Learning with Data
[0081] 32…First evaluation index data
[0082] 33…Second evaluation index data
[0083] 34…Ranking data
[0084] 35…Outlier data.
Claims
1. A method for removing outliers, comprising removing outliers contained in learning data containing data of explanatory variables and target variables for machine learning, characterized in that: The outlier removal method comprises the following steps: An evaluation index calculation step, comprising a model making step of dividing the learning data into training data and test data and using the training data to make a regression model representing the correlation between the explanatory variable and the target variable, a first evaluation index calculation step of using the test data to calculate an evaluation index for the regression model and setting it as a first evaluation index, and a second evaluation index calculation step of using the training data to calculate an evaluation index for the regression model and setting it as a second evaluation index, wherein the model making step, the first evaluation index calculation step, and the second evaluation index calculation step are repeated a predetermined number of times; an outlier determination step, which determines whether each data included in the learning data is an outlier based on the calculation result of the evaluation index calculation step, using both the first evaluation index and the second evaluation index when the data is used as the test data as indicators; as well as The outlier removal step removes the data determined as outliers in the outlier determination step.
2. The outlier removal method according to claim 1, characterized in that: In the outlier determination process, the first evaluation index and the second evaluation index are sorted, and the index value when any data is used as the test data is calculated based on the ranking of the two, and whether the any data is an outlier is determined based on the obtained index value.
3. The outlier removal method according to claim 1, characterized in that: In the evaluation index calculation step, the division is performed so that only one data included in the learning data is used as the test data and the remaining data is used as the training data.
4. The outlier removal method according to claim 1, characterized in that: A prediction error is used as at least one of the first evaluation index and the second evaluation index, As the prediction error, any one of a mean error, a mean absolute error, and a root mean square error, and any one of a mean error rate, a mean absolute error rate, and a root mean square error rate are used.
5. The outlier removal method according to claim 4, characterized in that: Using the prediction error as the first evaluation indicator, The coefficient of determination was used as the second evaluation index.
6. An outlier removal device for removing outliers contained in learning data containing data of explanatory variables and target variables for machine learning, characterized in that: The outlier removal device comprises: An evaluation index calculation processing unit, which executes a model making process, a first evaluation index calculation process, and a second evaluation index calculation process, and repeats the model making process, the first evaluation index calculation process, and the second evaluation index calculation process for a predetermined number of times, wherein the model making process divides the learning data into training data and test data and uses the training data to make a regression model representing the correlation between the explanatory variable and the target variable, the first evaluation index calculation process uses the test data to calculate the evaluation index of the regression model and sets it as a first evaluation index, and the second evaluation index calculation process uses the training data to calculate the evaluation index of the regression model and sets it as a second evaluation index; an outlier determination processing unit that determines whether each of the data included in the learning data is an outlier based on the calculation result of the evaluation index calculation processing unit, using both the first evaluation index and the second evaluation index when the data is used as the test data as indicators; and An outlier removal processing unit removes data determined as outliers by the outlier determination processing unit.
Citation Information
Patent Citations
Method for analyzing learning data and computing system
JP2020030738A
