A method, device, equipment and medium for predicting the sharing rate of station connection mode

By constructing the data set and using the CART algorithm to generate and prune the regression tree, the problem of lack of quantitative means in the existing technology to predict the sharing rate of station connection method is solved, and reasonable prediction and accurate analysis of the sharing rate of station connection method is achieved.

CN114418231BActive Publication Date: 2025-04-25GUANGZHOU METRO DESIGN & RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210089160.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-25
Publication Date
2025-04-25
Estimated Expiration
2042-01-25

AI Technical Summary

Technical Problem

The prior art lacks a relatively objective and reasonable quantitative means to predict the sharing rate of station connection mode, especially in the influence mechanism of the connection distance on the sharing rate.

Method used

By obtaining the passenger survey content, selecting the preferred passengers and constructing the data set, using the CART algorithm to generate the initial regression tree, and obtaining the basic regression tree through post-pruning, and finally predicting the sharing rate of various connection methods based on the final regression tree.

Benefits of technology

A reasonable prediction of the sharing rate of station connection methods is achieved, which reduces the complexity of data preprocessing, avoids the influence of personal subjective experience, and can efficiently understand the number and location of the connection tape.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114418231B_ABST
    Figure CN114418231B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment and medium for predicting the share rate of station connection methods, the method comprising: obtaining basic data, and constructing a data set based on the basic data; dividing the data set into a training data set and a test data set; using the training data set to generate an initial regression tree specified by some decision nodes according to the current segmentation rule, and then using the test data set to post-prune the initial regression tree to obtain a basic regression tree; using the training data set to generate the remaining part of the basic regression tree, and using the test data set to post-prune the remaining part to generate a final regression tree; predicting the share rate of various connection methods at the station according to the proportion of the number of people in each connection method in the data set corresponding to each leaf node in the final regression tree. The present application can achieve a reasonable prediction of the share rate of station connection methods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of rail transit technology, and in particular to a method, device, equipment and medium for predicting the share rate of station connection mode. Background Art

[0002] The connection mode share rate of urban rail transit stations is a necessary parameter for determining the passenger flow demand of various connection modes at the station. Its value will ultimately affect a series of contents such as the scale of the supporting motor vehicle and non-motor vehicle parking lots at the station, the design of connecting bus lines, etc. Therefore, achieving a reasonable prediction of the connection mode share rate of the station is of great significance for handling the problem of the "last mile" of urban rail transit.

[0003] At present, the commonly used method for predicting the share of station connection modes is to first determine a time period (such as the whole day, morning peak, etc.), and then use the connection distance as the main influencing factor to calculate the share of various connection modes under different connection distances through the data obtained from the survey. Among them, some methods will discretize the connection distance, such as dividing a connection belt every 1km, and assuming that the share of various connection modes in the same connection belt remains unchanged; other methods will retain the continuity of the connection distance, assuming that the share of various connection modes will change for every change of 1 unit in the connection distance.

[0004] There is a lack of a relatively objective and reasonable means of quantifying the impact of the connection distance on the share of each connection mode. For those methods that discretize the connection distance according to a fixed value, it is likely that the fixed value will be unreasonable due to reliance on personal experience when determining the fixed value, and in reality, the connection distance range of each connection zone is also difficult to be the same. For those methods that retain the continuity of the connection distance, the connection distance will be too sensitive to the impact of the connection mode share, and the reality is often that the share of various connection modes will not change significantly under a certain connection distance. Therefore, we need a reasonable method to predict the share of station connection modes. Summary of the invention

[0005] The present application provides a method, device, equipment and medium for predicting the share rate of station connection mode, which can realize reasonable prediction of the share rate of station connection mode.

[0006] In order to achieve the above purpose, this application adopts the following technical solutions:

[0007] In a first aspect, the present application provides a method for predicting the share rate of station connection modes, including:

[0008] After obtaining the survey contents of a preset number of passengers, determining preferred passengers and using the survey contents of all preferred passengers as basic data, wherein the survey contents include personal attributes, passenger type, connection method, connection location and connection time;

[0009] After determining the road network connection distance based on the connection location in the basic data, construct a data set S and assign variables to some features of the elements in the data set S, wherein the data set S is composed of the preferred passengers as elements in a set, and the features contained in each element are personal attributes, passenger type, connection method and road network connection distance, and the partial features are personal attributes, passenger type and connection method;

[0010] The data set S is divided into a training data set S train And the test dataset S test ;

[0011] Based on the training data set S train , generate the initial regression tree specified by some decision nodes according to the current segmentation rule;

[0012] Based on the test data set S test Post-pruning the initial regression tree to obtain a basic regression tree;

[0013] According to the training data set S train After generating the rest of the basic regression tree, based on the test data set S test Post-pruning the remaining part to obtain a final regression tree;

[0014] According to the proportion of the number of people using each type of connection in the data set corresponding to each leaf node in the final regression tree, the share rate of each type of connection at the station is predicted.

[0015] According to an achievable method of the first aspect of the present application, after obtaining the survey contents of a preset number of passengers, determining the preferred passengers and using the survey contents of all the preferred passengers as basic data includes:

[0016] After obtaining the survey contents of a preset number of passengers, the connecting time of each passenger is compared with the corresponding theoretical connecting time to obtain a reference difference value of each passenger, wherein the reference difference value is the minimum value in the absolute value interval of the error between the connecting time and the theoretical connecting time;

[0017] If the reference difference of the passenger is less than the preset difference, the passenger is determined to be a preferred passenger and the survey content of all preferred passengers is used as basic data.

[0018] According to an achievable method of the first aspect of the present application, the data set S is divided into a training data set S trainAnd the test dataset S test include:

[0019] By random sampling, the data set S is divided into a training data set S according to a preset ratio. train And the test dataset S test .

[0020] According to an achievable manner of the first aspect of the present application, the current segmentation rule includes:

[0021] S40, firstly performing binary segmentation on the data set according to the passenger type of the passengers to obtain a first data set, wherein the passenger type is a binary variable;

[0022] S41, traversing the road network connection distances in the first data set to perform binary segmentation on the first data set, and determining a first candidate segmentation point;

[0023] S42, selecting a first candidate split point with the largest information gain as the best split point for the first data set, and performing binary splitting on the first data set based on the best split point to obtain a second data set;

[0024] S43, taking the second data set as a new first data set, and repeating steps S41-S43 until the second data set is no longer segmented.

[0025] According to a possible implementation method of the first aspect of the present application, the test data set S test Post-pruning the initial regression tree to obtain a basic regression tree, including:

[0026] S50, according to the initial regression tree, the test data set S test Divide so that each road network connection distance range (j k , j k+1 ] all correspond to data sets s k,k+1 ;

[0027] S51, for all data sets s with adjacent road network connection distance range k,k+1 、s k+1,k+2 Perform a chi-square test to determine the data set s k,k+1 and datasets k+1,k+2 Whether the distribution of various connection methods in the

[0028] S52, if yes, then set the road network connection distance value j k+1 As an alternative merge point;

[0029] S53, determining the information entropy change values ​​corresponding to all candidate merging points, selecting the candidate merging point corresponding to the minimum information entropy change value as the merging point, and pruning the initial regression tree according to the merging point to obtain a basic regression tree;

[0030] S54, repeating steps S50-S54 using the basic regression tree as a new initial regression tree until there are no candidate merging points after the test data set is divided according to the basic regression tree.

[0031] According to a possible implementation method of the first aspect of the present application, the training data set S train Generate the rest of the base regression tree, including:

[0032] Based on the basic regression tree, the training data set S train After the division, the connection distance range of each road network (j a , j a+1 ] all correspond to data sets s a,a+1 ;

[0033] According to personal attributes, the dataset s a,a+1 Split to generate the remaining part of the basic regression tree.

[0034] According to a possible implementation method of the first aspect of the present application, the personal attribute is a continuous feature, and the data set s is analyzed according to the personal attribute. a,a+1 Split to generate the remaining part of the basic regression tree, including:

[0035] S60, traversing the data set s a,a+1 The personal attributes in the dataset s a,a+1 Perform binary segmentation and determine the second candidate segmentation point;

[0036] S61, selecting the second candidate split point with the largest information gain as the data set s a,a+1 The best split point of the data set s is a,a+1 Perform binary segmentation to obtain data set s b,b+1 ;

[0037] S62, the data set s b,b+1 As a new dataset s a,a+1 Repeat steps S60-S62 until the data set s b,b+1 The un-split situation occurs, thereby generating the remaining part of the base regression tree.

[0038] In a second aspect, the present application provides a device for predicting the sharing rate of station connection mode, including:

[0039] A basic data acquisition module, configured to determine preferred passengers and use the survey contents of all preferred passengers as basic data after obtaining survey contents of a preset number of passengers, wherein the survey contents include personal attributes, passenger type, connection method, connection location and connection time;

[0040] A data set construction module, for constructing a data set S and assigning variables to some features of the elements in the data set S after determining the road network connection distance based on the connection locations in the basic data, wherein the data set S is composed of the preferred passengers as elements in a set, and the features contained in each element are personal attributes, passenger type, connection method and road network connection distance, and the partial features are personal attributes, passenger type and connection method;

[0041] The data set partitioning module is used to divide the data set S into a training data set S train And the test dataset S test ;

[0042] An initial regression tree generation module is used to generate an initial regression tree based on the training data set S train , generate the initial regression tree specified by some decision nodes according to the current segmentation rule;

[0043] A basic regression tree generation module is used to generate a regression tree based on the test data set S test Post-pruning the initial regression tree to obtain a basic regression tree;

[0044] The final regression tree generation module is used to generate a regression tree according to the training data set S train After generating the rest of the basic regression tree, based on the test data set S test Post-pruning the remaining part to obtain a final regression tree;

[0045] The module for predicting the share of each type of connection mode is used to predict the share of each type of connection mode at the station according to the proportion of the number of people using each type of connection mode in the data set corresponding to each leaf node in the final regression tree.

[0046] In a third aspect, an embodiment of the present application provides an electronic device, 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 any one of the above-mentioned methods for predicting the share of station connection modes when executing the computer program.

[0047] In a fourth aspect, an embodiment of the present application provides a storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the method for predicting the share rate of any of the above-mentioned station connection modes are implemented.

[0048] In summary, compared with the prior art, the technical solution provided in the embodiment of the present application has at least the following beneficial effects:

[0049] 1. The improved CART algorithm can directly process not only discrete features but also continuous features, thereby reducing the work of data preprocessing and avoiding a series of problems that may arise in the process of converting continuous features into discrete features;

[0050] 2. With the help of pre-pruning and post-pruning, the basic regression tree of the first two decision nodes (passenger type and road network connection distance) is generated. Taking into account the differences in the connection methods between incoming and outgoing passengers, the automatic division of different connection zones based on the characteristics of the data set is realized, successfully getting rid of the influence of personal subjective experience;

[0051] 3. The number and location of station transfer zones can be efficiently obtained, which helps researchers better analyze the characteristics of the share of various transfer modes at the research object stations. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 A flow chart of a method for predicting the station connection mode share rate provided in a preferred embodiment of the present application;

[0053] Figure 2 This is an example diagram of the initial regression tree in the method for predicting the station connection mode share rate described in this application;

[0054] Figure 3 A structural block diagram of a device for predicting the station connection mode share rate provided in a preferred embodiment of the present application;

[0055] Figure 4 The preferred embodiment of the present application provides a training data set S based on train Schematic diagram of the process of generating an initial regression tree;

[0056] Figure 5 The preferred embodiment of the present application provides a test data set S test Schematic diagram of the process of post-pruning the initial regression tree to obtain the basic regression tree;

[0057] Figure 6 The preferred embodiment of the present application provides a method for sorting data sets s according to personal attributes. a,a+1 The process of splitting is performed to generate a flowchart of the remaining part of the basic regression tree. DETAILED DESCRIPTION

[0058] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0059] The embodiments of the present application are further described in detail below in conjunction with the drawings in the specification.

[0060] like Figure 1 As shown, the present application discloses a method for predicting the sharing rate of station connection mode, the method comprising:

[0061] S1. After obtaining the survey contents of a preset number of passengers, determine the preferred passengers and use the survey contents of all the preferred passengers as basic data, wherein the survey contents include personal attributes, passenger type, connection method, connection location and connection time;

[0062] The preset number can be set according to the actual situation. The passengers here refer to the passengers entering or leaving the station at the station or near the entrance and exit of the station. For passengers entering the station, the connecting point refers to the point from which they are connected to the station; for passengers leaving the station, the connecting point refers to the point from which they are connected to the station.

[0063] Specifically, the survey contents of a preset number of passengers may be obtained through questionnaire survey or inquiry, and the survey contents include:

[0064] ① Passenger type: entering or leaving the station;

[0065] ②Connection methods: walking, bicycle (private, shared), electric vehicle (private, shared), bus, private car, outbound vehicle, other;

[0066] ③ Personal attributes: can be determined according to actual research needs;

[0067] ④ Pick-up location;

[0068] ⑤Connection time.

[0069] In one embodiment, after obtaining the survey content of a preset number of passengers, the connection time of each passenger is compared with the corresponding theoretical connection time to obtain a reference difference for each passenger, wherein the reference difference is the minimum value in the absolute value interval of the error between the connection time and the theoretical connection time; if the reference difference of the passenger is less than the preset difference, the passenger is determined to be a preferred passenger and the survey content of all preferred passengers is used as basic data.

[0070] Among them, it is difficult for passengers to give a specific value to the answer to the connection time, so the passengers' answers to the connection time are all in the form of intervals; the preset difference is set in advance, and preferably, the preset difference is set to 10.

[0071] The specific method for obtaining the theoretical connection time of each passenger is as follows:

[0072] By calling the geocoding function of the Web service API provided by Baidu Map Open Platform, we can obtain the longitude and latitude coordinates of the pick-up location. 接驳地点 ,lat 接驳地点 ) and the longitude and latitude coordinates of the station (lng 车站 ,lat 车站 ). Then, the route planning function provided by Baidu Map Open Platform is called to obtain the theoretical connection time T between the connection point and the station under the specified connection method. 理论接驳 .

[0073] Specifically, the method of determining the preferred passengers can be clearly explained by the following example:

[0074] Assuming that the passenger answers that the transfer time is 6-10 minutes, and the theoretical transfer time obtained through Baidu API is 18 minutes, the error interval between the transfer time and the theoretical transfer time is [-12, -8], so the absolute value interval of the error between the transfer time and the theoretical transfer time is [8, 12]. The minimum value in the absolute value interval of the error, i.e., the reference difference, is 8. The reference difference of the passenger is less than the preset difference, and the passenger is determined to be a preferred passenger.

[0075] S2. After determining the road network connection distance based on the connection locations in the basic data, construct a data set S and assign variables to some features of the elements in the data set S, wherein the data set S consists of the preferred passengers as elements in the set, and the features contained in each element are personal attributes, passenger type, connection method and road network connection distance, and the partial features are personal attributes, passenger type and connection method.

[0076] Among them, the method for determining the connection distance of each preferred passenger road network is as follows:

[0077] By calling the geocoding function of the Web service API provided by Baidu Map Open Platform, we can obtain the longitude and latitude coordinates of the pick-up location. 接驳地点 ,lat 接驳地点 ) and the longitude and latitude coordinates of the station (lng 车站 ,lat 车站 ), and then the route planning function provided by the Baidu Map Open Platform is called to obtain the road network connection distance of each preferred passenger.

[0078] Specifically, some features and value assignments included in the dataset S are shown in the following table:

[0079]

[0080] Specifically, discrete features refer to features whose variable values ​​can be listed one by one, such as gender, etc.; continuous features refer to features whose variable values ​​cannot be listed one by one, such as the actual value of age, etc.

[0081] S3, dividing the data set S into a training data set S train And the test dataset S test .

[0082] In one embodiment, the data set S can be divided into a training data set S and a training data set S according to a preset ratio by random sampling. train And the test dataset S test , wherein the preset ratio can be set manually according to actual conditions, and the preferred preset ratio is 7:3.

[0083] S4, based on the training data set S train , generate the initial regression tree specified by some decision nodes according to the current segmentation rules.

[0084] Among them, some decision nodes are passenger type and road network connection distance in turn; based on the training data set S train The specific steps to generate the initial regression tree are:

[0085] S40, firstly divide the training data set S according to the passenger type train Perform binary segmentation to obtain the training data set S train the corresponding first data set;

[0086] S41, traversing the road network connection distance values ​​in the first data set to perform binary segmentation on the first data set, and determining a first candidate segmentation point;

[0087] Among them, the split point where the data set does not cancel the split after the split is used as the first candidate split point.

[0088] S42, selecting a first candidate split point with the largest information gain as the best split point for the first data set, and performing binary splitting on the first data set based on the best split point to obtain a second data set;

[0089] Among them, the calculation formula of information gain is:

[0090] ΔEntropy=Entropy1-Entropy a1 -Entropy a2 ;

[0091] In the formula, ΔEntropy represents information gain, Entropy1 represents the information entropy of the segmented data set, and Entropy a1 、Entropy a2 They respectively represent the information entropy of the two split data sets.

[0092] S43, taking the second data set as a new first data set, and repeating steps S41-S43 until the second data set is no longer segmented.

[0093] Among them, the cancellation of segmentation is divided into two categories, namely the first category of cancellation of segmentation and the second category of cancellation of segmentation, specifically:

[0094] The first type of cancellation of segmentation: too little information gain. Entropy1 represents the information entropy of the segmented data set, j represents the connection distance value used for segmentation, and Entropy j,1 、Entropy j,2 They represent the information entropy of the two data sets respectively, L e Indicates the lower limit of information gain. If Entropy1-Entropy j,1 -Entropy j,2 <L e , then the information gain is considered too small;

[0095] The second type of cancellation of splitting: the two split data sets are very small. Let j represent the connection distance value used for splitting, Num j,1 , Num j,2 Respectively represent the data volume of the two split data sets, L n Indicates the lower limit of the amount of data in the data set. If min(Num j,1 , Num j,2 )<L n , then the two split data sets are considered to be small.

[0096] Among them, the calculation formula of the data set information entropy is:

[0097]

[0098] In the formula, Entropy is the information entropy of the data set, P i is the proportion of people who use the i-th connection method in the data set, and n represents the number of connection methods.

[0099] Specifically, because the road network connection distance is a continuous feature, and the CART algorithm can only perform binary segmentation, it is necessary to try to use each value of the road network connection distance feature in the data set as a split point to split the current data set into two data sets (all road network connection distance values ​​of one data set are less than or equal to the split point, and all road network connection distance values ​​of the other data set are greater than the split point). The split points where the split data set does not cancel the split after the split are used as alternative split points, and the ones with the largest information gain are selected from the alternative split points as the best split points to split the first data set. The two newly split data sets will be repeatedly subjected to the above binary segmentation process based on the road network connection distance until the current data set cancels the split and cannot be split any more. After executing steps S40-S43, it is equivalent to splitting the data set into multiple data sets based on multiple road network connection distances, thereby generating an initial regression tree. The initial regression tree is as follows: Figure 2 shown.

[0100] S5. Based on the test data set S test The initial regression tree is post-pruned to obtain a basic regression tree.

[0101] Among them, using the test data set S test The specific steps of post-pruning the initial regression tree to obtain the basic regression tree are:

[0102] S50, according to the initial regression tree, the test data set S test Divide so that each road network connection distance range (j k , j k+1 ] all correspond to data sets s k,k+1 ;

[0103] S51, for all data sets s with adjacent road network connection distance range k,k+1 、s k+1,k+2 Perform a chi-square test to determine the data set s k,k+1 and datasets k+1,k+2 Whether the distribution of various connection methods in the

[0104] S52, if yes, then set the road network connection distance value j k+1 As an alternative merge point;

[0105] S53, determining the information entropy change values ​​corresponding to all candidate merging points, selecting the candidate merging point corresponding to the minimum information entropy change value as the merging point, and pruning the initial regression tree according to the merging point to obtain a basic regression tree;

[0106] S54, using the basic regression tree as a new initial regression tree, repeating steps S50-S54 until there are no candidate merging points after the test data set is divided according to the basic regression tree.

[0107] The operation steps of the chi-square test are as follows:

[0108] (1) Statistical data set k,k+1 、s k+1,k+2 The distribution of the number of people in various connection methods is shown in the following table:

[0109] Various connection methods\data sets <![CDATA[s k,k+1 ]]> <![CDATA[s k+1,k+2 ]]> Total number of people walk <![CDATA[q 1,k,k+1 ]]> <![CDATA[q 1,k+1,k+2 ]]> <![CDATA[q 1,k,k+2 ]]> Bicycles (private, shared) <![CDATA[q 2,k,k+1 ]]> <![CDATA[q 2,k+1,k+2 ]]> <![CDATA[q 2,k,k+2 ]]> Battery car (private, shared) <![CDATA[q 3,k,k+l ]]> <![CDATA[q 3,k+l,k+2 ]]> <![CDATA[q 3,k,k+2 ]]> the bus <![CDATA[q 4,k,k+1 ]]> <![CDATA[q 4,k+1,k+2 ]]> <![CDATA[q 4,k,k+2 ]]> Private Car <![CDATA[q 5,k,k+1 ]]> <![CDATA[q 5,k+1,k+2 ]]> <![CDATA[q 5,k,k+2 ]]> taxi <![CDATA[q 6,k,k+1 ]]> <![CDATA[q 6,k+1,k+2 ]]> <![CDATA[q 6,k,k+2 ]]> other <![CDATA[q 7,k,k+1 ]]> <![CDATA[q 7,k+1,k+2 ]]> <![CDATA[q 7,k,k+2 ]]> Total number of people <![CDATA[q k,k+1 ]]> <![CDATA[q k+1,k+2 ]]> <![CDATA[q k,k+2 ]]>

[0110] (2) Calculate the chi-square value X 2 , the calculation formula is as follows:

[0111]

[0112] (3) Compare chi-square values ​​X 2 Is it less than the critical chi-square value X with 6 degrees of freedom and a confidence level of α (usually 90%)? 2 α,6 ;

[0113] (4) If X 2 ≤X 2 α,6 , then we can consider that the data set s k,k+1 、s k+1,k+2 The distribution of various connection modes is consistent, and the road network connection distance value j k+1 As an alternative merging point, calculate the information entropy change value ΔE after the two data sets are merged k,k+2 =Entropy k,k+2 -Entropy k,k+1 -Entropy k+1,k+2 ;

[0114] (5) If X 2 >X 2 α,6 , then the data set s k,k+1 、s k+1,k+2 The distribution of various connection modes is inconsistent, and the road network connection distance value j k+1 Not used as an alternative merge point.

[0115] Specifically, the information entropy change values ​​corresponding to all candidate merging points are compared, and the one with the smallest information entropy change value is selected as the road network connection distance merging point for this round.

[0116] S6, based on the training data set S train After generating the rest of the basic regression tree, based on the test data set S testPost-pruning the remaining part to obtain a final regression tree;

[0117] Specifically, according to the training data set S train After generating the remaining part of the basic regression tree, the basic regression tree plus the remaining part is a complete regression tree. The test data set is divided according to the complete regression tree, and it can be determined that each leaf node in the complete regression tree corresponds to a data set. The chi-square test is used to determine whether the distribution of various connection methods between the data sets corresponding to adjacent leaf nodes is consistent. If the distribution of various connection methods between the data sets corresponding to adjacent leaf nodes is consistent, the two leaf nodes are merged (i.e., pruned). After the two leaf nodes are merged into one leaf node, the corresponding data sets will also change, and the data sets corresponding to the adjacent leaf nodes will also change. It is necessary to continuously test the distribution of various connection methods between the data sets corresponding to adjacent leaf nodes until the distribution of various connection methods between the data sets corresponding to all adjacent leaf nodes in the complete regression tree is inconsistent. The complete regression tree is the final regression tree.

[0118] Wherein, the training data set S train The specific steps for generating the rest of the basic regression tree are:

[0119] Based on the basic regression tree, the training data set S train After the division, the connection distance range of each road network (j a , j a+1 ] all correspond to data sets s a,a+1 ;

[0120] According to personal attributes, the dataset s a,a+1 Split to generate the remaining part of the basic regression tree.

[0121] Specifically, according to personal attributes, the dataset s a,a+1 When segmenting, it is necessary to determine the type of personal attribute. The types of personal attributes are mainly continuous and discrete. For example, when the personal attribute is gender, it belongs to the discrete feature. The data set s can be directly segmented based on gender. a,a+1 Perform segmentation.

[0122] When personal attributes are continuous features, such as Figure 6 As shown, according to personal attributes, the dataset s a,a+1 The specific steps of splitting to generate the remaining part of the basic regression tree are:

[0123] S60, traversing the data set s a,a+1 The personal attributes in the dataset s a,a+1Perform binary segmentation and determine the second candidate segmentation point;

[0124] S61, selecting the second candidate split point with the largest information gain as the data set s a,a+1 The best split point of the data set s is a,a+1 Perform binary segmentation to obtain data set s b,b+1 ;

[0125] S62, the data set s b,b+1 As a new dataset s a,a+1 Repeat steps S60-S62 until the data set s b,b+1 The un-split situation occurs, thereby generating the remaining part of the base regression tree.

[0126] S7. Predict the share of each type of connection mode at the station according to the proportion of the number of people using each type of connection mode in the data set corresponding to each leaf node in the final regression tree.

[0127] Specifically, the proportion of the number of people using each type of connection method in the data set corresponding to each leaf node of the final regression tree is the predicted value of the share rate of each type of connection method under this branch; as long as the passenger type, road network connection distance, and personal attributes are known, the branch and leaf node to which they belong can be found through the final regression tree, thereby obtaining the corresponding predicted value of the share rate of each type of connection method.

[0128] like Figure 3 As shown, the present application also discloses a device for predicting the sharing rate of station connection mode, the device comprising:

[0129] The basic data acquisition module 301 is used to determine the preferred passengers after obtaining the survey contents of a preset number of passengers and use the survey contents of all the preferred passengers as the basic data, wherein the survey contents include personal attributes, passenger types, connection methods, connection locations and connection times;

[0130] The data set construction module 302 is used to construct a data set S and assign variables to some features of the elements in the data set S after determining the road network connection distance based on the connection location in the basic data, wherein the data set S is composed of the preferred passengers as elements in the set, and the features contained in each element are personal attributes, passenger type, connection method and road network connection distance, and the partial features are personal attributes, passenger type and connection method;

[0131] The data set division module 303 is used to divide the data set S into a training data set S train And the test dataset S test ;

[0132] The initial regression tree generation module 304 is used to generate an initial regression tree based on the training data set Strain , generate the initial regression tree specified by some decision nodes according to the current segmentation rule;

[0133] The basic regression tree generation module 305 is used to generate a basic regression tree based on the test data set S test Post-pruning the initial regression tree to obtain a basic regression tree;

[0134] The final regression tree generation module 306 is used to generate a final regression tree according to the training data set S train After generating the rest of the basic regression tree, based on the test data set S test Post-pruning the remaining part to obtain a final regression tree;

[0135] The module 307 for predicting the share of each type of connection mode is used to predict the share of each type of connection mode at the station according to the proportion of the number of people using each type of connection mode in the data set corresponding to each leaf node in the final regression tree.

[0136] In one embodiment, the basic data acquisition module 301 specifically includes:

[0137] A reference difference determination unit, configured to, after obtaining survey contents of a preset number of passengers, compare the connection time of each passenger with the corresponding theoretical connection time, and determine a reference difference for each passenger, wherein the reference difference is the minimum value in the absolute value interval of the error between the connection time and the theoretical connection time;

[0138] The basic data determination unit is used to determine that the passenger is a preferred passenger and use the survey contents of all preferred passengers as basic data if the reference difference value of the passenger is less than the preset difference value.

[0139] In one embodiment, the data set partitioning module 303 specifically includes:

[0140] The data set division unit is used to divide the data set S into a training data set S according to a preset ratio by random sampling. train And the test dataset S test .

[0141] In one embodiment, the initial regression tree generation module 304 includes:

[0142] The current segmentation rule unit is used to first perform binary segmentation on the data set according to the passenger type of the passengers to obtain a first data set, wherein the passenger type is a binary variable; traverse the road network connection distance in the first data set to perform binary segmentation on the first data set to determine a first candidate segmentation point; select the first candidate segmentation point with the largest information gain as the best segmentation point for the first data set, and perform binary segmentation on the first data set based on the best segmentation point to obtain a second data set; continuously use the second data set as a new first data set to determine the best segmentation point for segmenting the new first data set, thereby segmenting the new first data set until the second data set is unsegmented.

[0143] In one embodiment, the basic regression tree generation module 305 specifically includes:

[0144] The first data set division unit is used to divide the test data set S according to the initial regression tree. test Divide so that each road network connection distance range (j k , j k+1 ] all correspond to data sets s k,k+1 ;

[0145] The connection mode distribution judgment unit is used to judge the distribution of all data sets s with adjacent connection distance ranges in the road network. k,k+1 、s k+1,k+2 Perform a chi-square test to determine the data set s k,k+1 and datasets k+1,k+2 Whether the distribution of various connection methods in the

[0146] The candidate merging point determination unit is used to determine the data set s k,k+1 and datasets k+1,k+2 When the distribution of various connection modes in is consistent, the road network connection distance value j k+1 As an alternative merge point;

[0147] A basic regression tree generation unit is used to determine the information entropy change values ​​corresponding to all candidate merging points, select the candidate merging point corresponding to the minimum information entropy change value as the merging point, and prune the initial regression tree according to the merging point to obtain a basic regression tree;

[0148] The first circulation unit is used to determine the merging point by taking the basic regression tree as the new initial regression tree so as to merge the new initial regression tree until there is no alternative splitting point after the test data set is divided according to the basic regression tree.

[0149] In one embodiment, the final regression tree generation module 306 includes:

[0150] The second data set division unit is used to divide the training data set S based on the basic regression tree. train After the division, the connection distance range of each road network (j a , j a+1 ] all correspond to data sets s a,a+1 ;

[0151] The remaining part generates a unit for classifying the dataset s according to personal attributes. a,a+1 Split to generate the remaining part of the basic regression tree.

[0152] In one embodiment, the final regression tree generation module 306 includes:

[0153] The second candidate split point determination unit is used to traverse the data set s a,a+1 The personal attributes in the dataset s a,a+1 Perform binary segmentation and determine the second candidate segmentation point;

[0154] A data set segmentation unit, used to select the second candidate segmentation point with the largest information gain as the data set s a,a+1 The best split point of the data set s is a,a+1 Perform binary segmentation to obtain data set s b,b+1 ;

[0155] The second cycle unit is used to convert the data set s b,b+1 As a new dataset s a,a+1 To determine the best split point for the new data set s a,a+1 Split until the data set s b,b+1 The un-split situation occurs, thereby generating the remaining part of the base regression tree.

[0156] In one embodiment, an electronic device is provided, which may be specifically a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above steps of the method for predicting the station connection mode share when executing the computer program.

[0157] In one embodiment, a storage medium is provided, which may be a computer storage medium. The storage medium stores a computer program. When the computer program is executed by a processor, the steps of the method for predicting the station connection mode share rate of any one of the above items are performed.

[0158] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications are also considered to be within the scope of protection of the present application.

[0159] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a ROM (Read-Only Memory) or a RAM (Random Access Memory), etc.

Claims

1. A method for predicting the share of station connection mode, characterized in that: include: After obtaining the survey contents of a preset number of passengers, determining preferred passengers and using the survey contents of all preferred passengers as basic data, wherein the survey contents include personal attributes, passenger type, connection method, connection location and connection time; After determining the road network connection distance based on the connection location in the basic data, construct a data set S and assign variables to some features of the elements in the data set S, wherein the data set S is composed of the preferred passengers as elements in a set, and the features contained in each element are personal attributes, passenger type, connection method and road network connection distance, and the partial features are personal attributes, passenger type and connection method; The data set S is divided into a training data set S train And the test dataset S test ; Based on the training data set S train , generating an initial regression tree specified by some decision nodes through the binary segmentation method in the CART algorithm, wherein the some decision nodes are passenger type and road network connection distance in turn; Divide the test data set S according to the initial regression tree test , get the data set s corresponding to the preset road network connection distance range k,k+1 , for all datasets s with adjacent road network connection distance ranges k,k+1 Perform a chi-square test to determine whether the data set s k,k+1 Whether the distribution of various connection modes between the two is consistent, if so, taking the distance value of the road network connection distance range as the merging point, and then post-pruning the initial regression tree based on the merging point until there is no merging point, thereby obtaining a basic regression tree; According to the basic regression tree, the training data set S train Divide and obtain the data set s corresponding to the preset road network connection distance range a,a+1 , and then the dataset s is sorted according to personal attributes a,a+1 Split to generate the remaining part of the basic regression tree, and then based on the test data set S test Post-pruning the remaining part to obtain a final regression tree; According to the proportion of the number of people using each type of connection in the data set corresponding to each leaf node in the final regression tree, the share rate of each type of connection at the station is predicted.

2. The method for predicting the station connection mode share rate according to claim 1 is characterized in that: After obtaining the survey contents of a preset number of passengers, determining preferred passengers and using the survey contents of all preferred passengers as basic data includes: After obtaining the survey contents of a preset number of passengers, the connecting time of each passenger is compared with the corresponding theoretical connecting time to obtain a reference difference value of each passenger, wherein the reference difference value is the minimum value in the absolute value interval of the error between the connecting time and the theoretical connecting time; If the reference difference of the passenger is less than the preset difference, the passenger is determined to be a preferred passenger and the survey content of all preferred passengers is used as basic data.

3. The method for predicting the station connection mode share rate according to claim 1 is characterized in that: The data set S is divided into a training data set S train And the test dataset S test include: By random sampling, the data set S is divided into a training data set S according to a preset ratio. train And the test dataset S test .

4. The method for predicting the station connection mode share rate according to claim 1 is characterized in that: The binary segmentation method in the CART algorithm includes: S40, firstly performing binary segmentation on the data set according to the passenger type of the passengers to obtain a first data set, wherein the passenger type is a binary variable; S41, traversing the road network connection distances in the first data set to perform binary segmentation on the first data set, and determining a first candidate segmentation point; S42, selecting a first candidate split point with the largest information gain as the best split point for the first data set, and performing binary splitting on the first data set based on the best split point to obtain a second data set; S43, taking the second data set as a new first data set, and repeating steps S41-S43 until the second data set is no longer segmented.

5. The method for predicting the station connection mode share rate according to claim 4 is characterized in that: The test data set S is divided according to the initial regression tree test , get the data set s corresponding to the preset road network connection distance range k,k+1 , for all datasets s with adjacent road network connection distance ranges k,k+1 Perform a chi-square test to determine whether the data set s k,k+1 Whether the distribution of various connection modes between the two is consistent, if so, the distance value of the road network connection distance range is used as a merging point, and then the initial regression tree is post-pruned based on the merging point until there is no merging point, and a basic regression tree is obtained, including: S50, according to the initial regression tree, the test data set S test Divide so that each road network connection distance range (j k ,j k+1 ] all correspond to data sets s k,k+1 ; S51, for all data sets s with adjacent road network connection distance range k,k+1 、s k+1,k+2 Perform a chi-square test to determine the data set s k,k+1 and datasets k+1,k+2 Whether the distribution of various connection methods in the S52, if yes, then set the road network connection distance value j k+1 As an alternative merge point; S53, determining the information entropy change values ​​corresponding to all candidate merging points, selecting the candidate merging point corresponding to the minimum information entropy change value as the merging point, and pruning the initial regression tree according to the merging point to obtain a basic regression tree; S54, using the basic regression tree as a new initial regression tree, repeating steps S50-S54 until there are no candidate merging points after the test data set is divided according to the basic regression tree.

6. The method for predicting the station connection mode share rate according to claim 1 is characterized in that: The training data set S is trained according to the basic regression tree train Divide and obtain the data set s corresponding to the preset road network connection distance range a,a+1 , and then the dataset s is sorted according to personal attributes a,a+1 Split to generate the remaining part of the basic regression tree, including: Based on the basic regression tree, the training data set S train After the division, the connection distance range of each road network (j a ,j a+1 ] all correspond to data sets s a,a+1 ; According to personal attributes, the dataset s a,a+1 Split to generate the remaining part of the basic regression tree.

7. The method for predicting the station connection mode share rate according to claim 6 is characterized in that: Personal attributes are continuous features. a,a+1 Split to generate the remaining part of the basic regression tree, including: S60, traversing the data set s a,a+1 The personal attributes in the dataset s a,a+1 Perform binary segmentation and determine the second candidate segmentation point; S61, selecting the second candidate split point with the largest information gain as the data set s a,a+1 The best split point of the data set s is a,a+1 Perform binary segmentation to obtain data set s b,b+1 ; S62, the data set s b,b+1 As a new dataset s a,a+1 Repeat steps S60-S62 until the data set s b,b+1 The un-split situation occurs, thereby generating the remaining part of the base regression tree.

8. A device for predicting the share of station connection mode, characterized in that: include: A basic data acquisition module, configured to determine preferred passengers and use the survey contents of all preferred passengers as basic data after obtaining survey contents of a preset number of passengers, wherein the survey contents include personal attributes, passenger type, connection method, connection location and connection time; A data set construction module, for constructing a data set S and assigning variables to some features of the elements in the data set S after determining the road network connection distance based on the connection locations in the basic data, wherein the data set S is composed of the preferred passengers as elements in a set, and the features contained in each element are personal attributes, passenger type, connection method and road network connection distance, and the partial features are personal attributes, passenger type and connection method; The data set partitioning module is used to divide the data set S into a training data set S train And the test dataset S test ; An initial regression tree generation module is used to generate an initial regression tree based on the training data set S train , generating an initial regression tree specified by some decision nodes through the binary segmentation method in the CART algorithm, wherein the some decision nodes are passenger type and road network connection distance in turn; A basic regression tree generation module is used to divide the test data set S according to the initial regression tree. test , get the data set s corresponding to the preset road network connection distance range k,k+1 , for all datasets s with adjacent road network connection distance ranges k,k+1 Perform a chi-square test to determine whether the data set s k,k+1 Whether the distribution of various connection modes between the two is consistent, if so, taking the distance value of the road network connection distance range as the merging point, and then post-pruning the initial regression tree based on the merging point until there is no merging point, thereby obtaining a basic regression tree; The final regression tree generation module is used to generate a training data set S according to the basic regression tree. train Divide and obtain the data set s corresponding to the preset road network connection distance range a,a+1 , and then the dataset s is sorted according to personal attributes a,a+1 Split to generate the remaining part of the basic regression tree, and then based on the test data set S test Post-pruning the remaining part to obtain a final regression tree; The module for predicting the share of each type of connection mode is used to predict the share of each type of connection mode at the station according to the proportion of the number of people using each type of connection mode in the data set corresponding to each leaf node in the final regression tree.

9. A device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the computer program, it implements the steps of the method for predicting the station connection mode share rate as described in any one of claims 1-7.

10. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for predicting the station connection mode share rate as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Rail transit passenger flow predicting method for predicting passenger travel probability and based on support vector machine (SVM)

    CN103310287A

  • A multi-feature subway passenger number prediction method based on loyal passengers

    CN107067115A