Modeling method for discrete count data based on multi-probe local sensitive hashing negative binomial regression model

The index structure and local negative binomial regression model are constructed through multi-probe local sensitive hashing technology, which solves the problems of large-scale count data modeling and adaptive updating, improves prediction accuracy and speed, and is suitable for nonlinearity and time variability. of industrial processes.

CN114297582BActive Publication Date: 2024-10-29ZHEJIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111626005.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-28
Publication Date
2024-10-29
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

Existing counting data modeling methods mainly stay at the level of small-scale data sets and cannot effectively handle large-scale counting data. Moreover, traditional models cannot adapt to changes in data characteristics, resulting in degradation of prediction performance and cannot meet the nonlinear and time-varying requirements of industrial processes. need.

Method used

Use multi-probe local sensitive hashing technology to build an index data structure, search for similar samples through local sensitive hash functions and multi-probe strategies, build and update local negative binomial regression models, and achieve fast adaptive count data modeling .

Benefits of technology

It improves the prediction accuracy and prediction speed of the model, is suitable for large-scale counting data and real-time prediction tasks, overcomes the defects of traditional model prediction performance degradation, and is suitable for nonlinear and time-varying industrial processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114297582B_ABST
    Figure CN114297582B_ABST
Patent Text Reader

Abstract

The present invention discloses a modeling method for discrete count data based on a multi-probe local sensitive hashing negative binomial regression model. The method first uses a local sensitive hashing strategy to construct an index data structure for a historical database of count data. Then, when predicting online, the candidate set of neighbor data of an online query sample is first searched through a multi-probe strategy, and the K nearest neighbor samples of the query sample are further obtained through a filtering strategy. Finally, a local negative binomial regression model is constructed using the K nearest neighbor samples and an output prediction value corresponding to the query sample is output. By introducing a multi-probe local sensitive hashing strategy and an instant learning strategy, the present invention can not only realize the automatic update of a negative binomial regression model to prevent the performance degradation of a prediction model, but also improve the online computing efficiency of the model, and is suitable for processing large-scale count data and meeting the real-time requirements of prediction tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of industrial process control, and in particular relates to a modeling method for discrete counting data based on a multi-probe local sensitive hashing negative binomial regression model. Background Art

[0002] Count data is an important data type, which is widely used in social science, biomedicine, economics, industrial manufacturing and other disciplines. For example, the number of equipment failures within a certain period of time or unit, the number of times the switch is called, the number of accidents in traffic flow, the number of natural disasters, the number of defects in products, etc. The observed values ​​of count data are expressed in the form of non-negative integers and are discrete variables. For this type of data, the Poisson model or negative binomial distribution model is generally used for modeling and analysis, that is, to establish the relationship between the number of occurrences of a certain event y (called dependent variable, output variable or response variable) and the factor x (called independent variable, input variable or covariate) that causes it, in order to explore the key factors affecting the event rate and the number of occurrences of real-time forecast events. In recent years, domestic and foreign scholars have proposed many count data modeling and analysis methods for various application scenarios and the characteristics of count data. For example, the negative binomial regression model was proposed to address the problem of overdispersion in count data; the zero-inflated regression model and the fence regression model were proposed to address the problem of count data containing too many zeros. However, so far, the modeling and analysis methods for count data are still at the level of small-scale data sets, and there are relatively few studies on large-scale count data. However, as more and more data are stored in databases, the data presents large-scale characteristics, both in terms of variable dimension and sample dimension. In addition, most of the current count data regression models establish offline, static, and global prediction models, which not only ignore the local information of the data, but also cannot automatically update the prediction model as the data characteristics change, resulting in the degradation of the model's prediction performance. Therefore, there is an urgent need to provide a fast adaptive count data modeling and analysis method to improve the prediction accuracy and prediction speed of the model. Summary of the invention

[0003] In view of the shortcomings of the prior art, the present invention proposes a modeling method for discrete count data based on a multi-probe local sensitive hashing negative binomial regression model. The specific technical solution is as follows:

[0004] A modeling method for discrete count data based on a multi-probe local sensitive hashing negative binomial regression model, the method comprising the following steps:

[0005] Step 1: Collect count data training set for modeling: Among them, x represents the input variable, y represents the output variable of discrete counting data type, and N represents the number of data samples;

[0006] Step 2: Use local sensitive hashing technology to construct an index data structure for the training data set;

[0007] Step 3: Collect query sample x q , using a multi-probe strategy to search for x in the index data structure q K similar samples of, and build and train a local negative binomial regression model;

[0008] Step 4: Use the trained local negative binomial regression model to train the query sample x q The corresponding output is predicted.

[0009] Furthermore, the step 2 specifically includes:

[0010] Construct L hash tables, each of which is connected by a locality sensitive hash function g i (x)=(h i1 (x),…,h ij (x),…,h iM (x)) is obtained; M represents the number of hash functions; h ij (x) represents the jth locality-sensitive hash function in the i-th hash table of vector x, 1≤i≤L, 1≤j≤M; each g i (x) represents a hash value or a key, and x is stored in a specific storage area corresponding to each key, and the specific area is defined as a hash bucket; the locality sensitive hash function needs to satisfy the following properties:

[0011] If D(x i , x j )≤r, then P(h(x i )=h(x j ))≥p1 (1)

[0012] If D(x i , x j )≥cr, then P(h(x i )=h(x j ))≤p2 (2)

[0013] Among them, x i , x j are any two points in high-dimensional space; c and r are constants, c>1, p1>p2; D(x i , x j ) is a similarity measurement function based on Euclidean distance; the local sensitive hash function is a local sensitive hash function based on P-stable distribution, which is defined as follows:

[0014]

[0015] Where α is a d-dimensional random vector, each dimension of which follows a P-stable distribution; w represents the width of the hash bucket; b is a real number uniformly selected from the range [0, w]; each locality-sensitive hash function h(x) maps a d-dimensional vector x to the set of integers.

[0016] Furthermore, the step three specifically includes:

[0017] (3.1) Given a query sample x q , calculate the query sample x q The hash value g in the i-th hash table i (x q );

[0018] (3.2) Generate a detection sequence (Δ1, Δ2…, Δ k , …), where Δ k is the hash perturbation vector, Δ k =(δ1,…,δ M ), δ i ∈{-1, 0, 1};

[0019] (3.3) Calculate the query sample x q The new hash value g i (x q )+Δ k ;

[0020] (3.4) Search the hash table for the value that matches g i (x q ) and g i (x q )+Δ k The samples in the corresponding hash buckets are combined into a candidate sample set N c is the number of samples in the candidate data set;

[0021] (3.5) Further linear search is performed on the candidate data set, and finally the query sample x is obtained q The corresponding nearest neighbor data sample set K is the number of samples in the nearest neighbor dataset;

[0022] (3.6) Using the nearest neighbor dataset and its corresponding output variable A local negative binomial regression model was constructed; the negative binomial regression model assumes that the count data output variable follows a negative binomial distribution as follows:

[0023]

[0024] Among them, u f is the mean parameter, α is the dispersion coefficient, and Γ(·) represents the gamma function;

[0025] The state mean and variance of the negative binomial distribution are expressed as:

[0026] E(y f |x f )=u f (5)

[0027] Var(y f |x f )=u f (1+αu f ) (6)

[0028] The calculation formula of the negative binomial regression model is:

[0029] u f =exp(x f T β) (7)

[0030] Where β is the regression coefficient and exp(·) is the exponential function. The parameters of the negative binomial regression model are obtained by the maximum likelihood estimation method, and its log-likelihood function is expressed as:

[0031]

[0032] Among them, y f ! means y f The factorial of .

[0033] The beneficial effects of the present invention are as follows:

[0034] The present invention introduces multi-probe local sensitive hashing and just-in-time learning strategies into the discrete count data modeling framework, and constructs a fast adaptive negative binomial regression model to achieve fast adaptive update of the count data regression model. This method can overcome the defect of the traditional count data regression model's prediction performance degradation, and is suitable for industrial processes with nonlinearity and time-varying properties; in addition, the present invention improves the model prediction speed, and is suitable for processing large-scale count data and meeting the real-time requirements of prediction tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 Schematic diagram of the discrete count data modeling method based on the multi-probe local sensitive hashing negative binomial regression model. DETAILED DESCRIPTION

[0036] The present invention will be described in detail below based on the accompanying drawings and preferred embodiments, and the purpose and effects of the present invention will become more clear. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0037] like Figure 1As shown, the modeling method of discrete count data based on the multi-probe local sensitive hashing negative binomial regression model provided by the present invention specifically includes the following steps:

[0038] Step 1: Collect count data training set for modeling: Among them, x represents the input variable, y represents the output variable of discrete counting data type, and N represents the number of data samples;

[0039] Step 2: Use local sensitive hashing technology to construct an index data structure for the training data set, which is divided into the following sub-steps:

[0040] Construct L hash tables, each of which is connected by a locality sensitive hash function g i (x)=(h i1 (x),…,h ij (x),…,h iM (x)) is obtained; M represents the number of hash functions; h ij (x) represents the jth locality-sensitive hash function in the i-th hash table of vector x, 1≤i≤L, 1≤j≤M; each g i (x) represents a hash value or a key. x is stored in a specific storage area corresponding to each key. The specific area is defined as a hash bucket.

[0041] The basic idea of ​​local sensitive hashing technology is that for any two points x in high-dimensional space i , x j , the similarity measurement function is D(x i , x j ), the locality sensitive hash function needs to satisfy the following properties:

[0042] If D(x i , x j )≤r, then P(h(x i )=h(x j ))≥p1 (1)

[0043] If D(x i , x j )≥cr, then P(h(x i )=h(x j ))≤p2 (2)

[0044] Where c and r are constants, c>1 and p1>p2. The locality-sensitive hash function maps data objects in a high-dimensional data space so that objects that are close to each other (objects within a distance r) have a much higher probability of colliding than objects that are far away (objects with a distance greater than cr). Different locality-sensitive hash functions can be used for different similarity metric functions D. For Euclidean distance, the locality-sensitive hash function based on P-stable distribution is defined as follows:

[0045]

[0046] Where α is a d-dimensional random vector, each dimension of which follows a P-stable distribution; w represents the hash bucket width; b is a real number uniformly selected from the range [0, w]. Each hash function h(x) maps a d-dimensional vector x to a set of integers. The p-stable distribution used in the present invention is a Gaussian distribution, which is 2-stable and suitable for Euclidean distance.

[0047] Step 3: Collect query sample x q , using a multi-probe strategy to search for x in the index data structure q K similar samples, and construct and train a local negative binomial regression model; the step three is specifically divided into the following sub-steps:

[0048] (3.1) Given a query sample x q , calculate the query sample x q The hash value g in the i-th hash table i (x q );

[0049] (3.2) Generate a detection sequence (Δ1, Δ2…, Δ k , …), where Δ k is the hash perturbation vector, Δ k =(δ1,…,δ M ), δ i ∈{-1, 0, 1}; Multi-probe local sensitive hashing uses hash perturbation vectors to probe multiple hash buckets in the hash table.

[0050] (3.3) Calculate the query sample x q The new hash value g i (x q )+Δ k ;

[0051] g i (x q )+Δ k Points to another hash bucket in the hash table. In this way, multi-probe local sensitive hashing not only indexes g in the i-th hash table i (x q ) The samples in the corresponding hash bucket can also be indexed by g i (x q )+Δ1. By using multiple perturbation vectors, multi-probe local sensitive hashing can locate more hash buckets at one time, which are usually close to g. i (x q ) corresponding to the hash bucket, and it is likely to contain xq By probing multiple hash buckets in each hash table, the number of hash tables required by multi-probe locality sensitive hashing is significantly reduced, thereby further saving data storage space.

[0052] (3.4) Search the hash table for the value that matches g i (x q ) and g i (x q )+Δ k The samples in the corresponding hash buckets are combined into a candidate sample set N c is the number of samples in the candidate data set;

[0053] (3.5) Further linear search is performed on the candidate data set, and finally the query sample x is obtained q The corresponding nearest neighbor data sample set K is the number of samples in the nearest neighbor dataset;

[0054] Since the local sensitive hashing algorithm is an approximate search algorithm, there is a certain probability that the neighboring data is not in the search results, which will lead to a decrease in accuracy. Therefore, the present invention uses a "filtering" method to further implement a linear search on the candidate data set.

[0055] (3.6) Using the nearest neighbor dataset and its corresponding output variable A local negative binomial regression model was constructed; the negative binomial regression model assumes that the count data output variable follows a negative binomial distribution as follows:

[0056]

[0057] Among them, u f is the mean parameter, α is the dispersion coefficient, and Γ(·) represents the gamma function;

[0058] The state mean and variance of the negative binomial distribution are expressed as:

[0059] E(y f |x f )=u f (5)

[0060] Var(y f |x f )=u f (1+αu f ) (6)

[0061] The variance of the negative binomial distribution is greater than its mean, which can explain the discrete phenomenon of count data.

[0062] The calculation formula of the negative binomial regression model is:

[0063] u f =exp(x f T β) (7)

[0064] Where β is the regression coefficient and exp(·) is the exponential function. The parameters of the negative binomial regression model are obtained by the maximum likelihood estimation method, and its log-likelihood function is expressed as:

[0065]

[0066] Among them, y f ! means y f The factorial of .

[0067] Step 4: Use the trained local negative binomial regression model to train the query sample x q The corresponding output is predicted. When each new query sample arrives, steps 3 and 4 are repeated.

[0068] The effectiveness of the method of the present invention is verified by taking a specific example of a medium and thick plate rolling process. All data are collected from the medium and thick plate rolling process of a steel plant. Each piece of data contains an output variable of a counting type (the number of internal defects in the medium and thick plate) and 146 process operation variables related to the internal defects of the medium and thick plate. The process operation variables include rolling temperature, cooling temperature, heat transfer temperature, etc. The collected data are divided into a training data set, a verification data set, and a test data set. Among them, the training data set contains 80,500 samples, the verification data set contains 2,000 samples, and the test data set contains 3,000 samples. In this embodiment, the size of the candidate data set is set to N c =1000, the size of the nearest neighbor data set is set to K=100, the number of hash tables is set to L=4, the number of hash functions is set to M=20, and the number of probes is set to P=11. The prediction performance of the method of the present invention is quantitatively evaluated from the two aspects of prediction accuracy and prediction speed, wherein the prediction accuracy is evaluated by the root mean square error, and its calculation formula is as follows:

[0069]

[0070] Among them, y i is the actual observed value in the test data, is the predicted value output by the model, N t is the number of samples of the test data. The smaller the RMSE value, the more accurate the model prediction. As for the prediction speed of the model, the online prediction time of the model is used as the evaluation index. In this embodiment, the experimental environment is configured with a 2.80GHz Intel Core i7-7700HQ CPU and 16GB RAM.

[0071] Table 1 shows the advantages of the method of the present invention in terms of prediction accuracy and prediction speed. Among them, the NB (negative binomial regression model) method uses all training data to build a global prediction model; the difference between the JIT-NB method and the MLSH-NB (the method of the present invention) is that the JIT-NB method uses a linear search method to search for the nearest neighbor samples.

[0072] Table 1 Prediction accuracy and time of three different prediction models constructed using all training data

[0073]

[0074]

[0075] As can be seen from the table, the prediction accuracy of the global NB model is very poor, although the prediction speed is fast; the prediction accuracy of the JIT-NB method is the highest, but the prediction speed is very slow; in contrast, the MLSH-NB method of the present invention achieves a similar prediction accuracy as the JIT-NB method, but the prediction speed is significantly improved. Therefore, the MLSH-NB method of the present invention achieves a good balance between prediction accuracy and prediction speed.

[0076] Those skilled in the art can understand that the above are only preferred examples of the invention and are not intended to limit the invention. Although the invention is described in detail with reference to the above examples, those skilled in the art can still modify the technical solutions recorded in the above examples or replace some of the technical features therein with equivalents. Any modification, equivalent replacement, etc. made within the spirit and principle of the invention shall be included in the protection scope of the invention.

Claims

1. A modeling method for discrete count data based on a multi-probe local sensitive hashing negative binomial regression model, characterized in that: The method comprises the following steps: Step 1: Collect count data training set for modeling: Wherein, x represents the input variable, y represents the output variable of discrete counting data type, and N represents the number of data samples; the counting data is collected during the rolling process of medium and thick plates in a steel plant, and each piece of data contains an output variable of counting type and multiple process operation variables related to internal defects of medium and thick plates; the output variable is the number of internal defects of medium and thick plates; the process operation variables include rolling temperature, cooling temperature, and heat transfer temperature; Step 2: Use local sensitive hashing technology to construct an index data structure for the training data set; Step 3: Collect query sample x q , using a multi-probe strategy to search for x in the index data structure q K similar samples of , and build and train a local negative binomial regression model; Step 4: Use the trained local negative binomial regression model to train the query sample x q The corresponding output is predicted; The step 2 specifically includes: Construct L hash tables, each of which is connected by a locality sensitive hash function g i (x)=(h i1 (x),…,h ij (x),…,h iM (x)) is obtained; M represents the number of hash functions; h ij (x) represents the jth locality-sensitive hash function in the i-th hash table of vector x, 1≤i≤L,1≤j≤M; each g i (x) represents a hash value or a key, and x is stored in a specific storage area corresponding to each key, and the specific area is defined as a hash bucket; the locality sensitive hash function needs to satisfy the following properties: If D(x i ,x j )≤r, then P(h(x i )=h(x j ))≥p1 (1) If D(x i ,x j )≥cr, then P(h(x i )=h(x j ))≤p2 (2) Among them, x i ,x j are any two points in high-dimensional space; c and r are constants, c>1, p1>p2; D(x i ,x j ) is a similarity measurement function based on Euclidean distance; the local sensitive hash function is a local sensitive hash function based on P-stable distribution, which is defined as follows: Where α is a d-dimensional random vector, each dimension of which follows a P-stable distribution; w represents the hash bucket width; b is a real number uniformly selected from the range [0, w]; each locality-sensitive hash function h(x) maps a d-dimensional vector x to the set of integers; The step three specifically includes: (3.1) Given a query sample x q , calculate the query sample x q The hash value g in the i-th hash table i (x q ); (3.2) Generate the detection sequence (Δ1, Δ2…, Δ k ,…), where Δ k is the hash perturbation vector, Δ k =(δ1,…,δ M ), δ i ∈{-1,0,1}; (3.3) Calculate the query sample x q The new hash value g i (x q )+Δ k ; (3.4) Search the hash table for the value that matches g i (x q ) and g i (x q )+Δ k The samples in the corresponding hash buckets are combined into a candidate sample set N c is the number of samples in the candidate data set; (3.5) Further linear search is performed on the candidate data set, and finally the query sample x is obtained q The corresponding nearest neighbor data sample set K is the number of samples in the nearest neighbor dataset; (3.6) Using the nearest neighbor dataset and its corresponding output variable A local negative binomial regression model was constructed; the negative binomial regression model assumes that the count data output variable follows a negative binomial distribution as follows: Among them, u f is the mean parameter, α is the dispersion coefficient, and Γ(·) represents the gamma function; The state mean and variance of the negative binomial distribution are expressed as: E(y f |x f )=u f (5) Var(y f |x f )=u f (1+αu f ) (6) The calculation formula of the negative binomial regression model is: u f =exp(x f T β) (7) Where β is the regression coefficient and exp(·) is the exponential function. The parameters of the negative binomial regression model are obtained by the maximum likelihood estimation method, and its log-likelihood function is expressed as: Among them, y f ! means y f The factorial of .