Coal multimodal transport interpretable customer portrait construction method under single system
Through causal discovery, mixed clustering and interpretable model technology, key variables of coal multimodal customers are identified and customer portraits are constructed, which solves the problem of insufficient interpretability in the existing methods, and realizes the accurate portrayal of customer behavior and scientific support of service strategies.
Patent Information
- Application Number
- CN202511046194.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-29
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2045-07-29
AI Technical Summary
The existing coal multimodal customer portrait methods lack interpretability and are difficult to identify customer demand characteristics, resulting in insufficient service accuracy, and the existing models are easily disturbed by confusing variables, reducing the scientificity and interpretability of strategy formulation.
The causal discovery method is used to identify key variables, combine k-prototype mixed clustering and LightGBM model, and interpret and analyze them through SHAP theory to build a highly interpretable customer portrait.
It improves the interpretability and accuracy of the coal multimodal transport customer portraits, can accurately describe the reasons for customer behavior, and improves the scientificity of service strategies and business implementation.
Smart Images

Figure CN120561700A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of intelligent transportation system planning and industrial artificial intelligence, and specifically relates to a method for constructing an explainable customer profile for coal multimodal transport under a one-order system, and is particularly suitable for customer classification of one-order services in coal multimodal transport scenarios. Background Art
[0002] Coal transportation is transitioning from a single mode of transport to multimodal transport models, such as rail-water and road-rail. The single-bill model uses a single bill of lading to ensure a single order, payment, and delivery. However, customer needs vary significantly, making it impossible to accurately identify the specific needs of coal customers and ensure precise customer service.
[0003] Customer profiling (user profiling) is the process of describing or classifying individual customer characteristics. The application of customer profiling involves multiple research directions, but existing research lacks research on coal customer profiling under the "single-bill system". As an efficient and environmentally friendly transportation mode, the customer needs of "single-bill system" coal intermodal transport are uniquely complex and diverse, and existing research results are difficult to directly apply.
[0004] Existing studies, such as "Power User Behavior Profiling Based on Information Gain and Spearman Correlation Coefficient" published by Wang Yuanyuan et al. in the April 2022 issue of Electric Power Engineering Technology, proposed a power user behavior profiling method based on information gain and Spearman correlation coefficient. This method can perform efficient cluster analysis on power user electricity consumption data. Taking into account the information gain of features and the redundancy between features, a feature set adaptability evaluation coefficient is constructed to select the optimal feature set; the optimal feature set is solved efficiently and quickly through GA, and the power consumption characteristics of power users are characterized based on the optimal feature set. For example, "Research on Airline Customer Clustering Based on Improved Silhouette Coefficient Method" published by Ma Xin et al. in the January 2021 issue of Operations Research and Management, calculates the Pearson correlation coefficient between attributes to draw a heat map, judges the linear correlation between attributes, and uses random forest to analyze the original data and calculate the weight of each attribute as a supplement to the variables selected for the heat map. Feature screening is achieved through the above method.
[0005] The customer profiling methods used in these studies often construct feature systems based on statistical correlations between variables. However, correlations only reflect superficial covariation between variables and fail to distinguish between driving factors and confounding influences in causal mechanisms. For example, transport distance and intermodal mode selection may produce a spurious correlation through transport costs rather than a direct causal effect. This limitation makes profiling models susceptible to confounding variables, making it difficult to reveal the true drivers of customer behavior and decision-making, thereby reducing the scientific nature and interpretability of policy formulation.
[0006] Another example of existing research is Chinese patent CN118212034A, which discloses "A Personalized Recommendation Method Based on User Portraits of E-commerce Data." This method proposes a personalized recommendation method based on user portraits of e-commerce data. This method uses the XGBoost method to perform classification prediction based on the characteristics of the constructed comprehensive user portraits, predicting items that the user may be interested in. Zhou Haixia et al., in their article "Research on a Dynamic Comprehensive Quality Profiling Method for Small and Medium-sized Enterprises Based on BO-XGBoost," published in the March 2024 issue of Information Science, proposed a Bayesian-optimized XGBoost model portrait label classification algorithm. This algorithm automatically extracts and dynamically updates the labels for the comprehensive quality portraits of small and medium-sized enterprises. The label classification accuracy of the dynamic comprehensive quality profiling method based on BO-XGBoost reached 95.71%, demonstrating excellent overall model performance.
[0007] The model used in the aforementioned study achieved high predictive accuracy, but neglected the crucial factor of model interpretability. In real-world applications, particularly in the coal intermodal transport industry, a purely high-accuracy black-box model can't provide a deep understanding of the underlying logic behind customer behavior. Therefore, introducing tools that improve model interpretability is crucial. Summary of the Invention
[0008] In view of the above problems, the purpose of the present invention is to provide a method for constructing an interpretable customer portrait for multimodal transport of coal under a single-order system, and use the causal discovery method to identify the key variables that affect the customer's choice of intermodal transport mode; further apply the clustering algorithm to group the customers, so as to construct a preliminary customer portrait; then, test the portrait accuracy by training the LightGBM model to ensure the accuracy of the portrait; finally, combine the SHAP theory to conduct an in-depth analysis of the constructed customer portrait, clearly explain the influence mechanism of each feature on customer classification, and improve the interpretability of the coal customer portrait.
[0009] The method for constructing an explainable customer profile for coal multimodal transport under a single-order system provided by the present invention includes the following steps: A. Obtain customer coal intermodal transport mode selection questionnaires and historical coal multimodal transport waybill data under the single-bill system, and perform data processing and data integration; B. Use the causal discovery FCI algorithm to construct a causal graph, screen out characteristic variables that have a causal relationship with the customer's choice of intermodal mode, and eliminate spurious correlation features; C. Use k-prototype hybrid clustering method to cluster and obtain customer categories; D. Train the LightGBM classification model to predict the customer category, test the accuracy of the portrait, and use the SHAP interpretable analysis method to describe the customer portrait.
[0010] As the preferred embodiment of the present invention, step A also includes the following steps: A1. Obtain historical coal single-bill shipping data, develop a customer survey questionnaire on coal intermodal transport mode selection, distribute the questionnaire to coal customers, and collect their responses. A2. Process the waybill and questionnaire data, filter and delete duplicate records, supplement missing values, and correct outliers. After processing, a structured waybill dataset is obtained. Coal waybill data for all customers, is the number of coal customers, is the collection of all coal waybill data attributes, is the total number of attributes of each coal waybill data, For the Coal waybill data, waybill data The The data is represented as , each questionnaire response result is taken as a sample, the results in each sample are numbered respectively, and all the numbered sample data are summarized to obtain the summary data; A3. Data fusion: Associating the questionnaire with the waybill data through a unique identifier or fuzzy matching. The time when the questionnaire is completed is consistent with the recording period of the waybill data.
[0011] As the preferred embodiment of the present invention, step B also includes the following steps: B1. Data Preparation: Collect data related to coal customers' choice of intermodal transport methods from the questionnaire survey results. The categorical variables in the data include: coal characteristics consisting of type and quantity; transportation factors consisting of transportation distance, transportation time, and transportation cost; and customer information consisting of enterprise size and transportation frequency. Encode the categorical variables in the data for use in the FCI algorithm calculation.
[0012] As the preferred embodiment of the present invention, step B also includes the following steps: B2, FCI algorithm execution; B2.1. Assume that the target variable is the intermodal mode , is the number of intermodal transport modes, and the set of all coal waybill data attributes is the candidate feature set A variable containing all the waybill data attributes in the questionnaire; B2.2. Construct a complete graph. Consider all variables in the waybill data as nodes and construct a completely undirected graph. This means that all nodes are connected by edges, but the edges have no direction and only indicate the association between the variables. B2.3, conditional independence test, partial correlation coefficient test for continuous variables, if the given variable Under the condition of and intermodal transport direct correlation, according to 、 and Pearson correlation coefficient between two pairs 、 、 calculate and In no Partial correlation coefficient under the influence of ; ; ; If the partial correlation coefficient Not significant, indicating that the test variable and intermodal transport There is no direct causal relationship between the selection and the correlation between the given variables lead to; For discrete variables, chi-square test is performed to test the variables and intermodal transport Whether it is independent, calculate the expected frequency ,in, Indicates the The number of samples of each coal type, Indicates the The number of samples of intermodal transport mode, the number of coal customers That is, it is expressed as the total sample size; ; Combined with The coal type is The number of samples of intermodal transport modes , calculate the chi-square statistic ; ; Calculating degrees of freedom , find the probability under the chi-square test Value, if If the value is less than the significance level, the null hypothesis is rejected and the test variable is considered Not independent, with intermodal transport Related; B2.4. Deletion and retention of edges: Delete given variables based on the results of the conditional independence test. Independent test variables and intermodal transport The edges between them give a sparse undirected graph. The edges in the undirected graph indicate that there is a direct causal relationship between the variables. B2.5. Determine some directed edges and determine the direction of some edges through further conditional independence test. If the test variable and given variables There is an edge between them, and given a new variable Under the condition of For a given variable Has an impact, but given the variable Test variables No effect, remove the edge from the test variable Points to a given variable , and obtain a partial directed graph; B2.6. Determine the remaining undirected edges using pre-set rules. The pre-set rules include collision structure rules and directional propagation rules. Collision structure rules, if there are three variables 、 、 The path is represented as ,symbol represents an undirected edge, and and Not adjacent, that is, no direct connection edge, when controlling other variables hour, and Independent, controlled variables hour, and Related, then is the collision node, and the path is the collision structure, which is expressed as , where the symbol and represents a directed edge; Directional propagation rules, if there is a directed path ,and and If not adjacent, the orientation is ; B2.7. Latent variable processing: For each latent variable, add a virtual edge to represent its influence on the observed variable. Update the graph structure and distinguish between real edges and virtual edges. Real edges represent the causal relationship between observations, while virtual edges represent the influence of latent variables. B2.8. Construct a causal relationship diagram. Repeat steps B2.3 to B2.7, using conditional independence tests and pre-set rules to determine the directions of more edges until no more directions can be determined. The result is a directed acyclic graph.
[0013] As the preferred embodiment of the present invention, step B also includes the following steps: B3. Identification and analysis of key variables; B3.1. Identify key variables. In the directed acyclic graph obtained in step B2, variables that have direct or indirect directed edges connected to the intermodal mode selection node are key variables that have a causal relationship with the coal customer's intermodal mode selection. Based on the causal relationship graph, retain the feature variables that have a direct or indirect causal relationship with the intermodal mode selection node, and remove the variables that have no causal relationship with the intermodal mode selection node, thereby eliminating spurious correlation features. B3.2. Causal relationship analysis: Analyze the causal relationship between key variables and intermodal transport mode selection based on the direction and path of directed edges; B3.3. Result verification and interpretation: Compare and verify the results obtained by the FCI algorithm with those obtained by manual verification to ensure the rationality and interpretability of the results.
[0014] As the preferred embodiment of the present invention, step C also includes the following steps: C1. Based on the results of key variable screening in step B, Extract the required data and input the mixed data set after causal relationship selection, where the mixed data set includes numerical features and categorical features; C2, determine the optimal number of clusters K by silhouette coefficient; C2.1. Traversing different numbers of clusters Value, calculate the distance between any two customer samples In the k-prototype clustering method, Euclidean distance is used when the attribute is a numerical feature. , use the maximum and minimum normalization method to map the numerical features to the [0,1] interval, and then calculate the Euclidean distance of the numerical features ; ; Where, is the number of clusters When, Customer's The standardized value of the attribute, is the number of clusters When, Customer's The standardized value of each attribute; Hamming distance is used when the attribute is a categorical feature , retain the original encoding of the category features. If the category attributes of two customers are different, the Hamming distance is 1, and 0 if they are the same; ; Where, is the number of clusters When, Customer's The value of the attribute mapping, is the number of clusters When, Customer's The value of the attribute mapping, is the ordinal number of the total number of attributes; The distance between two customer samples , is the weight factor of the classification attribute; C2.2. Traversing different numbers of clusters Value, calculate the corresponding silhouette coefficient according to the distance between each customer sample obtained; ; ; Where, is the cohesion, indicating customer points The mean of the distances to other customer points in the cluster, is the separation degree, which represents the mean of all customer points in other clusters closest to the cluster to which it belongs. Points for customers The silhouette coefficient, is the global silhouette coefficient; C2.3. Comparison of different numbers of clusters Global silhouette coefficient at value , select the one with the largest global silhouette coefficient The value is taken as the optimal number of clusters K; C3. Based on the determined K clusters of customer categories, extract the typical features of each cluster to form customer grouping labels. Extract the statistical distribution of each cluster's features to define customer labels that are understandable to the business.
[0015] As the preferred embodiment of the present invention, step D also includes the following steps: D1. Set the target variable to the customer cluster label generated by the k-prototype clustering method for The index of the cluster, the input feature is the key variable obtained in step B, all the waybill data Divide the dataset into training and test datasets in a ratio of 7:3 and train the LightGBM model. D2. Select weighted average To evaluate the accuracy of customer portraits and verify the accuracy of portraits; ; Where, For the The number of customer samples in a cluster, Expressed as the number of coal customers, i.e. the total sample size, For the Client's Fraction; D3. Use the SHAP interpretable analysis method to interpret the constructed LightGBM model, combine the feature density bee swarm diagram and feature impact waterfall diagram to explain the classification model prediction results, and analyze the characteristics of different categories of customer portraits. The SHAP value calculation method is as follows ; Where, is the model benchmark value, which is the average prediction value of the LightGBM model on the training set. Characterized by For samples The contribution of SHAP values, feature density bee swarm plots, and feature influence waterfall plots are visualization results of the SHAP interpretable analysis method; The SHAP value is used as the feature importance to sort the features and identify the features that have the greatest impact on customer classification.
[0016] The beneficial effects of the present invention are as follows: 1. This invention provides a new solution for customer segmentation by integrating causal discovery, hybrid clustering, and interpretable model technologies. The causal feature screening process based on the FCI algorithm breaks through the limitations of traditional correlation analysis. It combines questionnaire survey results with actual waybill data to identify key variables that have a causal relationship with customer selection behavior, thereby improving the business explanatory power of the features. Combining the LightGBM classification model with SHAP interpretable analysis improves the interpretability of customer portraits. It provides scientific and practical decision-making support for the precise classification of coal multimodal transport customers and the optimization of the "one-order" service strategy.
[0017] 2. This invention accurately characterizes the reasons behind customer behavior, improving the interpretability of the profile. Using the FCI algorithm from causal discovery, the key variables influencing coal customers' choice of intermodal transport mode are mined from multi-source data, including questionnaires and intermodal waybills. A causal diagram is then created to identify the core variables that truly drive customer choices. The core variables mined through the causal diagram accurately depict the driving logic behind customer decisions, making the profile model mechanistically interpretable.
[0018] 3. This paper combines LightGBM with SHAP to construct customer profiles for coal intermodal transport. With its efficient hybrid feature processing capabilities, LightGBM can efficiently integrate complex and diverse numerical features in coal intermodal transport scenarios, such as transportation volume and transportation costs, as well as categorical features such as customer type and coal type. Through fine parameter tuning, it achieves high classification accuracy and verifies the accuracy of the profile. On this basis, SHAP interpretability analysis is introduced to accurately identify the core factors affecting customer classification with the help of SHAP values, and a visual explanation of the prediction model is performed based on SHAP. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] By referring to the following description in conjunction with the accompanying drawings, and with a more complete understanding of the present invention, other objects and results of the present invention will become more clear and easy to understand. In the accompanying drawings: Figure 1 It is the technical roadmap of the present invention; Figure 2 It is the logical roadmap of the present invention. DETAILED DESCRIPTION
[0020] See Figure 1-2 The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0021] An embodiment of the present invention provides a method for constructing an explainable customer profile for coal multimodal transport under a single-order system, comprising the following steps: A. Obtain customer coal intermodal transport mode selection questionnaires and historical coal multimodal transport waybill data under the single-bill system, and perform data processing and data integration; A1. Obtain historical coal single-bill shipping data, develop a customer survey questionnaire on coal intermodal transport mode selection, distribute the questionnaire to coal customers, and collect their responses. A2. Process the waybill and questionnaire data, filter and delete duplicate records, supplement missing values, and correct outliers. After processing, a structured waybill dataset is obtained. Coal waybill data for all customers, is the number of coal customers (i.e. the number of coal waybill data items), is the collection of all coal waybill data attributes, is the total number of attributes of each coal waybill data, For the Coal waybill data, waybill data The The data is represented as ,Each questionnaire response result is taken as a sample, the results in each sample are numbered (the parameter options are converted into numerical values), and all the sample data after numbering are summarized to obtain summary data; A3. Data fusion: Linking the questionnaire with the waybill data through a unique identifier (such as the enterprise's unified social credit code) or fuzzy matching (enterprise name + geographic location). The questionnaire completion time must be consistent with the waybill data recording period. B. Use the Fast Causal Inference (FCI) algorithm to construct a causal graph, identify characteristic variables that have a causal relationship with customers' choice of intermodal transport mode, and eliminate spurious correlation features. B1. Data preparation: Collect data related to coal customers' choice of intermodal transport methods from the questionnaire survey results. The categorical variables in the data include: coal characteristics consisting of type and quantity, transportation factors consisting of transportation distance, transportation time, and transportation cost, and customer information consisting of enterprise size and transportation frequency. Encode the categorical variables in the data for use in the calculation of the FCI algorithm. For example, for categorical variables such as coal type and customer enterprise type, methods such as one-hot encoding can be used to convert them into numerical variables.
[0022] B2, FCI algorithm execution; B2.1. Assume that the target variable is the intermodal mode , is the number of intermodal transport modes, and the set of all coal waybill data attributes is the candidate feature set Variables containing all the waybill data attributes in the questionnaire (such as transportation cost, distance, coal type, etc.); B2.2. Construct a complete graph. Consider all variables in the waybill data as nodes and construct a completely undirected graph. This means that all nodes are connected by edges, but the edges have no direction and only indicate the association between the variables. B2.3, conditional independence test, partial correlation coefficient test for continuous variables, if the given variable (such as transportation distance), test variables (such as transportation costs) and intermodal transport methods direct correlation, according to 、 and Pearson correlation coefficient between two pairs 、 、 calculate and In no Partial correlation coefficient under the influence of ; ; ; If the partial correlation coefficient Not significant (such as probability The value is greater than the significance level of 0.05), indicating that the test variable and intermodal transport There is no direct causal relationship between the selection and the correlation between the given variables As a result, the indirect impact of transportation distance on both is excluded (for example, the longer the transportation distance, the higher the cost may be, which in turn affects the choice of intermodal transport mode); For discrete variables, chi-square test is performed to test the variables (For example, coal types, total Coal types) and intermodal transport methods (common Are the two methods independent? Calculate the expected frequency ,in, Indicates the The number of samples of each coal type, Indicates the The number of samples of intermodal transport mode, the number of coal customers That is, it is expressed as the total sample size; ; Combined with The coal type is The number of samples of intermodal transport modes , calculate the chi-square statistic ; ; Calculating degrees of freedom , find the probability under the chi-square test Value, if If the value is less than the significance level, the null hypothesis is rejected and the test variable is considered Not independent, with intermodal transport Related; B2.4. Deletion and retention of edges: Delete given variables based on the results of the conditional independence test. Independent test variables and intermodal transport If, after controlling for the two variables of transportation cost and transportation volume, it is found that the conditions for transportation distance and intermodal mode selection are independent, then the edge between the two variables of transportation distance and intermodal mode is deleted. After step B2.4, a sparse undirected graph is obtained. The edges in the undirected graph indicate the existence of a direct causal relationship between the variables. B2.5. Determine some directed edges and determine the direction of some edges through further conditional independence test. If the test variable and given variables There is an edge between them, and given a new variable Under the condition of For a given variable Has an impact, but given the variable Test variables No effect, remove the edge from the test variable Points to a given variable ,This step will result in a partially directed graph, where the directions of some edges are determined, while other edges are still undirected; B2.6. Determine the remaining undirected edges using pre-set rules. The pre-set rules include collision structure rules and directional propagation rules. Collision structure rules, if there are three variables 、 、 The path is represented as ,symbol represents an undirected edge, and and Not adjacent, that is, no direct connection edge, when controlling other variables hour, and Independent, controlled variables hour, and Related, then is the collision node, and the path is the collision structure, which is expressed as , where the symbol and represents a directed edge; Directional propagation rules, if there is a directed path ,and and If not adjacent, the orientation is ; B2.7. Latent variable processing: The relationship between latent variables cannot be directly determined through observed data. However, based on theory or experience, it is speculated that there is a relationship between the influence of latent variables and the target variable. Considering the influence of latent variables, it is necessary to perform a latent variable existence test. For each latent variable, a virtual edge is added to represent its influence on the observed variable. The graph structure is updated to distinguish between real edges and virtual edges. Real edges represent observed causal relationships, while virtual edges represent the influence of latent variables. B2.8. Construct a causal relationship diagram. Repeat steps B2.3 through B2.7, using conditional independence tests and pre-set rules to determine the directions of more edges until no more directions can be determined. The result is a directed acyclic graph (DAG). This DAG is the causal relationship diagram between variables inferred based on the data and the FCI algorithm.
[0023] B3. Identification and analysis of key variables; B3.1. Identify key variables. In the directed acyclic graph obtained in step B2, variables that have direct or indirect directed edges connected to the intermodal mode selection node are key variables that have a causal relationship with the coal customer's intermodal mode selection. For example, if variables such as transportation cost and transportation distance are all connected to the intermodal mode selection node through directed edges, then these variables are key variables. Based on the causal relationship graph, retain the feature variables that have a direct or indirect causal relationship with the intermodal mode selection node, and remove variables that have no causal relationship with the intermodal mode selection node, that is, eliminate spurious correlation features. B3.2. Causal relationship analysis: Analyze the causal relationship between key variables and the choice of intermodal transport mode based on the direction and path of directed edges. For example, if there is a directed path from transportation distance to transportation cost, and then from transportation cost to intermodal transport mode selection, it means that transportation distance may affect transportation cost, and then affect coal customers' choice of intermodal transport mode.
[0024] B3.3. Verify and interpret results. Compare the results obtained by the FCI algorithm with those of manual verification (with practical business knowledge and experience) to ensure the rationality and interpretability of the results. If certain causal relationships do not match actual experience, the data and algorithm execution process need to be carefully checked to determine whether there are data errors, improper variable selection, or unreasonable algorithm parameter settings.
[0025] C. Use k-prototype hybrid clustering method to cluster and obtain customer categories; C1. Based on the results of key variable screening in step B, Extract the required data and input the mixed data set after causal relationship selection, where the mixed data set includes numerical features and categorical features; C2, determine the optimal number of clusters K by silhouette coefficient; C2.1. Traversing different numbers of clusters value( =2,3,4, ), calculate the distance between any two customer samples In the k-prototype clustering method, Euclidean distance is used when the attribute is a numerical feature. For numerical features, we first need to normalize them to eliminate the influence of dimension. We use the maximum and minimum normalization method to map the numerical features to the interval [0,1], and then calculate the Euclidean distance of the numerical features. ; ; Where, is the number of clusters When, Customer's The standardized value of the attribute, is the number of clusters When, Customer's The standardized value of each attribute; Hamming distance is used when the attribute is a categorical feature , retain the original encoding of the category features (such as coal types are mapped to 0 / 1 / 2). If the category attributes of two customers are different, the Hamming distance is 1, and 0 if they are the same; ; Where, is the number of clusters When, Customer's The value of the attribute mapping, is the number of clusters When, Customer's The value of the attribute mapping, is the ordinal number of the total number of attributes; The distance between two customer samples , is the weight factor of the classification attribute, which is used to balance the two types of features; C2.2. Traversing different numbers of clusters value( =2,3,4, ), calculate the corresponding silhouette coefficients based on the distances between the obtained customer samples; ; ; Where, is the cohesion, indicating customer points The mean of the distances to other customer points in the cluster, is the separation degree, which represents the mean of all customer points in other clusters closest to the cluster to which it belongs. Points for customers The silhouette coefficient, is the global silhouette coefficient; C2.3. Comparison of different numbers of clusters Global silhouette coefficient at value , select the one with the largest global silhouette coefficient The value is taken as the optimal number of clusters K; C3. Based on the determined K clusters of customer categories, extract the typical features of each cluster to form customer group labels. Extract the statistical distribution of each cluster's features (such as the median transportation cost and the proportion of coal types) and define customer labels that are understandable to the business. For example, Cluster 1: Transportation cost > 0.7, transportation distance > 500 km, coal type = thermal coal can be labeled as a "high-cost thermal coal customer."
[0026] D. Train the LightGBM (Light Gradient Boosting Machine) classification model to predict customer categories, test the accuracy of the profile, and use the SHAP (SHapley Additive exPlanations) interpretable analysis method to describe the customer profile. D1. Set the target variable to the customer cluster label generated by the k-prototype clustering method for The index of the cluster, the input features are the key variables obtained in step B (such as transportation cost, transportation distance, coal type, etc.), all the waybill data Divide the dataset into training and test datasets in a ratio of 7:3 and train the LightGBM model. D2. Select weighted average To evaluate the accuracy of customer portraits and verify the accuracy of portraits; ; Where, For the The number of customer samples in a cluster, Expressed as the number of coal customers, i.e. the total sample size, For the Client's Fraction; For example: Cost-sensitive long-distance customers (30%) =0.85, other categories =0.7, then weighted =0.3×0.85 + 0.7×0.7=0.745; D3. Use the SHAP interpretable analysis method to interpret the constructed LightGBM model, combine the feature density bee swarm diagram and feature impact waterfall diagram to explain the classification model prediction results, and analyze the characteristics of different categories of customer portraits. The SHAP value calculation method is as follows ; Where, is the model benchmark value, which is the average prediction value of the LightGBM model on the training set. Characterized by For samples The contribution of SHAP values, feature density bee swarm plots, and feature influence waterfall plots are visualization results of the SHAP interpretable analysis method; Using the SHAP value as the feature importance, the features are sorted to identify the features that have the greatest impact on customer classification (such as transportation cost and transportation distance).
[0027] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A method for constructing an explainable customer profile for coal multimodal transport under a single order system, characterized by: The following steps are involved: A. Obtain customer coal intermodal transport mode selection questionnaires and historical coal multimodal transport waybill data under the single-bill system, and perform data processing and data integration; B. Use the causal discovery FCI algorithm to construct a causal graph, screen out characteristic variables that have a causal relationship with the customer's choice of intermodal mode, and eliminate spurious correlation features; C. Use k-prototype hybrid clustering method to cluster and obtain customer categories; D. Train the LightGBM classification model to predict the customer category, test the accuracy of the portrait, and use the SHAP interpretable analysis method to describe the customer portrait.
2. The method for constructing an explainable customer profile for coal multimodal transport under a single order system according to claim 1 is characterized in that: Step A also includes the following steps: A1. Obtain historical coal single-bill shipping data, develop a customer survey questionnaire on coal intermodal transport mode selection, distribute the questionnaire to coal customers, and collect their responses. A2. Process the waybill and questionnaire data, filter and delete duplicate records, supplement missing values, and correct outliers. After processing, a structured waybill dataset is obtained. Coal waybill data for all customers, is the number of coal customers, is the collection of all coal waybill data attributes, is the total number of attributes of each coal waybill data, For the Coal waybill data, waybill data The The data is represented as , each questionnaire response result is taken as a sample, the results in each sample are numbered respectively, and all the numbered sample data are summarized to obtain the summary data; A3. Data fusion: Associating the questionnaire with the waybill data through a unique identifier or fuzzy matching. The time when the questionnaire is completed is consistent with the recording period of the waybill data.
3. The method for constructing an explainable customer profile for coal multimodal transport under a single order system according to claim 1 is characterized in that: Step B also includes the following steps: B1. Data Preparation: Collect data related to coal customers' choice of intermodal transport methods from the questionnaire survey results. The categorical variables in the data include: coal characteristics consisting of type and quantity; transportation factors consisting of transportation distance, transportation time, and transportation cost; and customer information consisting of enterprise size and transportation frequency. Encode the categorical variables in the data for use in the FCI algorithm calculation.
4. The method for constructing an explainable customer profile for coal multimodal transport under a single order system according to claim 3 is characterized in that: Step B also includes the following steps: B2, FCI algorithm execution; B2.
1. Assume that the target variable is the intermodal mode , is the number of intermodal transport modes, and the set of all coal waybill data attributes is the candidate feature set A variable containing all the waybill data attributes in the questionnaire; B2.
2. Construct a complete graph. Consider all variables in the waybill data as nodes and construct a completely undirected graph. This means that all nodes are connected by edges, but the edges have no direction and only indicate the association between the variables. B2.3, conditional independence test, partial correlation coefficient test for continuous variables, if the given variable Under the condition of and intermodal transport direct correlation, according to 、 and Pearson correlation coefficient between two pairs 、 、 calculate and In no Partial correlation coefficient under the influence of ; ; ; If the partial correlation coefficient Not significant, indicating that the test variable and intermodal transport There is no direct causal relationship between the selection and the correlation between the given variables lead to; For discrete variables, chi-square test is performed to test the variables and intermodal transport Whether it is independent, calculate the expected frequency ,in, Indicates the The number of samples of each coal type, Indicates the The number of samples of intermodal transport mode, the number of coal customers That is, it is expressed as the total sample size; ; Combined with The coal type is The number of samples of intermodal transport modes , calculate the chi-square statistic ; ; Calculating degrees of freedom , find the probability under the chi-square test Value, if If the value is less than the significance level, the null hypothesis is rejected and the test variable is considered Not independent, with intermodal transport Related; B2.
4. Deletion and retention of edges: Delete given variables based on the results of the conditional independence test. Independent test variables and intermodal transport The edges between them give a sparse undirected graph. The edges in the undirected graph indicate that there is a direct causal relationship between the variables. B2.
5. Determine some directed edges and determine the direction of some edges through further conditional independence test. If the test variable and given variables There is an edge between them, and given a new variable Under the condition of For a given variable Has an impact, but given the variable Test variables No effect, remove the edge from the test variable Points to a given variable , and obtain a partial directed graph; B2.
6. Determine the remaining undirected edges using pre-set rules. The pre-set rules include collision structure rules and directional propagation rules. Collision structure rules, if there are three variables 、 、 The path is represented as ,symbol represents an undirected edge, and and Not adjacent, that is, no direct connection edge, when controlling other variables hour, and Independent, controlled variables hour, and Related, then is the collision node, and the path is the collision structure, which is expressed as , where the symbol and represents a directed edge; Directional propagation rules, if there is a directed path ,and and If not adjacent, the orientation is ; B2.
7. Latent variable processing: For each latent variable, add a virtual edge to represent its influence on the observed variable. Update the graph structure and distinguish between real edges and virtual edges. Real edges represent the causal relationship between observations, while virtual edges represent the influence of latent variables. B2.
8. Construct a causal relationship diagram. Repeat steps B2.3 to B2.7, using conditional independence tests and pre-set rules to determine the directions of more edges until no more directions can be determined. The result is a directed acyclic graph.
5. The method for constructing an explainable customer profile for coal multimodal transport under a single order system according to claim 4 is characterized in that: Step B also includes the following steps: B3. Identification and analysis of key variables; B3.
1. Identify key variables. In the directed acyclic graph obtained in step B2, variables that have direct or indirect directed edges connected to the intermodal mode selection node are key variables that have a causal relationship with the coal customer's intermodal mode selection. Based on the causal relationship graph, retain the feature variables that have a direct or indirect causal relationship with the intermodal mode selection node, and remove the variables that have no causal relationship with the intermodal mode selection node, thereby eliminating spurious correlation features. B3.
2. Causal relationship analysis: Analyze the causal relationship between key variables and intermodal transport mode selection based on the direction and path of directed edges; B3.
3. Result verification and interpretation: Compare and verify the results obtained by the FCI algorithm with those obtained by manual verification to ensure the rationality and interpretability of the results.
6. The method for constructing an explainable customer profile for coal multimodal transport under a single order system according to claim 1 is characterized in that: Step C also includes the following steps: C1. Based on the results of key variable screening in step B, Extract the required data and input the mixed data set after causal relationship selection, where the mixed data set includes numerical features and categorical features; C2, determine the optimal number of clusters K by silhouette coefficient; C2.
1. Traversing different numbers of clusters Value, calculate the distance between any two customer samples In the k-prototype clustering method, Euclidean distance is used when the attribute is a numerical feature. , use the maximum and minimum normalization method to map the numerical features to the [0,1] interval, and then calculate the Euclidean distance of the numerical features ; ; Where, is the number of clusters When, Customer's The standardized value of the attribute, is the number of clusters When, Customer's The standardized value of each attribute; When the attribute is a categorical feature, Hamming distance is used , retain the original encoding of the category features. If the category attributes of two customers are different, the Hamming distance is 1, and 0 if they are the same; ; Where, is the number of clusters When, Customer's The value of the attribute mapping, is the number of clusters When, Customer's The value of the attribute mapping, is the ordinal number of the total number of attributes; The distance between two customer samples , is the weight factor of the classification attribute; C2.
2. Traversing different numbers of clusters Value, calculate the corresponding silhouette coefficient according to the distance between each customer sample obtained; ; ; Where, is the cohesion, indicating customer points The mean of the distances to other customer points in the cluster, is the separation degree, which represents the mean of all customer points in other clusters closest to the cluster to which it belongs. Points for customers The silhouette coefficient, is the global silhouette coefficient; C2.
3. Comparison of different numbers of clusters Global silhouette coefficient at value , select the value when the global silhouette coefficient is the largest as the optimal number of clusters K; C3. Based on the determined K clusters of customer categories, extract the typical features of each cluster to form customer grouping labels. Extract the statistical distribution of each cluster's features to define customer labels that are understandable to the business.
7. The method for constructing an explainable customer profile for coal multimodal transport under a single order system according to claim 1 is characterized in that: Step D also includes the following steps: D1. Set the target variable to the customer cluster label generated by the k-prototype clustering method for The index of the cluster, the input feature is the key variable obtained in step B, all the waybill data Divide the dataset into training and test datasets in a ratio of 7:3 and train the LightGBM model. D2. Select weighted average To evaluate the accuracy of customer portraits and verify the accuracy of portraits; ; Where, For the The number of customer samples in a cluster, Expressed as the number of coal customers, i.e. the total sample size, For the Client's Fraction; D3. Use the SHAP interpretable analysis method to interpret the constructed LightGBM model, combine the feature density bee swarm diagram and feature impact waterfall diagram to explain the classification model prediction results, and analyze the characteristics of different categories of customer portraits. The SHAP value calculation method is as follows ; Where, is the model benchmark value, which is the average prediction value of the LightGBM model on the training set. Characterized by For samples The contribution of SHAP values, feature density bee swarm plots, and feature influence waterfall plots are visualization results of the SHAP interpretable analysis method; The SHAP value is used as the feature importance to sort the features and identify the features that have the greatest impact on customer classification.
Citation Information
Patent Citations
Power customer tag generation method based on big data clustering technology
CN114444573A
Interpretable visualization method and system based on chronic disease dynamic prediction
CN120108739A
Personalized classification for browsing documents
US20050203943A1
Cited By
Path-finding optimization system and method for single self-walking intelligent torpedo tank car
CN121391090A
Route searching optimization system and method for monomer self-propelled intelligent torpedo tank car
CN121391090B
Client classification method, business processing method and system based on causal inference and interpretability
CN121456683A
