Business data analysis method, device, computer equipment and storage medium
By performing data transformation and clustering of financial data, combined with maximum likelihood estimation, the problem of poor analysis results caused by zero data in financial data is solved, and the accuracy of business data analysis is improved.
Patent Information
- Application Number
- CN202411715834.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-04-04
AI Technical Summary
Financial data contains a large amount of zero data, resulting in poor regression analysis, which in turn reduces the accuracy of business data analysis.
By transforming the business data set, the probability distribution of numerical data is close to the Gaussian distribution; clustering the target data set, calculating the cluster weight of each cluster cluster; fitting the regression model corresponding to the cluster cluster, building an overall prediction model, and solving the zero-expansion problem through maximum likelihood estimation.
It improves the accuracy of business data analysis, especially in financial business data analysis, effectively solves the zero-inflation problem and improves the accuracy of model fitting.
Smart Images

Figure CN119760455A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent decision-making and financial technology, and in particular to a business data analysis method, device, computer equipment and storage medium. Background Art
[0002] With the development of science, enterprises and groups are increasingly using artificial intelligence technology to analyze data, and then guide the decision-making direction of enterprises and groups based on the analysis results.
[0003] For example, in the prior art, enterprises and groups use clustering and regression algorithms as effective data analysis tools to classify customer groups and mine patterns and structures in segmented data. However, traditional clustering and regression algorithms usually assume that data follows a Gaussian distribution, which is not effective for non-Gaussian distribution data that is common in actual situations. In particular, financial industry data usually contains a large amount of zero data, such as data on auto insurance that has not been insured. This leads to zero inflation in the data set, resulting in poor analysis results. Therefore, how to improve the accuracy of business data analysis has become an urgent problem to be solved. Summary of the invention
[0004] The present invention provides an artificial intelligence business data analysis method, device, computer equipment and storage medium to solve the technical problem that financial data contains a large amount of zero data, which makes the regression analysis effect poor and leads to poor accuracy of business data analysis.
[0005] In a first aspect, a business data analysis method is provided, comprising:
[0006] Acquire a business data set, and perform data transformation on the business data set to obtain a target data set;
[0007] Clustering the target data set to obtain clusters, and calculating the clustering weight of each cluster;
[0008] Fitting the regression model corresponding to the clusters, and constructing an overall prediction model according to the cluster weights and the regression model;
[0009] Performing maximum likelihood estimation on the overall prediction model to obtain a target prediction model;
[0010] Business analysis is performed on the business data to be analyzed according to the target prediction model to obtain a business analysis result.
[0011] In a second aspect, a business data analysis device is provided, comprising:
[0012] A data transformation module is used to obtain a business data set, perform data transformation on the business data set, and obtain a target data set;
[0013] A clustering weight calculation module, used to cluster the target data set to obtain clusters, and calculate the clustering weight of each cluster;
[0014] An overall prediction model construction module, used to fit the regression model corresponding to the clustering clusters, and to construct an overall prediction model according to the clustering weights and the regression model;
[0015] A maximum likelihood estimation module, used to perform maximum likelihood estimation on the overall prediction model to obtain a target prediction model;
[0016] The business analysis module is used to perform business analysis on the business data to be analyzed according to the target prediction model to obtain business analysis results.
[0017] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned business data analysis method when executing the computer program.
[0018] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned business data analysis method are implemented.
[0019] In the scheme implemented by the above-mentioned business data analysis method, device, computer equipment and storage medium, a business data set can be received through a client, and data transformation can be performed on the business data set to obtain a target data set; the target data set can be clustered to obtain clusters, and the clustering weights of each cluster can be calculated; the regression model corresponding to the clusters can be fitted, and an overall prediction model can be constructed based on the clustering weights and the regression model; the overall prediction model can be estimated by maximum likelihood to obtain a target prediction model; business analysis can be performed on the business data to be analyzed based on the target prediction model to obtain business analysis results. The business analysis results are fed back to the client. In the present invention, for complex insurance entities such as insurance business, by performing data transformation on the business data set, the probability distribution of data values in the numerical data set can be made close to Gaussian distribution, which can improve the accuracy of subsequent model fitting; the target data set is clustered to obtain clusters, and the clustering weights of each cluster are calculated, which can be used to weight the contributions of regression models corresponding to different clusters to obtain an overall prediction model, which can integrate the prediction results of multiple regression models to avoid the errors of a single prediction, and is conducive to improving the accuracy of business data analysis; the overall prediction model is estimated by maximum likelihood, which can effectively solve the zero inflation problem of the overall prediction model and obtain a more accurate target prediction model; business analysis is performed on the business data to be analyzed through the target prediction model, which can be well used to analyze financial business data and effectively improve the accuracy of financial business data analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0021] Figure 1 is a schematic diagram of an application environment of a business data analysis method in one embodiment of the present invention;
[0022] Figure 2 is a flow chart of a business data analysis method in one embodiment of the present invention;
[0023] Figure 3 It is a schematic diagram of a process of fitting a regression model corresponding to a cluster provided by an embodiment of the present invention;
[0024] Figure 4 is a structural diagram of a business data analysis device in one embodiment of the present invention;
[0025] Figure 5 is a schematic diagram of a structure of a computer device in one embodiment of the present invention;
[0026] Figure 6 It is another structural schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] The business data analysis method provided by the embodiment of the present invention can be applied in Figure 1In an application environment, the client communicates with the server through a network. The server can receive a business data set through the client, perform data transformation on the business data set to obtain a target data set; cluster the target data set to obtain cluster clusters, and calculate the clustering weight of each cluster cluster; fit the regression model corresponding to the cluster cluster, and build an overall prediction model based on the clustering weight and the regression model; perform maximum likelihood estimation on the overall prediction model to obtain a target prediction model; perform business analysis on the business data to be analyzed based on the target prediction model to obtain a business analysis result. Feedback the business analysis results to the client. In the present invention, for complex insurance entities such as insurance business, by transforming the business data set, the probability distribution of the data values in the numerical data set can be close to the Gaussian distribution, which can improve the accuracy of subsequent model fitting; clustering the target data set to obtain cluster clusters, and calculate the clustering weight of each cluster cluster, which can be used to weight the contribution of the regression model corresponding to different cluster clusters to obtain an overall prediction model, which can integrate the prediction results of multiple regression models to avoid the error of a single prediction, and is conducive to improving the accuracy of business data analysis; maximum likelihood estimation of the overall prediction model can effectively solve the zero expansion problem of the overall prediction model and obtain a more accurate target prediction model; business analysis of the business data to be analyzed by the target prediction model can be well used to analyze financial business data and effectively improve the accuracy of financial business data analysis. Among them, the client can be but not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices. The server can be implemented with an independent server or a server cluster composed of multiple servers. The present invention is described in detail below through specific embodiments.
[0029] See also Figure 2 As shown, Figure 2 A flow chart of a business data analysis method provided by an embodiment of the present invention includes the following steps:
[0030] S1. Acquire a business data set, and perform data transformation on the business data set to obtain a target data set.
[0031] In the embodiment of the present invention, the business data set is various business data generated by financial enterprises in the daily operation process, which can reflect the business activities, operational efficiency, market performance and financial status of the enterprise. Business data is an important basis for enterprise decision-making, and is also a key resource for enterprises to conduct data analysis, optimize business processes and improve competitiveness. For example, in the auto insurance business, the business data set can be the value of the vehicle subject to the policy (luxury car, low-end car, etc.), vehicle usage (new car, long driving mileage, etc.), basic customer information, driving behavior, etc. In the loan assessment business, the business data set can be customer information, transaction records and behavior data, etc. However, since the traditional clustering method assumes that the continuous variable obeys the Gaussian distribution, in some financial scenarios, especially in the auto insurance scenario, this assumption is often not met, which affects the effect of the clustering algorithm. Therefore, it is necessary to transform the business data set so that the probability distribution of the transformed data is close to the Gaussian distribution.
[0032] In the embodiment of the present invention, the step of performing data transformation on the business data set to obtain a target data set includes:
[0033] Identify the data type of each business data in the business data set to obtain numerical data and non-numerical data;
[0034] Numerical encoding is performed on the non-numeric data to obtain coded numerical data, and the numerical data and the coded numerical data are collected to obtain a numerical data set;
[0035] Performing logarithmic transformation on the numerical data set to obtain a target data set.
[0036] In an embodiment of the present invention, business data is divided into numerical data and non-numerical data according to the data type of each business data in the business data set, wherein the non-numerical data may include data such as categorical variables, and target encoding (Target Encoding) may be used to convert the non-numerical data into numerical data, wherein target encoding (Target Encoding) is a feature encoding technology that replaces each category of a categorical variable with the average value of a target variable, and the target encoding attempts to capture the relationship between each category and the target variable, thereby numerically encoding the non-numerical data.
[0037] Specifically, the category_encoders library can be used to implement target encoding. For example, use the TargetEncoder class (supervised encoder) and set the smoothing parameter smoothing to control the mixing ratio of the global average and the category average, and use the average value of the target variable in the calculated numerical data to replace the original category value to obtain the encoded numerical data. Among them, category_encoders is a Python library that provides a series of converters that encode categorical variables into numerical values, including One-Hot Encoding, Target Encoding, Binary Encoding, etc.
[0038] For example, in Target Encoding, the target variable to be predicted is first determined (for example, in the auto insurance business, it may be the amount of compensation or the number of accidents), and the categorical features for target encoding are selected (for example, vehicle model, customer age group, etc.), and the average value of the target variable is calculated for each category of each categorical feature. For example, if the categorical feature is "vehicle model", the average amount of compensation for each vehicle model can be calculated, and the original categorical feature can be replaced with the calculated average value. In this way, the value of each category becomes a numerical feature, representing the average value of the target variable of that category. Preferably, in order to prevent overfitting, smoothing parameters (such as Laplace smoothing or Bayesian smoothing) are usually introduced to reduce the impact of extreme values by combining the global average with the category average. During the replacement process, if some categories do not appear (i.e., missing values), it is necessary to decide how to handle these missing values, such as using the global average or the average value of a specific category.
[0039] Furthermore, logarithmic transformation is usually referred to as "log transformation". The distribution characteristics of the data are changed by taking the logarithm. Usually, the natural logarithm (base e) or common logarithm (base 10) is used to perform logarithmic transformation on each data in the numerical data set to obtain the target data set.
[0040] In an embodiment of the present invention, data transformation can be used to make the probability distribution of data values in a numerical data set close to a Gaussian distribution, thereby reducing or eliminating data heteroscedasticity, making the variance of the target data set more stable, and thereby improving the accuracy of subsequent model fitting.
[0041] S2. Clustering the target data set to obtain clusters, and calculating the clustering weight of each cluster.
[0042] In an embodiment of the present invention, data clustering is to divide the samples in the target data set into several non-overlapping subsets or "clusters" so that the samples in the same cluster are highly similar in a certain sense, while the similarity between samples in different clusters is low. Clustering identifies the natural grouping of data by analyzing the patterns in the target data set to obtain data clusters of different categories.
[0043] In the embodiment of the present invention, clustering the target data set to obtain clusters includes:
[0044] Randomly selecting a preset number of initial cluster centers from the target data set;
[0045] Performing initial data clustering on the target data set according to the initial clustering center to obtain an initial clustering cluster;
[0046] Iteratively updating the initial cluster center according to the initial cluster cluster to obtain a target cluster center;
[0047] The data distance between each target data in the target data set and the target cluster center is calculated, and the target data set is clustered according to the data distance to obtain a cluster cluster.
[0048] In an embodiment of the present invention, K initial cluster centers (centroids) can be selected as initial cluster centers, which can be data points randomly selected from the target data set. For each target data in the target data set, the distance from the target data to each cluster center is calculated, and each target data is assigned to the nearest cluster center to form K initial cluster clusters. For each initial cluster cluster, the cluster center is recalculated, usually taking the mean of all data in the initial cluster cluster as the new cluster center, and the target data set is re-clustered according to the new cluster center. The initial cluster center can then be iteratively updated until the change in the cluster center in the cluster cluster is less than a certain threshold or reaches a preset number of iterations, and the target cluster center is obtained. The target cluster center is used to assign each target data to the target cluster center with the smallest data distance, and multiple cluster clusters corresponding to the target data set are obtained.
[0049] Among them, the K value needs to be specified in advance. A suitable K value can be estimated by various methods (such as the elbow rule). The data distance from each target data to the cluster center can be calculated by Euclidean distance, Manhattan distance, Chebyshev distance, etc., so as to assign the target data to the target cluster center with the smallest data distance, and obtain the cluster cluster corresponding to each target cluster center.
[0050] In detail, the Elbow Method is a commonly used method for determining the optimal K value in K-means clustering. First, a reasonable K value range is determined, generally starting from 1 and gradually increasing until a preset maximum K value (for example, K=10) is reached. The WCSS (Within-Cluster Sum of Squares) under different K values is calculated, that is, the sum of squares of intra-cluster errors, that is, the sum of squares of distances from all sample points to the center of the cluster to which they belong, and then an elbow diagram is drawn. In the diagram, the horizontal axis represents the number of clusters K, and the vertical axis represents the corresponding WCSS value. A curve of the relationship between the K value and the WCSS is drawn, and the position where the WCSS decreases significantly slows down in the curve, that is, the point where the curve has an "elbow", is observed. This K value is considered to be the optimal number of clusters.
[0051] Furthermore, data weight is also called mixing weight or clustering weight, which reflects the proportion of data points belonging to a certain cluster in the data set and is used to calculate the relative importance of each cluster in the target data set.
[0052] In the embodiment of the present invention, the calculating of the clustering weight of each cluster includes:
[0053] Calculating the data proportion of each of the clusters in the target data set;
[0054] The clustering weights corresponding to the clustering clusters are allocated according to the data proportions.
[0055] In the embodiment of the present invention, the data ratio is the data ratio of the target data in each cluster in the target data set. For example, there are a target data in cluster 1, and there are A target data in the target data set. The ratio between a and A is the data ratio of cluster 1 in the target data set. A clustering weight is assigned to each cluster according to each data ratio so that the sum of the clustering weights is 1.
[0056] In detail, through the clustering weights, we can calculate the degree to which each target data belongs to each cluster, as well as the relative importance of the cluster in the target data set, which can be used to weight the contribution of different clusters to obtain the overall prediction result, which is conducive to improving the accuracy of subsequent business data analysis.
[0057] S3. Fitting the regression model corresponding to the clusters, and constructing an overall prediction model according to the cluster weights and the regression model.
[0058] In an embodiment of the present invention, a regression model can be used to characterize the relationship between a target variable and a feature variable in a cluster, wherein a target variable (Target Variable) is also called a dependent variable (Dependent Variable), a response variable (Response Variable) or a predicted variable (Predicted Variable), and is a variable that is desired to be predicted or explained in a business data set. For example, in a car insurance business, a target variable may be an assessment result of an accident; a feature variable (Feature Variable) is also called an independent variable (Independent Variable), an explanatory variable (Explanatory Variable) or an input variable (Input Variable), and is a variable used to predict or explain a target variable. For example, in a car insurance business, a feature variable may be vehicle value, vehicle usage, basic customer information, regional and environmental factors, insurance policy information, etc.; in a loan assessment, a feature variable may be a user's basic information, transaction records, behavioral data, and historical repayment data, etc., and a target variable may be a user's repayment ability.
[0059] Specifically, see Figure 3 As shown, the step of fitting the regression model corresponding to the cluster includes:
[0060] S31, determining the target variable and the characteristic variable in the cluster;
[0061] S32, extracting target variable data corresponding to the target variable and feature variable data corresponding to the feature variable from the cluster;
[0062] S33: Perform model training on the pre-constructed initial regression model using the target variable data and the characteristic variable data to obtain a regression model corresponding to the cluster.
[0063] In an embodiment of the present invention, the target variable and the characteristic variable in the cluster can be determined according to the specific business corresponding to the business data set, which can be pre-set. For example, when the business data set is data corresponding to house price prediction, the house price is the target variable, and the size, location, and year of construction of the house can be characteristic variables; when the business data set is data corresponding to the auto insurance business, the assessment result of the accident is the target variable, and the vehicle value, vehicle usage, basic customer information, regional and environmental factors, insurance policy information, etc. can be characteristic variables.
[0064] Furthermore, the target variable data corresponding to each target variable and the feature variable data corresponding to the feature variable are extracted in the clustering cluster, and the feature variable data and the target variable data are used as training sets to train the pre-constructed initial regression model until the loss value of the initial regression model meets the preset requirements, thereby obtaining the regression model corresponding to each clustering cluster.
[0065] In detail, the feature variable data is used as the input value of the initial regression model for model prediction, and the loss value between the model prediction value and the target variable data is calculated to evaluate the prediction accuracy of the initial regression model. The initial regression model is trained by adjusting the model parameters of the initial regression model until the loss value of the initial regression model is less than the preset loss value threshold, so as to obtain the regression model corresponding to each clustering cluster.
[0066] Among them, the regression model is a model used in statistics and machine learning to estimate the relationship between variables, especially the relationship between one or more independent variables (explanatory variables, features) and dependent variables (target variables, responses), which can be a linear regression model, a logistic regression model, a LASSO regression (Least Absolute Shrinkage and Selection Operator) model, etc. The regression model corresponding to each cluster can characterize the relationship between the target variable and the feature variable in each cluster. Therefore, the regression model can be used to predict the data in each cluster, which can effectively predict each target data and improve the accuracy of subsequent business data analysis.
[0067] Among them, linear regression is one of the most basic and widely used prediction models in statistics, which is used to establish a linear relationship between one or more independent variables (explanatory variables) and a dependent variable (target variable). Linear regression models can help us understand the relationship between variables, make predictions, and provide insights into causal relationships. Linear regression includes simple linear regression and multiple linear regression. Linear regression models are simple, intuitive, and easy to interpret. They are the cornerstone of data analysis and prediction in many fields. However, they also have limitations, such as limited ability to handle nonlinear relationships and sensitivity to outliers. Logistic regression is a classification algorithm widely used in statistics and machine learning, especially binary classification problems. Despite the name "regression", it is actually a classification model because it predicts discrete category labels. The logistic regression model uses the Sigmoid function to map the output of the linear regression model to between 0 and 1, thereby predicting the probability of an event. The logistic regression model is widely used because of its simplicity and strong interpretability. However, it also has some limitations, such as limited ability to handle nonlinear relationships and sensitivity to outliers. LASSO regression (Least Absolute Shrinkage and Selection LASSO is a widely used regression analysis method in statistics. Its core is to compress coefficients to achieve the purpose of variable selection and complexity adjustment, thereby improving the prediction accuracy and explanatory power of the model. However, when the number of variables is much larger than the number of samples, LASSO may be unstable. Therefore, according to actual business needs, a suitable initial regression function can be selected to improve the accuracy of financial business data analysis.
[0068] In an embodiment of the present invention, the overall prediction model combines the regression models of each cluster into an overall model, which can comprehensively analyze the data features of the target data in each cluster, and then perform risk assessment on the scene data to be predicted. The clustering weight can adjust the contribution of the regression model of each cluster to the overall model.
[0069] In the embodiment of the present invention, the step of constructing an overall prediction model according to the clustering weights and the regression model includes:
[0070] Determining a model weight of the regression model according to the clustering weight;
[0071] The regression models are weighted summed according to the model weights to obtain an overall prediction model.
[0072] In detail, the clustering weight of each cluster is used as the model weight of the regression model. The regression models are weighted and summed through the model weights. The regression models of each cluster can be combined to obtain the overall prediction model. Therefore, the overall prediction model can integrate the prediction results of multiple regression models, avoid the errors of a single prediction, and help improve the accuracy of business data analysis.
[0073] S4. Perform maximum likelihood estimation on the overall prediction model to obtain a target prediction model.
[0074] In an embodiment of the present invention, Maximum Likelihood Estimation (MLE) is a method used in statistics to estimate probability model parameters. The model parameters are determined by using the parameter values that maximize the probability of occurrence of observed data (likelihood function). The model parameters corresponding to the overall prediction model when the business data analysis is most accurate can be obtained through maximum likelihood estimation.
[0075] In detail, the goal of maximum likelihood estimation is to find the model parameter values that maximize the likelihood function (or log-likelihood function) to obtain a more accurate target prediction model.
[0076] In the embodiment of the present invention, performing maximum likelihood estimation on the overall prediction model to obtain a target prediction model includes:
[0077] Calculating the Poisson distribution parameter of each characteristic variable in the cluster, and constructing the conditional probability function of each cluster according to the Poisson distribution parameter;
[0078] constructing an overall likelihood function based on the conditional probability function;
[0079] Perform parameter estimation according to the overall likelihood function to obtain target model parameters;
[0080] The target model parameters are used to optimize the parameters of the overall prediction model to obtain a target prediction model.
[0081] In the embodiment of the present invention, the Poisson distribution parameter is a discrete probability distribution used to describe the number of random events that occur within a fixed time or space interval. In scenarios such as auto insurance claim prediction, there are a large number of zero values in the target variable (i.e., the number of accidents), which may lead to a decrease in the effectiveness of the regression model. The zero inflation problem can be effectively solved by changing the conditional probability distribution of the target variable to a zero-inflated Poisson distribution, thereby improving the accuracy of overall prediction model parameter optimization.
[0082] In detail, the conditional probability function can be expressed as:
[0083]
[0084] Among them, P ( y i =0|X i ,k ) Indicates the given i-th feature variable X in the k-th cluster i When the target variable y i The conditional probability density of 0, π k Represents the target variable y in the kth cluster i The probability of λ being 0 k is the Poise distribution parameter of the kth cluster, P ( y i ≠0|X i ,k ) Represents the given feature variable X in the kth cluster i The target variable y i The conditional probability density is not zero.
[0085] Preferably, the present invention uses zero-inflated Poisson distribution as the conditional probability function, which can effectively solve the zero-inflated problem of the overall prediction model, thereby improving the prediction accuracy of the overall prediction model, wherein the conditional probability density function describes the characteristic variable value X i The conditional probability distribution of the target variable taking a specific value under the condition that , is often used to describe the probability of an event under specific conditions.
[0086] Furthermore, the overall likelihood function is as follows:
[0087]
[0088] Among them, L represents the overall likelihood function, X i represents the i-th feature variable, n represents the total number of feature variables, w k represents the clustering weight corresponding to the kth cluster, K represents the total number of clusters, P k represents the conditional probability function corresponding to the kth cluster, g k( X i |θ k) Indicates the given i-th feature variable X in the k-th cluster i The corresponding probability density function, θ k Represents the set of model parameters in the regression model corresponding to the kth cluster.
[0089] Among them, the probability density function (PDF) is the probability distribution of a random variable taking a specific value, that is, the characteristic variable X i The probability distribution in the cluster describes the absolute probability distribution of the random variable, θ kIt represents the set of model parameters in the regression model corresponding to the k-th cluster, such as clustering weights, regression coefficients, and distribution parameters of characteristic variables. By performing maximum likelihood estimation on the overall likelihood function, the model parameter values corresponding to the optimal prediction of the overall prediction model can be calculated to obtain a more accurate target prediction model.
[0090] In detail, the goal of parameter estimation is to find the model parameter values that maximize the overall likelihood function, which is usually achieved by taking the derivative and setting the derivative to zero. However, in some cases, the analytical solution to parameter estimation may not exist or be difficult to solve. In this case, numerical optimization methods such as gradient descent and Newton-Raphson method can be used to obtain the target model parameters. The target model parameters are used to replace the model parameters in the overall prediction model to optimize the parameters and obtain the target prediction model.
[0091] For example, directly maximizing the overall likelihood function may encounter problems such as non-convexity and no analytical solution. At this time, numerical optimization methods such as gradient ascent, Newton's method, quasi-Newton's method or modern optimization algorithms (such as L-BFGS, Adam, etc.) can be used to iteratively find the model parameter values that maximize the overall likelihood function. After obtaining the maximum likelihood estimated parameters, they need to be evaluated, such as calculating the prediction error, cross-validation, etc., to ensure that the selected parameters can effectively fit the data and have good generalization ability.
[0092] In the embodiment of the present invention, by performing maximum likelihood estimation on the overall prediction model, the zero inflation problem of the overall prediction model can be effectively solved, a more accurate target prediction model can be obtained, and the accuracy of the analysis of the financial business data to be predicted can be further improved.
[0093] S5. Perform business analysis on the business data to be analyzed according to the target prediction model to obtain a business analysis result.
[0094] In an embodiment of the present invention, the business data to be analyzed is data that needs to be analyzed in the financial industry. For example, the business data corresponding to the prediction of auto insurance claims may be vehicle value, vehicle usage, basic customer information, regional and environmental factors, insurance policy information, etc. Through business analysis, the number of auto insurance claims that the customer may encounter and the amount of auto insurance claims, etc. can be predicted.
[0095] In the embodiment of the present invention, performing business analysis on the business data to be analyzed according to the target prediction model to obtain the business analysis result includes:
[0096] Performing data conversion on the business data to be analyzed to obtain target business data;
[0097] The target prediction model is used to perform regression prediction on the target business data to obtain a business analysis result.
[0098] In an embodiment of the present invention, data conversion is to convert the business data to be analyzed into the data format of the target prediction model input. For example, the category data in the business data to be analyzed is converted into numerical data, and the converted numerical data is preprocessed to obtain more accurate target business data. The accuracy of the input data can be guaranteed, and the target business data is regressed through the target prediction model to obtain the corresponding business analysis results.
[0099] Furthermore, in the financial business corresponding to the financial scenario, the application of business data analysis on the business data to be analyzed is very extensive. For example, in financial institutions, the business data to be analyzed can be customer information, transaction records and behavioral data, etc., which are used to assess loan risks and improve loan approval rates and returns. For example, through big data technology, financial institutions can incorporate information such as users' social networks and shopping habits into the evaluation system, so as to more accurately judge users' repayment ability, obtain business analysis results, and reduce risks; in risk management, market data, credit reports, financial statements and other information can be used as business data to be analyzed, which can more accurately assess risk exposure, adjust investment portfolios and risk control measures. For example, a policy-based insurance company uses financial technology to improve its business portfolio management capabilities, monitors and dynamically adjusts business rules in combination with external economic environment factors, improves business management efficiency, and identifies potential financial risks. When scoring users' credit, financial institutions can analyze customers' historical transaction records, credit records, and business data waiting to be analyzed to predict customers' credit risks, thereby helping to better manage credit risks. At the same time, the business analysis results can also be the corresponding number of accidents, amount of auto insurance, etc. For example, once a customer corresponding to the scenario data to be predicted has an accident, it can be used to accurately predict the number of accidents and the amount of auto insurance that needs to be paid. By performing business analysis on the business data to be analyzed through a more accurate target prediction model, the accuracy of financial business analysis can be effectively improved, and accurate business data analysis in financial scenarios can be achieved.
[0100] It can be seen that in the above scheme, for complex insurance entities such as insurance business, by transforming the business data set, the probability distribution of data values in the numerical data set can be made close to the Gaussian distribution, which can improve the accuracy of subsequent model fitting; clustering the target data set to obtain clusters, and calculating the clustering weight of each cluster, which can be used to weight the contribution of the regression models corresponding to different clusters to obtain the overall prediction model, which can integrate the prediction results of multiple regression models to avoid the error of a single prediction, and is conducive to improving the accuracy of business data analysis; maximum likelihood estimation of the overall prediction model can effectively solve the zero expansion problem of the overall prediction model and obtain a more accurate target prediction model; business analysis of the business data to be analyzed through the target prediction model can be well used to analyze financial business data and effectively improve the accuracy of financial business data analysis.
[0101] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0102] In one embodiment, a business data analysis device is provided, which corresponds one-to-one to the business data analysis method in the above embodiment. Figure 4 As shown, the business data analysis device 400 includes a data transformation module 401, a clustering weight calculation module 402, an overall prediction model construction module 403, a maximum likelihood estimation module 404 and a business analysis module 405. The functional modules are described in detail as follows:
[0103] The data transformation module 401 is used to obtain a business data set, perform data transformation on the business data set, and obtain a target data set;
[0104] A clustering weight calculation module 402 is used to cluster the target data set to obtain clusters and calculate the clustering weight of each cluster;
[0105] An overall prediction model building module 403 is used to fit the regression model corresponding to the clusters, and build an overall prediction model according to the cluster weights and the regression model;
[0106] A maximum likelihood estimation module 404 is used to perform maximum likelihood estimation on the overall prediction model to obtain a target prediction model;
[0107] The business analysis module 405 is used to perform business analysis on the business data to be analyzed according to the target prediction model to obtain business analysis results.
[0108] In one embodiment, the data transformation module 401, when performing data transformation on the business data set to obtain the target data set, is used to:
[0109] Identify the data type of each business data in the business data set to obtain numerical data and non-numerical data;
[0110] Numerical encoding is performed on the non-numeric data to obtain coded numerical data, and the numerical data and the coded numerical data are collected to obtain a numerical data set;
[0111] Performing logarithmic transformation on the numerical data set to obtain a target data set.
[0112] In one embodiment, the clustering weight calculation module 402, when clustering the target data set to obtain cluster clusters, is used to:
[0113] Randomly selecting a preset number of initial cluster centers from the target data set;
[0114] Performing initial data clustering on the target data set according to the initial clustering center to obtain an initial clustering cluster;
[0115] Iteratively updating the initial cluster center according to the initial cluster cluster to obtain a target cluster center;
[0116] The data distance between each target data in the target data set and the target cluster center is calculated, and the target data set is clustered according to the data distance to obtain a cluster cluster.
[0117] In one embodiment, the overall prediction model building module 403, when performing the fitting of the regression model corresponding to the cluster cluster, is used to:
[0118] Determining the target variable and the characteristic variable in the cluster;
[0119] Extracting target variable data corresponding to the target variable and feature variable data corresponding to the feature variable from the cluster;
[0120] The target variable data and the characteristic variable data are used to perform model training on the pre-constructed initial regression model to obtain the regression model corresponding to the cluster.
[0121] In one embodiment, the overall prediction model construction module 403, when executing the construction of the overall prediction model according to the clustering weights and the regression model, is used to:
[0122] Determining a model weight of the regression model according to the clustering weight;
[0123] The regression models are weighted summed according to the model weights to obtain an overall prediction model.
[0124] In one embodiment, the maximum likelihood estimation module 404, when performing maximum likelihood estimation on the overall prediction model to obtain a target prediction model, is used to:
[0125] Calculating the Poisson distribution parameter of each characteristic variable in the cluster, and constructing the conditional probability function of each cluster according to the Poisson distribution parameter;
[0126] constructing an overall likelihood function based on the conditional probability function;
[0127] Perform parameter estimation according to the overall likelihood function to obtain target model parameters;
[0128] The target model parameters are used to optimize the parameters of the overall prediction model to obtain a target prediction model.
[0129] In one embodiment, the business analysis module 405, when performing business analysis on the business data to be analyzed according to the target prediction model to obtain the business analysis result, is used to:
[0130] Performing data conversion on the business data to be analyzed to obtain target business data;
[0131] The target prediction model is used to perform regression prediction on the target business data to obtain a business analysis result.
[0132] The present invention provides a business data analysis device, which can make the probability distribution of data values in a numerical data set close to a Gaussian distribution by performing data transformation on a business data set, thereby improving the accuracy of subsequent model fitting; clustering is performed on a target data set to obtain clustering clusters, and the clustering weight of each clustering cluster is calculated, which can be used to weight the contribution of regression models corresponding to different clustering clusters to obtain an overall prediction model, which can integrate the prediction results of multiple regression models to avoid the error of a single prediction, and is conducive to improving the accuracy of business data analysis; maximum likelihood estimation is performed on the overall prediction model, which can effectively solve the zero inflation problem of the overall prediction model and obtain a more accurate target prediction model; business analysis is performed on the business data to be analyzed through the target prediction model, which can be well used to analyze financial business data and effectively improve the accuracy of financial business data analysis.
[0133] For the specific limitations of the business data analysis device, please refer to the limitations of the business data analysis method above, which will not be repeated here. Each module in the above-mentioned business data analysis device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0134] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, it implements the functions or steps on the service side of a business data analysis method.
[0135] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the functions or steps of the client side of a business data analysis method
[0136] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0137] Acquire a business data set, and perform data transformation on the business data set to obtain a target data set;
[0138] Clustering the target data set to obtain clusters, and calculating the clustering weight of each cluster;
[0139] Fitting the regression model corresponding to the clusters, and constructing an overall prediction model according to the cluster weights and the regression model;
[0140] Performing maximum likelihood estimation on the overall prediction model to obtain a target prediction model;
[0141] Business analysis is performed on the business data to be analyzed according to the target prediction model to obtain a business analysis result.
[0142] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0143] Acquire a business data set, and perform data transformation on the business data set to obtain a target data set;
[0144] Clustering the target data set to obtain clusters, and calculating the clustering weight of each cluster;
[0145] Fitting the regression model corresponding to the clusters, and constructing an overall prediction model according to the cluster weights and the regression model;
[0146] Performing maximum likelihood estimation on the overall prediction model to obtain a target prediction model;
[0147] Business analysis is performed on the business data to be analyzed according to the target prediction model to obtain a business analysis result.
[0148] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0149] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0150] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0151] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
[0152] It should be noted that if software tools or components other than those of our company appear in the embodiments of the present application, they are only used for illustrative purposes and do not represent actual use.
Claims
1. A business data analysis method, characterized in that: include: Acquire a business data set, and perform data transformation on the business data set to obtain a target data set; Clustering the target data set to obtain clusters, and calculating the clustering weight of each cluster; Fitting the regression model corresponding to the clusters, and constructing an overall prediction model according to the cluster weights and the regression model; Performing maximum likelihood estimation on the overall prediction model to obtain a target prediction model; Business analysis is performed on the business data to be analyzed according to the target prediction model to obtain a business analysis result.
2. The business data analysis method according to claim 1, characterized in that: The step of performing data transformation on the business data set to obtain a target data set includes: Identify the data type of each business data in the business data set to obtain numerical data and non-numerical data; Numerical encoding is performed on the non-numeric data to obtain coded numerical data, and the numerical data and the coded numerical data are collected to obtain a numerical data set; Performing logarithmic transformation on the numerical data set to obtain a target data set.
3. The business data analysis method according to claim 1, characterized in that: The clustering of the target data set to obtain clusters includes: Randomly selecting a preset number of initial cluster centers from the target data set; Performing initial data clustering on the target data set according to the initial clustering center to obtain an initial clustering cluster; Iteratively updating the initial cluster center according to the initial cluster cluster to obtain a target cluster center; The data distance between each target data in the target data set and the target cluster center is calculated, and the target data set is clustered according to the data distance to obtain a cluster cluster.
4. The business data analysis method according to claim 1, characterized in that: The step of fitting the regression model corresponding to the cluster comprises: Determining the target variable and the characteristic variable in the cluster; Extracting target variable data corresponding to the target variable and feature variable data corresponding to the feature variable from the cluster; The target variable data and the characteristic variable data are used to perform model training on the pre-constructed initial regression model to obtain the regression model corresponding to the cluster.
5. The business data analysis method according to claim 1, characterized in that: The constructing of an overall prediction model according to the clustering weights and the regression model comprises: Determining a model weight of the regression model according to the clustering weight; The regression models are weighted summed according to the model weights to obtain an overall prediction model.
6. The business data analysis method according to claim 1, characterized in that: The performing maximum likelihood estimation on the overall prediction model to obtain a target prediction model includes: Calculating the Poisson distribution parameter of each characteristic variable in the cluster, and constructing the conditional probability function of each cluster according to the Poisson distribution parameter; constructing an overall likelihood function based on the conditional probability function; Perform parameter estimation according to the overall likelihood function to obtain target model parameters; The target model parameters are used to optimize the parameters of the overall prediction model to obtain a target prediction model.
7. The business data analysis method according to claim 1, characterized in that: The performing business analysis on the business data to be analyzed according to the target prediction model to obtain the business analysis result includes: Performing data conversion on the business data to be analyzed to obtain target business data; The target prediction model is used to perform regression prediction on the target business data to obtain a business analysis result.
8. A business data analysis device, characterized in that: include: A data transformation module is used to obtain a business data set, perform data transformation on the business data set, and obtain a target data set; A clustering weight calculation module, used to cluster the target data set to obtain clusters, and calculate the clustering weight of each cluster; An overall prediction model construction module, used to fit the regression model corresponding to the clustering clusters, and to construct an overall prediction model according to the clustering weights and the regression model; A maximum likelihood estimation module, used to perform maximum likelihood estimation on the overall prediction model to obtain a target prediction model; The business analysis module is used to perform business analysis on the business data to be analyzed according to the target prediction model to obtain business analysis results.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the business data analysis method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the business data analysis method according to any one of claims 1 to 7 is implemented.