Precedence relationship extraction device, precedence relationship extraction method, and precedence relationship extraction program
The device and method analyze time-series data to identify unexpected precedence relationships through semantic similarity and Granger causality, effectively extracting relationships useful for future predictions.
Patent Information
- Application Number
- JP2024526122
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-06-08
- Publication Date
- 2026-02-19
- Estimated Expiration
- 2042-06-08
AI Technical Summary
Existing methods struggle to extract unexpected precedence relationships and those useful for future predictions from large datasets, as they primarily focus on correlations and causalities that are easily identifiable by humans.
A device and method that utilize a precedence calculation unit, similarity calculation unit, surprise calculation unit, and causality testing unit to analyze time-series data, calculating semantic similarity and surprise to identify unexpected precedence relationships through cross-correlation functions and Granger causality tests.
Enables the extraction of unexpected precedence relationships that are difficult for humans to deduce, providing valuable insights for future predictions by ranking combinations based on surprise and causality significance.
Smart Images

Figure 0007817627000013 
Figure 0007817627000014 
Figure 0007817627000015
Abstract
Description
[Technical Field]
[0001] The present invention relates to a precedence relationship extraction device, a precedence relationship extraction method, and a precedence relationship extraction program. [Background technology]
[0002] It is expected that new value will be created by extracting precedence relationships from large amounts of data that are difficult for humans to come up with. For example, the precedence relationship "gasoline prices tend to fluctuate before electricity prices" is easy for humans to come up with, and the data value is low. In contrast, the precedence relationship "ring prices tend to fluctuate before city gas usage (fictional example)" is a relationship that is difficult for humans to come up with (hereinafter referred to as "unexpected precedence relationships"), and the data value is high.
[0003] Non-Patent Document 1 discloses a method for analyzing the precedence relationship between time series variables, in which a correlation coefficient function (CCF) is used to display the relationship between time series variables with a time lag.
[0004] Patent Document 1 discloses that in a regression model (VAR), the strength of the causal relationship between time series variables is calculated from the magnitude of the influence of fluctuations in error terms and minute changes. Patent Document 2 discloses the use of cross-correlation in learning word vectors. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] Patent No. 6730340 [Patent Document 2] Patent No. 6620950 [Non-patent literature]
[0006] [Non-Patent Document 1] Shigeru Aoki, Special Topic on Atmospheric and Oceanic Analysis Methods, Correlation and Regression, http: / / climbsd.lowtem.hokudai.ac.jp / group / shigeru / tc / dataan2012 / num4.pdf, http: / / climbsd.lowtem.hokudai.ac.jp / group / shigeru / tc / dataan2012 / index.htm Summary of the Invention [Problem to be solved by the invention]
[0007] However, the method using the cross-correlation function (CCF) disclosed in Non-Patent Document 1 and the method using the regression model (VAR) disclosed in Patent Document 1 extract precedence relationships that are easy for humans to think of, making it difficult to extract unexpected precedence relationships. Furthermore, the technology disclosed in Patent Document 2 cannot extract unexpected precedence relationships. Furthermore, the above-mentioned documents are unable to extract precedence relationships that are useful for future predictions, i.e., the precedence relationship that "item A is useful for predicting the future of item B."
[0008] The present invention has been made in consideration of the above circumstances, and its purpose is to provide a precedent relationship extraction device, a precedent relationship extraction method, and a precedent relationship extraction program that are capable of extracting, from multiple data, precedent relationships that are difficult for humans to come up with and that are useful for future predictions. [Means for solving the problem]
[0009] A precedence relationship extraction device according to one embodiment of the present invention includes a precedence calculation unit that calculates the precedence of time-series data xj of item j relative to time-series data xi of item i from a plurality of data; a similarity calculation unit that calculates the semantic similarity between the time-series data xi and the time-series data xj; a surprise calculation unit that calculates a surprise indicating the surprise of combining the item i and the item j based on the precedence and the semantic similarity; a causality testing unit that tests the causality between the item i and the item j; and a presentation unit that presents the surprise and the presence or absence of the causality.
[0010] Another aspect of the precedence relationship extraction device of the present invention includes a precedence calculation unit that tests the causality between time-series data xj of item j and time-series data xi of item i from a plurality of data and calculates the precedence of item j over item i based on the test results; a similarity calculation unit that calculates the semantic similarity between the time-series data xi and the time-series data xj; a surprise calculation unit that calculates a surprise indicating the surprise of combining item i and item j based on the precedence and the semantic similarity; and a presentation unit that presents the surprise.
[0011] A method for extracting precedence relationships according to one aspect of the present invention includes the steps of: calculating a precedence degree of time-series data xj of item j relative to time-series data xi of item i from a plurality of data; calculating a semantic similarity between the time-series data xi and the time-series data xj; calculating a surprise degree indicating the surprise of combining the item i and the item j based on the precedence degree and the semantic similarity; testing causality between the item i and the item j; and presenting the surprise degree and the presence or absence of causality.
[0012] One aspect of the present invention is a precedence relationship extraction program for causing a computer to function as the precedence relationship extraction device. [Effects of the Invention]
[0013] According to the present invention, it is possible to extract, from a plurality of data, precedence relationships that are difficult for humans to come up with and that are useful for future predictions. [Brief explanation of the drawings]
[0014] [Figure 1] FIG. 1 is a block diagram showing the configuration of a precedence relationship extraction device according to the first embodiment. [Figure 2A] FIG. 2A is a graph of time series data xi,t and time series data xj,t. [Figure 2B] FIG. 2B is an explanatory diagram showing an example in which xi,t is used as a reference and the numerical value of the time immediately before xj,t is compared. [Figure 2C] FIG. 2C is a graph plotting xi,t at time t on the horizontal axis and xj,t-1 at time t-1 on the vertical axis. [Figure 2D] FIG. 2D is an explanatory diagram showing an example in which the numerical value of xj,t at the time two moments before is compared with xi,t as the reference. [Figure 2E] FIG. 2E is a graph plotting xi,t at time t on the horizontal axis and xj,t-2 at time t-2 on the vertical axis. [Figure 2F] FIG. 2F is a graph in which the horizontal axis represents the delay time k and the vertical axis represents the cross-correlation function Rij(k). [Figure 3] FIG. 3 is an explanatory diagram showing maximum and average values in a graph in which the horizontal axis represents delay time k and the vertical axis represents cross-correlation function Rij(k). [Figure 4] FIG. 4 is an explanatory diagram showing an example of setting the unexpectedness level rij on a plane of a graph with the semantic similarity level uij on the horizontal axis and the correlation strength vij on the vertical axis. [Figure 5] FIG. 5 is an explanatory diagram showing an example of setting the unexpectedness degree rij with an arbitrary point as the starting point on the plane of a graph with the semantic similarity degree uij on the horizontal axis and the correlation strength vij on the vertical axis. [Figure 6] FIG. 6 is an explanatory diagram showing an example of setting the unexpectedness rij on a plane of a graph with the standardized semantic similarity uij on the horizontal axis and the standardized precedence vij on the vertical axis. [Figure 7] FIG. 7 is an explanatory diagram showing an example in which the unexpectedness level rij is calculated using the Euclidean distance or the Mahalanobis distance. [Figure 8] FIG. 8 is an explanatory diagram showing the residual between the regression equation and the observed data. [Figure 9] FIG. 9 is a graph showing the F distribution obtained by the Granger causality test, where (a) shows the case where the F value is equal to Fα and (b) shows the case where the F value is greater than Fα. [Figure 10] FIG. 10 is a flowchart showing the processing procedure of the precedent relationship extraction device according to the first embodiment. [Figure 11]FIG. 11 is an explanatory diagram illustrating an example of a surprise degree ranking presented by the presentation unit according to the first embodiment. [Figure 12] FIG. 12 is a diagram for explaining the formula (12). [Figure 13] FIG. 13 is a diagram for explaining the formula (13). [Figure 14] FIG. 14 is a block diagram showing the configuration of a precedence relationship extraction device according to the second embodiment. [Figure 15] FIG. 15 is a flowchart showing the processing procedure of the precedent relationship extraction device according to the second embodiment. [Figure 16] FIG. 16 is an explanatory diagram illustrating an example of a surprise degree ranking presented by the presentation unit according to the second embodiment. [Figure 17] FIG. 17 is a block diagram showing the hardware configuration of this embodiment. DETAILED DESCRIPTION OF THE INVENTION
[0015] [First embodiment] The first embodiment will be described below. Fig. 1 is a block diagram showing the configuration of a precedence relationship extraction device according to the first embodiment. As shown in Fig. 1, the precedence relationship extraction device 101 includes a precedence degree calculation unit 1, a similarity calculation unit 2, a surprise degree calculation unit 3, a causality test unit 4, and a presentation unit 5.
[0016] The leading degree calculation unit 1 calculates a correlation strength vij, which is an example of leading degree, based on the cross-correlation function between time-series data xi and time-series data xj. When the time-series data of item i is xi (hereinafter abbreviated as "data xi") and the time-series data of item j is xj (hereinafter abbreviated as "data xj"), the leading degree calculation unit 1 quantifies the leading degree of data xi relative to data xj. Specifically, the leading degree calculation unit 1 calculates a cross-correlation function for two items i and j included in multiple data. Note that "item" refers to a general term for goods, food, services, etc., as shown in the "i" and "j" columns in Figures 11 and 16, which will be described later. "Time-series data" refers to data given in a time series, and includes data indicating, for example, that when the item is gasoline, the gasoline price is XX yen in April, XX yen in May, and XX yen in June.
[0017] The leading degree calculation unit 1 calculates the correlation strength vij from the cross-correlation function. The correlation strength vij will be described in detail later. The correlation strength is an example of the leading degree. Note that, in this embodiment, an example in which the cross-correlation function is used as a method for calculating the leading degree will be described, but other methods may also be used.
[0018] The similarity calculation unit 2 calculates the semantic similarity, which indicates the semantic closeness between the semantic vectors of data xi and data xj, based on the semantic vectors of data xi and xj. The similarity calculation unit 2 uses "Word2vec (word to vector)" as a method for calculating semantic vectors. By using "Word2vec", the semantic vectors of data xi and data xj are calculated. The similarity calculation unit 2 calculates the semantic similarity uij between the semantic vectors of data xi and data xj.
[0019] Here, an example will be described in which cosine similarity is used as an example of semantic similarity uij. That is, the similarity calculation unit 2 calculates the cosine similarity between the semantic vector of item i and the semantic vector of item j. Details of semantic similarity uij will be described later. Note that in this embodiment, an example will be described in which "Word2vec" is used to calculate the semantic vector and cosine similarity is used as a method for calculating the semantic similarity, but other methods may also be used.
[0020] The surprise calculation unit 3 calculates the surprise rij based on the correlation strength vij calculated by the precedence calculation unit 1 and the semantic similarity uij calculated by the similarity calculation unit 2. The surprise rij is an index that indicates the surprise of combining item i and item j. Details of the surprise rij will be described later. The surprise calculation unit 3 determines the component in the upper left 45° direction (135° direction) of an orthogonal coordinate system with the horizontal axis as uij and the vertical axis as vij to be the surprise rij of the item pair "i, j".
[0021] The causality testing unit 4 tests the causality between item i and item j. In this embodiment, a Granger causality test is performed to determine whether or not Granger causality exists between item i and item j. As is well known, Granger causality is an index that indicates, using a t-test and an F-test for two pieces of time series data X and Y, whether the numerical value of time series data X can provide statistically significant information regarding the numerical value of future time series data Y. If it is proven that the numerical value of X can provide statistically significant information regarding the numerical value of future Y, it is determined that Granger causality from time series data X to time series data Y is significant.
[0022] The presentation unit 5 notifies the user of the degree of surprise rij calculated by the surprise calculation unit 3 and the result of the Granger causality test executed by the causality test unit 4 by displaying them in a ranking format on a display or the like. That is, the presentation unit 5 presents combinations of two items (item i and item j) in a ranking format in descending order of the degree of surprise. Note that the presentation unit 5 is not limited to presenting each piece of information to the user by image, and may also notify the user by voice, for example.
[0023] [Calculation method of cross-correlation function] Next, we will explain the method of calculating the cross-correlation function executed by the leading degree calculation unit 1. The leading degree calculation unit 1 calculates the cross-correlation function "Rij(k)" for the data xi and xj using the following equation (1). The cross-correlation function "Rij(k)" is an index that indicates how much the data xj leads the data xi.
[0024]
number
[0025] In equation (1), "k" is a positive integer that indicates the delay time. Equation (1) is the correlation coefficient between "xi" and "xj shifted forward by the delay time k." Due to the nature of equations, equation (1) satisfies "-1≦Rij(k)≦1."
[0026] For example, assume that two pieces of data xj,t and xi,t are given as shown in Figure 2A, where t indicates the time when the data was obtained.
[0027] The calculation procedure for the cross-correlation function Rij(1) when "k=1" will be described with reference to Figures 2B and 2C. As shown in Figure 2B, xi is used as the reference and the value of the time immediately preceding xj is compared, with "xi,t" plotted on the horizontal axis and "xj,t-1" plotted on the vertical axis. As a result, a scatter plot with multiple points is obtained, as shown in Figure 2C, for example. The slope of the straight line L1 connecting the points shown in Figure 2C indicates the cross-correlation function Rij(1).
[0028] Next, the calculation procedure for the cross-correlation function Rij(2) when "k=2" will be explained with reference to Figures 2D and 2E. As shown in Figure 2D, using xi as the reference, the value of xj two times before is compared, and "xi,t" is plotted on the horizontal axis and "xj,t-2" on the vertical axis. As a result, a scatter plot with multiple points plotted is obtained, as shown in Figure 2E, for example. The slope of the straight line L2 connecting the points shown in Figure 2E indicates the cross-correlation function Rij(2).
[0029] The cross-correlation function Rij(k) is calculated by repeating the above calculation for k = 1, 2, 3, etc. As a result, the cross-correlation function Rij(k) with the delay time k as a variable is obtained, for example, as shown in Figure 2F.
[0030] The cross-correlation function Rij(k) calculated by the above method is a function of delay time k. To facilitate combination with semantic similarity uij, which will be described later, the leading degree calculation unit 1 calculates a representative value (scalar) of the cross-correlation function Rij(k) by one of the following methods (a) to (d). This representative value is set as the correlation strength vij. Note that the correlation strength vij may be any value that represents Rij(k), and methods other than (a) to (d) may also be used. (a) The correlation strength vij is the average value of Rij(k) calculated by the following equation (2) in the range of 1≦k≦L. Symbol q1 in FIG. 3 indicates the average value.
[0031]
number
[0032] (b) The maximum value of Rij(k) calculated by the following equation (3) within 1≦k≦L is taken as the correlation strength vij. The symbol q2 in FIG. 3 indicates the maximum value.
[0033]
number
[0034] (c) The standard deviation σij of Rij(k) calculated by the following equation (4) for 1≦k≦L is defined as the correlation strength vij. In equation (4), μ denotes the average value, and E{·} denotes the average of “·”.
[0035]
number
[0036] (d) The kurtosis αij of Rij(k) calculated by the following equation (5) within 1≦k≦L is defined as the correlation strength vij.
[0037]
number
[0038] In this embodiment, an example will be described in which the maximum value shown in (b) above is set as the correlation strength vij. For example, when the cross-correlation function Rij(k) shown in Fig. 3 is obtained, the cross-correlation function for "k=4" is set as the correlation strength vij.
[0039] [Calculation method of semantic similarity uij] The similarity calculation unit 2 acquires the distributed representation, i.e., semantic vector wi, of item i and the distributed representation, i.e., semantic vector wj, of item j using the aforementioned "Word2vec" or the like. For example, wi = (0.5, 0.2, 0.4, , 0.1) and wj = (0.2, 0.1, 0.8, , 0.7) are obtained.
[0040] The similarity calculation unit 2 calculates the cosine similarity between distributed representations wi and wj using the following equation (6), and sets it as the semantic similarity uij. The semantic similarity uij is an index that indicates how easily a person would think that there is some kind of relationship between i and j. When using cosine similarity, -1≦uij≦1 is satisfied by definition.
[0041]
number
[0042] [Calculation method of unexpectedness rij] As shown in Fig. 4, the unexpectedness calculation unit 3 sets up a graph (uv plane) with the semantic similarity uij calculated by the similarity calculation unit 2 on the horizontal axis and the correlation strength vij calculated by the precedence calculation unit 1 on the vertical axis. On the uv plane shown in Fig. 4, the semantic similarity uij increases toward the right, and the correlation strength vij increases toward the top.
[0043] In the uv plane shown in Figure 4, the first quadrant R1 in the upper right is an area where humans can easily infer that "i and j have similar meanings and a precedence relationship," while the third quadrant R3 in the lower left is an area where "i and j have neither similar meanings nor a precedence relationship." Furthermore, the second quadrant R2 in the upper left is an area where the meanings are not similar but there is a strong correlation, which is an area that may be surprising to humans.
[0044] The surprise degree calculation unit 3 sets a straight line L in the 135° direction on the uv plane shown in Fig. 4, and determines the surprise degree rij as the component of the vector (uij, vij) of the item pair "i, j" in the direction of the straight line L. Specifically, the unit vector e is the unit vector in the (-1, 1) direction on the uv plane in Fig. 4, i.e., (cos135°, sin135°) = (-1 / √2, 1 / √2), and the dot product of the unit vector e and the vector (uij, vij) is determined as the surprise degree rij.
[0045] In addition to the above, the degree of surprise rij can also be set to the following (Modification 1) to (Modification 3).
[0046] (Variation 1) In the above example, the unit vector e is a 135° vector starting from the origin (0,0). In Modification 1, the unit vector e is more generalized, and as shown in FIG. 5, a vector with an angle θ starting from a preset coordinate (X, Y) is set as the unit vector. Furthermore, taking into account the bias of the distribution, (X, Y) may be set to coordinates (μu, μv) using the average value μu of uij and the average value μv of vij. The angle θ may be set to 135° or may be set appropriately by the user.
[0047] (Variation 2) Since the semantic similarity uij and the correlation strength vij have different variations, the values uij and vij are standardized to a mean of 0 and a variance of 1, and are taken as u'ij and v'ij, respectively. That is, u'ij and v'ij are calculated using the following equation (7).
[0048]
number
[0049] In equation (7), μu and σu represent the mean value and standard deviation of the semantic similarity, and μv and σv represent the mean value and standard deviation of the correlation strength.
[0050] In the second modification, as shown in FIG. 6, the semantic similarity is u'ij instead of uij, and the correlation strength vij is v'ij, and the unexpectedness rij is calculated by the following equation (8).
[0051]
number
[0052] (Variation 3) In the uv plane, a set of items that is out of the center of the group is abnormal, and there is a high possibility that the set of items will be unexpected to humans. In Variation 3, the unexpectedness rij of the set of items ij is set as the Euclidean distance or Mahalanobis distance from the center of the group μ = (μu, μv). Figure 7 is an explanatory diagram showing an example of calculating the unexpectedness rij using the Euclidean distance or Mahalanobis distance.
[0053] If the central point μ is μ=(μu, μv), μu and μv can be expressed by the following equation (9).
[0054]
number
[0055] In equation (9), "N" indicates the number of samples.
[0056] When the Euclidean distance is used, the unexpectedness degree rij can be calculated by the following formula (10): As a result, the unexpectedness degree rij is obtained as shown in FIG.
[0057]
number
[0058] When the Mahalanobis distance is used, the unexpectedness degree rij can be calculated by the following equation (11b) after using the following equation (11a).
[0059]
number
[0060] Furthermore, if you want to extract pairs of items that only share the relationship "j is a leading indicator of i, despite having different meanings," you can apply a filter that a. limits the search to the upper left quadrant from the origin, "uij<0 and vij>0," or b. limits the search to the upper left quadrant from the center point (the third quadrant when the center point is used as the limiting point). Furthermore, by calculating the correlation strength from the cross-correlation function and the semantic similarity from the cosine similarity, which are defined as "-1≦uij≦1, -1≦vij≦1," preprocessing such as normalization is unnecessary, and the shape of the group is not distorted, making it highly versatile.
[0061] [Causality testing process] Next, we will explain the processing of the causality testing unit 4. The causality testing unit 4 sets a VAR model for the data xi and xj, and performs Granger causality testing based on the VAR model. This will be explained in detail below.
[0062] (VAR model settings) Data xi is modeled using vector autoregression (VAR) that takes data xj into consideration. Specifically, the modeled time series data xi,t(^) is set using equation (12) shown in Figure 12.
[0063] On the right-hand side of equation (12), the first term is a constant term, the second term is the influence of i from one period ago, the third term is the influence of j from one period ago, and the fourth term is the influence of i from two periods ago, .... Also, in equation (12), "q" is a preset order, a number indicating how many periods back to go. "φ" and "c" are coefficients, calculated by the least squares method based on the observed data xi,t (t = 1, 2, ... , n). "εi,t" represents white noise.
[0064] The causality testing unit 4 calculates the residual from the regression equation (excluding ε) obtained by equation (12) and the actual observed values. As shown in Fig. 8, the residual is the difference between the regression equation and the observed data. The causality testing unit 4 calculates the residual sum of squares (RSS) based on the residual.
[0065] (Granger causality test) The causality testing unit 4 performs a Granger causality test based on the residual sum of squares calculated based on the VAR model.
[0066] First, the coefficients φ and c shown in equation (12) in Fig. 12 are calculated by the least squares method. The residual sum of squares obtained from the regression equation is defined as RSS1.
[0067] In the regression equation shown in equation (12), φ and c are calculated using the least squares method when the influence of "j" is set to zero, that is, φij^(1) = φij^(2) = ··· = φij^(q) = 0. As a result, equation (12) becomes equation (13) shown in Figure 13. All terms that are "influenced by j," such as the third and fifth terms on the right-hand side of equation (13), are set to 0. The residual sum of squares from the regression equation shown in equation (13) is defined as RSS0.
[0068] Based on the residual sums of squares RSS1 and RSS0 described above, the statistic F is expressed as follows (14).
[0069]
number
[0070] In equation (14), n is the number of observation data points, and q is the order of the VAR. If the statistic F shown in equation (14) is greater than the 5% point of the F distribution with degrees of freedom (q, n-2q-1), then we reject the null hypothesis that there is no Granger causality from xj to xi.
[0071] Granger causality is not recognized (causality is not significant) in the following cases (a1) to (a5). (a1) The null hypothesis “φij(1)=φij(2)=··=0” is accepted. (a2) Considering j does not improve the RSS of i. (a3) The difference between RSS0 and RSS1 is small. (a4) The statistic F shown in FIG. 9 (described later) is smaller than Fα. (a5) The p-value is greater than α.
[0072] On the other hand, Granger causality is recognized (causality is significant) in the following cases (b1) to (b5). (b1) The null hypothesis “φij(1)=φij(2)=··=0” is rejected. (b2) Considering j improves the RSS of i. (b3) The difference between RSS0 and RSS1 is large. (b4) F shown in Figure 9 (described later) is larger than Fα. (b5) The p-value is smaller than α.
[0073] Figure 9 shows a graph (F distribution curve) showing the F distribution obtained by performing an F test on data xi and xj. Figure 9(a) shows the case where F = Fα (α is the significance level, typically α = 0.05), and Figure 9(b) shows the case where F > Fα.
[0074] For example, Fα is set to the point where the area of the upper tail is 0.05 (5%) of the total. If the F value is smaller than Fα (in the region to the left of Fα in Figure 9(a)), Granger causality is determined to be insignificant. Conversely, if the F value is larger than Fα (in the region to the right of Fα in Figure 9(a)), it is inferred that something rare is occurring, and Granger causality is determined to be significant. The "p-value" indicates the probability of obtaining a value greater than or equal to the actual value on the F distribution curve calculated by the Granger causality test.
[0075] The p-value in the F distribution indicates the area of the upper tail in the graphs shown in Figures 9(a) and (b). Therefore, if the p-value is smaller than 0.05, it is inferred that something rare is occurring, and Granger causality is determined to be significant.
[0076] Granger causality indicates that when modeling data xi for item i, using information on data xj for item j results in higher accuracy. Creating a highly accurate model also increases the accuracy of predicting future data xi. In this embodiment, by calculating the degree of surprise rij for two items i and j and then performing a Granger causality test for the two items i and j, it becomes possible to extract a precedence relationship with higher accuracy. Note that, although this embodiment has been described using an F distribution curve as an example of a distribution curve calculated by a causality test, it is also possible to use, for example, a chi-squared distribution.
[0077] Next, the processing procedure of the precedence relationship extraction device 101 will be described with reference to the flowchart shown in Fig. 10. First, in step S11, the precedence calculation unit 1 calculates the cross-correlation function Rij(k) between the data xi and xj using the above-mentioned equation (1).
[0078] In step S12, the leading degree calculation unit 1 calculates the leading degree vij of the data xj with respect to the data xi based on the cross-correlation function Rij(k) using the above-mentioned equation (3). Note that the leading degree vij may also be calculated using any of the above-mentioned equations (2), (4), and (5).
[0079] In step S13, the similarity calculation unit 2 calculates semantic vectors of the data xi and data xj using "Word2vec".
[0080] In step S14, the similarity calculation unit 2 calculates the cosine similarity between the semantic vectors of the data xi and xj, and defines this result as the semantic similarity uij.
[0081] In step S15, the surprise degree calculation unit 3 determines the component in the upper left 45° direction (135° direction) on the coordinate system (uij, vij), i.e., the component in the direction of the straight line L shown in Figure 4, as the surprise degree rij of the pair of items i and j.
[0082] In step S16, the causality testing unit 4 calculates a VAR model of the data xi taking into account the data xj.
[0083] In step S17, the causality tester 4 performs Granger causality testing from data xj to data xi.
[0084] In step S17, the presentation unit 5 ranks and displays pairs of items i and j in descending order of the degree of surprise rij. It also displays pairs of items i and j for which Granger causality is significant. For example, as shown in Fig. 11, the degree of surprise is displayed as a numerical value for the pair of items i and j, and whether or not Granger causality is significant is displayed with "o" or "x".
[0085] In FIG. 11, the user can recognize that the price of salt (item j) changes before the fixed-line telephone communication charges (item i), the degree of surprise is rij=3.800801, and Granger causality is significant.
[0086] As described above, the precedence relationship extraction device 101 according to this embodiment includes a precedence calculation unit 1 that calculates the precedence of time-series data xj of item j relative to time-series data xi of item i from multiple data sets; a similarity calculation unit 2 that calculates the semantic similarity between the time-series data xi and the time-series data xj; a surprise calculation unit 3 that calculates the surprise indicating the surprise of combining item i and item j based on the precedence and semantic similarity; a causality testing unit 4 that tests the causality between item i and item j; and a presentation unit 5 that presents the surprise and the presence or absence of causality.
[0087] In this embodiment, it is possible to easily extract from multiple data sets an AB pair that is difficult for humans to come up with, such as "time-series data for item A unexpectedly tends to move ahead of time-series data for item B." Furthermore, by performing a causality test, it is possible to extract an AB pair that has not only leading time-series data but also a relationship in which "item A is useful for predicting the future of item B."
[0088] In this embodiment, the cosine similarity of semantic vectors is taken into consideration, so not only can it be extracted from multiple data sets that item A precedes item B, but it is also possible to extract pairs of items A and B that are distant in meaning from each other.
[0089] In this embodiment, the leading degree calculation unit 1 calculates the leading degree vij based on the cross-correlation function between the time series data xi and the time series data xj, which makes it possible to calculate the leading degree vij with high accuracy.
[0090] In this embodiment, the similarity calculation unit 2 calculates the cosine similarity between the semantic vectors of item i and item j, which makes it possible to calculate the semantic similarity uij with high accuracy.
[0091] In this embodiment, the presentation unit 5 presents the combination of item i and item j in a ranking format in descending order of the degree of surprise. It also presents the presence or absence of significance based on the causality test results. This allows the user to easily recognize the degree of surprise and significance of the combination of two items i and j.
[0092] [Description of the Second Embodiment] Next, a second embodiment will be described. Fig. 14 is a block diagram showing the configuration of a precedence relationship extraction device 102 according to the second embodiment. As shown in Fig. 14, the precedence relationship extraction device 102 includes a precedence degree calculation unit 1a, a similarity calculation unit 2, a surprise degree calculation unit 3, and a presentation unit 5.
[0093] The leading degree calculation unit 1a calculates the above-mentioned p-value by performing a Granger causality test. Specifically, it calculates the p-value in the graphs of the F distribution shown in Figures 9(a) and (b) described above. As described above, the p-value indicates the area of the upper tail in the graphs shown in Figures 9(a) and (b). As described above, the smaller the p-value, the higher the causality between two items i and j can be considered to be. The leading degree calculation unit 1a calculates the leading degree vij based on the p-value. That is, the leading degree vij is calculated as "vij = f(pij)" where "f" is an arbitrary function.
[0094] Specifically, it can be calculated using the following equation (15) or (16).
[0095] vij=(pij-μ) / σ …(15) where μ is the average value of all (i, j) p-values, and σ is the standard deviation of the p-values.
[0096] vij=(pij-pij_min) / (pij_max-pij_min) …(16) Here, "pij_min" is the minimum value of pij, and "pij_max" is the maximum value of pij.
[0097] That is, the leading degree calculation unit 1a calculates the leading degree vij based on the probability (p value) that a value equal to or greater than the realized value is obtained in the F distribution curve calculated by the Granger causality test.
[0098] The similarity calculation unit 2, the surprise calculation unit 3, and the presentation unit 5 are configured in the same manner as in the first embodiment, and therefore detailed description thereof will be omitted.
[0099] In the first embodiment described above, the cross-correlation function is calculated by the leading degree calculation unit 1. In contrast to this, in the leading relationship extraction device 102 according to the second embodiment, the leading degree calculation unit 1a calculates the leading degree vij by using the p-value of Granger causality instead of the cross-correlation function.
[0100] The processing procedure of the precedent relationship extraction device 102 according to the second embodiment will be described below with reference to the flowchart shown in Fig. 15. First, in step S31, the causality testing unit 4 obtains a VAR model of data xi taking data xj into consideration.
[0101] In step S32, the leading degree calculation unit 1a performs a Granger causality test for xj → xi and calculates the p-value in the F distribution. As described above, the p-value in the F distribution indicates the area of the upper tail in the graphs shown in Figures 9(a) and 9(b). Therefore, the smaller the p-value, the higher the causality is determined to be.
[0102] In step S33, the leading degree calculation unit 1a calculates the leading degree vij based on the value p. That is, the leading degree vij=f(value p) is calculated based on the above-mentioned equation (15) or (16).
[0103] In step S34, the similarity calculation unit 2 calculates semantic vectors of the data xi and data xj using "Word2vec".
[0104] In step S35, the similarity calculation unit 2 calculates the cosine similarity between the semantic vectors of the data xi and xj, and defines this result as the semantic similarity uij.
[0105] In step S36, the surprise calculation unit 3 determines the component in the upper left 45° direction (135° direction) on the coordinate system (uij, vij), i.e., the component in the direction of the straight line L shown in Figure 4, as the surprise rij of the pair of items i and j.
[0106] In step S37, the causality testing unit 4 arranges the pairs of items i and j in descending order of the degree of surprise rij, and displays the rankings on the presentation unit 5.
[0107] As a result, the degree of surprise rij is displayed as a ranking, as shown in FIG. 16, for example.
[0108] The precedence relationship extraction device 102 according to the second embodiment includes a leading degree calculation unit 1a that tests the causality between time-series data xj of item j and time-series data xi of item i from multiple data and calculates the leading degree of item j relative to item i based on the test results, a similarity calculation unit 2 that calculates the semantic similarity between the time-series data xi and the time-series data xj, a surprise degree calculation unit 3 that calculates the surprise degree indicating the surprise of combining item i and item j based on the leading degree and the semantic similarity, and a presentation unit 5 that presents the surprise degree.
[0109] In the precedence relationship extraction device 102 according to the second embodiment, the precedence degree vij is calculated using the p-value calculated by the causality testing unit 4. This makes it possible to find the precedence degree vij taking into account the causality between two items i and j, and to calculate the surprise degree rij using this precedence degree vij, making it possible to extract an unexpected precedence relationship between two items with high accuracy.
[0110] In the second embodiment, the leading degree calculation unit 1a performs a Granger causality test to calculate the probability (p-value) that a value equal to or greater than the actual value will be obtained. The smaller the p-value, the greater the causality that "item j has information useful for predicting item i." Therefore, by calculating the leading degree vij using the p-value, it becomes possible to calculate the degree of surprise rij with high accuracy.
[0111] The antecedent relationship extraction devices 101 and 102 of the present embodiment described above can be, for example, a general-purpose computer system including a CPU (Central Processing Unit, processor) 901, a memory 902, a storage 903 (HDD: Hard Disk Drive, SSD: Solid State Drive), a communication device 904, an input device 905, and an output device 906, as shown in Fig. 17. The memory 902 and the storage 903 are storage devices. In this computer system, the CPU 901 executes a predetermined program loaded onto the memory 902, thereby realizing each function of the antecedent relationship extraction devices 101 and 102.
[0112] The antecedent relationship extraction devices 101 and 102 may be implemented by one computer or by multiple computers. Also, the antecedent relationship extraction devices 101 and 102 may be virtual machines implemented on a computer.
[0113] The programs for the antecedent relationship extraction devices 101 and 102 can be stored on a computer-readable recording medium such as an HDD, SSD, USB (Universal Serial Bus) memory, CD (Compact Disc), or DVD (Digital Versatile Disc), or can be distributed via a network.
[0114] The present invention is not limited to the above-described embodiment, and various modifications are possible within the scope of the present invention. [Explanation of symbols]
[0115] 1, 1a Leading degree calculation part 2 Similarity calculation part 2 Cross-correlation function 3 Unexpectedness calculation part 4 Causality Testing Section 5 Presentation section 101, 102 Precedence relation extraction device
Claims
1. a leading degree calculation unit that calculates a leading degree of time-series data xj of item j relative to time-series data xi of item i from a plurality of data; a similarity calculation unit that calculates the semantic similarity between the time series data xi and the time series data xj; an unexpectedness calculation unit that calculates an unexpectedness indicating the unexpectedness of combining the item i and the item j based on the precedence and the semantic similarity; a causality testing unit that tests the causality between the item i and the item j; a presentation unit that presents the degree of surprise and the presence or absence of causality; Equipped with The leading degree calculation unit uses the time series data x of the item i at time t and the time series data x of the item j delayed by a lag time k, and further changes the lag time k to calculate a cross-correlation function at each lag time k, and calculates the leading degree using at least one of the mean value, standard deviation, and kurtosis of the cross-correlation coefficient calculated at each lag time k. Precedence relation extraction device.
2. The similarity calculation unit calculates the cosine similarity between the semantic vectors of the item i and the item j. The antecedent relation extraction device according to claim 1 .
3. The presentation unit The combination of the item i and the item j is presented in a ranking format in descending order of the degree of surprise. The antecedent relation extraction device according to claim 1 .
4. a leading degree calculation unit that tests the causality between the time series data xj of item j and the time series data xi of item i from a plurality of data, and calculates the leading degree of item j relative to item i based on the test result; a similarity calculation unit that calculates the semantic similarity between the time series data xi and the time series data xj; an unexpectedness calculation unit that calculates an unexpectedness indicating the unexpectedness of combining the item i and the item j based on the precedence and the semantic similarity; a presentation unit that presents the degree of surprise; Equipped with The leading degree calculation unit uses the time series data x of the item i at time t and the time series data x of the item j delayed by a lag time k, and further changes the lag time k to calculate a cross-correlation function at each lag time k, and calculates the leading degree using at least one of the mean value, standard deviation, and kurtosis of the cross-correlation coefficient calculated at each lag time k. Precedence relation extraction device.
5. The leading degree calculation unit calculates the leading degree based on the probability that a value equal to or greater than an actual value is obtained in a distribution curve calculated by Granger causality testing.
5. The antecedent relation extraction device according to claim 4.
6. calculating the degree of leading of time-series data xj of item j relative to time-series data xi of item i from a plurality of data sets using time-series data xi,t of item i at time t and time-series data xj,tk of item j delayed by lag time k, further changing the lag time k to calculate a cross-correlation function at each lag time k, and using at least one of the mean, standard deviation, and kurtosis of the cross-correlation coefficient calculated at each lag time k; Calculating the semantic similarity between the time series data x i and the time series data x j ; A step of calculating a degree of surprise indicating the surprise of combining the item i and the item j based on the precedence and the semantic similarity; A step of testing the causality between the item i and the item j; a step of presenting the degree of surprise and the presence or absence of causality; A precedence relation extraction method comprising:
7. A precedence relationship extraction program that causes a computer to function as the precedence relationship extraction device according to claim 1.
Citation Information
Patent Citations
Time series analysis method
JP2001306998A
Extraction apparatus, extraction method and extraction program
JP2012173800A
Data analysis support system and data analysis support method
JP2019128646A
Word learning device, word learning method, and word learning program
JP6620950B2
Causal estimation device, causal estimation method, and program
JP6730340B2