Decision tree construction method, device, equipment and storage medium based on column storage
Through the decision tree construction method based on column storage, the decision tree is generated by dividing samples by reading column data and counting feature distributions, which solves the high time-consuming problem caused by row storage and improves the efficiency of decision tree construction.
Patent Information
- Application Number
- CN202010087103.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-02-11
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2040-02-11
AI Technical Summary
When the current decision tree is constructed with a large amount of data, the row-based storage method results in long data reading and low work efficiency.
Using a decision tree construction method based on column storage, the corresponding column data is read according to the first splitting characteristics of each node in the current layer, the samples are divided into nodes, and the feature distribution is counted to generate the next layer of nodes until convergence , obtain the decision tree.
The data reading time is reduced and the efficiency of decision tree construction is improved.
Smart Images

Figure CN111275203B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine learning technology, and in particular to a decision tree construction method, device, equipment and storage medium based on column storage. Background Art
[0002] With the development of computer technology, more and more technologies (big data, distributed, blockchain, artificial intelligence, etc.) are being applied in the financial field. The traditional financial industry is gradually transforming to financial technology (Fintech). However, due to the security and real-time requirements of the financial industry, higher requirements are also placed on technology.
[0003] Decision trees are widely used in the financial field, but the current decision tree construction is mainly based on row storage for data reading. When constructing a decision tree with a large amount of data, it will take a lot of time in the data reading process, which makes the work efficiency low. Summary of the invention
[0004] The present invention provides a decision tree construction method, device, equipment and storage medium based on column storage, aiming to save the training time of the decision tree and improve work efficiency.
[0005] To achieve the above object, the present invention provides a decision tree construction method based on column storage, the method comprising:
[0006] Reading corresponding column data according to the first splitting feature of each node in the current layer, and dividing each sample into each node in the current layer according to the column data;
[0007] Obtaining group samples in each of the nodes, and counting the feature distribution of each feature in the group samples;
[0008] Generate the next layer of nodes according to the feature distribution;
[0009] The nodes in the next layer are split until convergence to obtain a decision tree.
[0010] Preferably, each of the nodes corresponds to a different first split feature, and the step of dividing each sample into each node in the current layer according to the column data includes:
[0011] Acquire a first feature of each sample from the column data, where the first feature corresponds to the first split feature;
[0012] The first splitting feature of each node is sent to one or more execution machines, and the one or more execution machines divide the samples into nodes in the current layer according to the first feature.
[0013] Preferably, the step of generating the next layer of nodes according to the feature distribution includes:
[0014] Sending the feature distribution to one or more execution machines, which perform parallel solving to obtain an optimal value;
[0015] The optimal value is used as the second split feature to generate the next layer of nodes.
[0016] Preferably, the step of reading corresponding column data according to the first splitting feature of each node in the current layer includes:
[0017] The first splitting feature of each node in the current layer is obtained, and column data corresponding to the first splitting feature is read from a data table.
[0018] Preferably, before the step of reading the corresponding column data according to the first splitting feature of each node in the current layer, the step further includes:
[0019] Scan the sample data, perform feature consistency processing on the sample data, and store the sample data in columns according to the features.
[0020] Preferably, the step of obtaining group samples in each node and counting the feature distribution of each feature in the group samples includes:
[0021] Record the samples divided into the same node as the grouped samples, and obtain the grouped samples corresponding to the respective nodes;
[0022] The grouped samples are statistically analyzed according to preset feature statistical rules to obtain the feature distribution of each feature.
[0023] Preferably, the first splitting features of each node in the current layer are education level, deposit and age, respectively. The steps of reading corresponding column data according to the first splitting features of each node in the current layer and dividing each sample into each node in the current layer according to the column data include:
[0024] Read the education column data, deposit column data and age column data corresponding to education, deposit and age from the data table;
[0025] The education column data, deposit column data and age column data are sent to three execution machines respectively, and the three execution machines divide the samples into nodes in the current layer according to the corresponding column data.
[0026] In addition, to achieve the above-mentioned purpose, the present invention also provides a decision tree construction device based on column storage, and the decision tree construction device based on column storage includes:
[0027] A partitioning module, configured to read corresponding column data according to the first splitting feature of each node in the current layer, and partition each sample into each node in the current layer according to the column data;
[0028] A statistical module, used to obtain group samples in each node and count the feature distribution of each feature in the group samples;
[0029] A generation module, used for generating the next layer of nodes according to the feature distribution;
[0030] The acquisition module is used to split the nodes in the next layer until convergence to obtain a decision tree.
[0031] In addition, to achieve the above-mentioned purpose, the present invention also provides a decision tree construction device based on column storage, wherein the decision tree construction device based on column storage includes a processor, a memory, and a decision tree construction program based on column storage stored in the memory. When the decision tree construction program based on column storage is executed by the processor, the steps of the decision tree construction method based on column storage as described above are implemented.
[0032] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer storage medium, on which a decision tree construction program based on column storage is stored. When the decision tree construction program based on column storage is executed by a processor, the steps of the decision tree construction method based on column storage as described above are implemented.
[0033] Compared with the prior art, the present invention provides a decision tree construction method, device, equipment and storage medium based on column storage, which reads the corresponding column data according to the first split feature of each node in the current layer, and divides each sample into each node in the current layer according to the column data; obtains the grouped samples in each node, and counts the feature distribution of each feature in the grouped samples; generates the next layer of nodes according to the feature distribution; splits the next layer of nodes until convergence, and obtains a decision tree. Therefore, the decision tree is constructed based on column storage, which reduces the time of data reading and improves work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a schematic diagram of the hardware structure of a decision tree construction device based on column storage involved in various embodiments of the present invention;
[0035] Figure 2 It is a flowchart of a first embodiment of a decision tree construction method based on column storage according to the present invention;
[0036] Figure 3 It is a functional module diagram of the first embodiment of the decision tree construction device based on column storage of the present invention.
[0037] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0038] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0039] The column-storage-based decision tree construction device mainly involved in the embodiments of the present invention refers to a network connection device that can achieve network connection. The column-storage-based decision tree construction device can be a server, a cloud platform, etc.
[0040] Reference Figure 1 , Figure 1 It is a schematic diagram of the hardware structure of the decision tree construction device based on column storage involved in each embodiment of the present invention. In an embodiment of the present invention, the decision tree construction device based on column storage may include a processor 1001 (such as a central processing unit, CPU), a communication bus 1002, an input port 1003, an output port 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components; the input port 1003 is used for data input; the output port 1004 is used for data output, and the memory 1005 can be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 can optionally be a storage device independent of the aforementioned processor 1001. Those skilled in the art can understand that Figure 1 The hardware structure shown in the figure does not constitute a limitation of the present invention, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0041] Continue to refer to Figure 1 , Figure 1 The memory 1005 as a readable storage medium may include an operating system, a network communication module, an application module, and a decision tree construction program based on column storage. Figure 1 In the example, the network communication module is mainly used to connect to the server and perform data communication with the server; and the processor 1001 is used to call the column-based storage decision tree construction program stored in the memory 1005 and perform the following operations:
[0042] Reading corresponding column data according to the first splitting feature of each node in the current layer, and dividing each sample into each node in the current layer according to the column data;
[0043] Obtaining group samples in each of the nodes, and counting the feature distribution of each feature in the group samples;
[0044] Generate the next layer of nodes according to the feature distribution;
[0045] The nodes in the next layer are split until convergence to obtain a decision tree.
[0046] The processor 1001 is further configured to call a decision tree construction program based on column storage stored in the memory 1005, and perform the following operations:
[0047] Acquire a first feature of each sample from the column data, where the first feature corresponds to the first split feature;
[0048] The first splitting feature of each node is sent to one or more execution machines, and the one or more execution machines divide the samples into nodes in the current layer according to the first feature.
[0049] The processor 1001 is further configured to call a decision tree construction program based on column storage stored in the memory 1005, and perform the following operations:
[0050] Sending the feature distribution to one or more execution machines, which perform parallel solving to obtain an optimal value;
[0051] The optimal value is used as the second split feature to generate the next layer of nodes.
[0052] The processor 1001 is further configured to call a decision tree construction program based on column storage stored in the memory 1005, and perform the following operations:
[0053] The first splitting feature of each node in the current layer is obtained, and column data corresponding to the first splitting feature is read from a data table.
[0054] The processor 1001 is further configured to call a decision tree construction program based on column storage stored in the memory 1005, and perform the following operations:
[0055] Scan the sample data, perform feature consistency processing on the sample data, and store the sample data in columns according to the features.
[0056] The processor 1001 is further configured to call a decision tree construction program based on column storage stored in the memory 1005, and perform the following operations:
[0057] Record the samples divided into the same node as the grouped samples, and obtain the grouped samples corresponding to the respective nodes;
[0058] The grouped samples are statistically analyzed according to preset feature statistical rules to obtain the feature distribution of each feature.
[0059] The processor 1001 is further configured to call a decision tree construction program based on column storage stored in the memory 1005, and perform the following operations:
[0060] Read the education column data, deposit column data and age column data corresponding to education, deposit and age from the data table;
[0061] The education column data, deposit column data and age column data are sent to three execution machines respectively, and the three execution machines divide the samples into nodes in the current layer according to the corresponding column data.
[0062] Decision Tree is a decision analysis method that uses a decision tree to determine the probability of the expected value of the net present value being greater than or equal to zero, evaluate project risks, and determine its feasibility based on the known probabilities of various situations. It is a graphical method that intuitively uses probability analysis. In machine learning, a decision tree is a prediction model that represents a mapping relationship between object attributes and object values.
[0063] An embodiment of the present invention provides a decision tree construction method based on column storage. In SQL (Structured Query Language) Server (database), Page is the basic unit of data storage, and data row is the storage unit of actual data. Data is stored on Page in sequence starting from Page Header. This way of storing records on Page by row is row storage. When data is stored continuously in a single column rather than multiple rows, it is called column storage. Column storage is not as good as row storage in terms of writing efficiency and ensuring data integrity. The advantage of column storage is that no redundant data is generated during the reading process, which is especially important in the field of big data processing where data integrity requirements are not high.
[0064] Reference Figure 2 , Figure 2 It is a flowchart of the first embodiment of the decision tree construction method based on column storage of the present invention.
[0065] In this embodiment, the decision tree construction method based on column storage is applied to a decision tree construction device based on column storage, and the method includes:
[0066] Step S101, reading corresponding column data according to the first splitting feature of each node in the current layer, and dividing each sample into each node in the current layer according to the column data;
[0067] Each node of each layer of the decision tree has its own split feature, and the node is split according to the split feature to obtain the next node. In this embodiment, the split feature of the current layer is marked as the first split feature. After obtaining the first split feature, the corresponding column data is read according to the first split feature. The first split feature is obtained, and the column data corresponding to the first split feature is read from the data table.
[0068] In this embodiment, each node corresponds to a different first split feature, and the step of dividing each sample into each node in the current layer according to the column data includes:
[0069] The first feature of each sample is obtained from the column data, the first feature corresponding to the first split feature; and the value of the first split feature is marked as the first feature of each sample according to the column data. For example, if the first split feature is age, and the age of a sample in the read column data is 20 years old, then the first feature of the sample is 20 years old.
[0070] The first splitting feature of each node is sent to one or more execution machines, and the one or more execution machines divide the samples into nodes in the current layer according to the first feature. Since the first splitting features corresponding to each node are different, the first splitting features of each node can be sent to multiple execution machines, and the multiple execution machines perform parallel processing. For example, if there are 4 nodes in the current layer, and the corresponding first splitting features are feature A, feature B, feature C, and feature D, the first splitting features of these 4 nodes can be sent to execution machine No. 1, execution machine No. 2, execution machine No. 3, and execution machine No. 4 for separate processing. In this way, multi-threaded processing is achieved and processing efficiency is improved.
[0071] Furthermore, before the step of reading the corresponding column data according to the first splitting feature of each node in the current layer, the step further includes:
[0072] Scan the sample data, perform feature consistency processing on the sample data, and store the sample data in columns according to the features.
[0073] Column storage requires splitting a complete piece of data into multiple single columns for storage, and the corresponding columns are also read during the reading process. The data stored in the column will be split before storage, so the sample data that needs to be stored in the column can be processed for feature consistency. Specifically, scan each piece of sample data, obtain the target feature value corresponding to the target feature, store the target feature value as the target sample data according to the preset logic, and ignore other values in the sample data. If one or more target feature values are missing in a sample data, the sample data is discarded or the missing target feature values are supplemented in a preset manner. After consistency processing, unified sample data can be obtained.
[0074] Furthermore, the sample data is stored in columns according to the target feature, and each column contains a target feature.
[0075] Step S102, obtaining group samples in each node, and counting the feature distribution of each feature in the group samples;
[0076] Specifically, the step of obtaining the grouped samples in each node and counting the feature distribution of each feature in the grouped samples includes:
[0077] Step S102a, recording the samples divided into the same node as the grouped samples, and obtaining the grouped samples corresponding to the respective nodes;
[0078] After dividing each sample into each node of the current layer, each node includes part of the samples, and the samples divided into the same node are recorded as the grouped samples. Thus, each node has a corresponding grouped sample, and multiple grouped samples corresponding to each node are obtained respectively.
[0079] Step S102b, performing statistics on the grouped samples according to preset feature statistical rules to obtain feature distribution of each feature.
[0080] The multiple grouped samples are grouped according to the first splitting feature in the current layer. It can be understood that if other features of the multiple grouped samples have not been grouped in layers above the current layer, they need to be grouped in a layer below the current layer.
[0081] In this embodiment, a preset feature statistical rule is set, and the preset feature statistical rule can be to perform statistics on each feature using a normal distribution, or to perform statistics by means of an average value, a maximum value, a minimum value, a median value, etc. Then, the grouped samples are statistically analyzed according to the preset feature statistical rule to obtain the feature status of each feature.
[0082] Step S103, generating the next layer of nodes according to the feature distribution.
[0083] After obtaining the feature distribution, the optimal value can be obtained, and the next node is generated by splitting according to the optimal value, so that the decision tree is continuously split until convergence.
[0084] Specifically, the step of generating the next layer of nodes according to the feature distribution includes:
[0085] Step S103a, sending the feature distribution to one or more execution machines, and the one or more execution machines perform parallel solving to obtain the optimal value;
[0086] Specifically, the feature distribution of each node is sent to one or more execution machines, and the one or more execution machines solve the feature distribution according to a preset algorithm. For example, the entropy and GINI coefficient (impurity) can be calculated by the algorithm to obtain the optimal value of the feature distribution. For example, the feature with the highest information gain can be selected as the test feature, and the node sample can be divided into subsets using this feature, which will minimize the mixing degree of samples of different categories in each subset, and minimize the information (entropy) required for sample division in each subset, thereby obtaining the optimal value.
[0087] In this embodiment, multiple execution machines can perform the solution simultaneously, thus realizing parallel computing and greatly improving work efficiency.
[0088] Step S103b: Using the optimal value as the second split feature to generate the next layer of nodes.
[0089] The optimal value is used as a second split feature of the node, and the next node is generated based on the second split feature.
[0090] Step S104: splitting the nodes in the next layer until convergence to obtain a decision tree.
[0091] Specifically, the node samples in the next layer of nodes are counted to obtain the second feature distribution, and the execution machine calculates the optimal value based on the second feature distribution, and continues to generate nodes. The above steps are repeated until the decision tree convergence condition is reached, and the final decision tree is obtained after branch reduction. After the decision tree is fully grown, the redundant branches are pruned.
[0092] This embodiment can perform branch pruning by post-pruning. Specifically, based on the classification error rate of each branch and the weight of each branch, the expected classification error rate when the node is not pruned is calculated; for each non-leaf node, the classification error rate after the node is pruned is calculated. If the classification error rate becomes larger after pruning, the pruning is abandoned; otherwise, the node is forced to be a leaf node and the category is marked. After a series of pruned decision tree candidates are generated, the classification accuracy of each candidate decision tree is evaluated using test data (data not involved in modeling), and the decision tree with the smallest classification error rate is retained.
[0093] Decision tree models are often used in the financial field. For example, in the credit business of banks, a credit risk decision tree can be constructed. When constructing a credit risk decision tree, a large amount of user data is obtained as samples. The samples include multiple credit features, including education, deposits, occupation, age, historical loan records, family situation, fixed assets, etc.
[0094] In the process of constructing a credit risk decision tree, it is assumed that the first splitting features of each node in the current layer are education level, deposit and age, and the steps of reading the corresponding column data according to the first splitting features of each node in the current layer and dividing each sample into each node in the current layer according to the column data include: reading education level column data, deposit column data and age column data corresponding to education level, deposit and age from a data table; sending the education level column data, deposit column data and age column data to three execution machines respectively, and the three execution machines divide each sample into each node in the current layer according to the corresponding column data, and the each node is: education level node, deposit node and age node.
[0095] Furthermore, the samples in the education node, the deposit node and the age node are marked as grouped samples: sample A, sample B and sample C, and the distribution of each feature in each grouped sample is counted respectively. For sample A, the distribution of other features except the education feature is obtained; for sample B, the distribution of other features except the deposit feature is obtained; for sample C, the distribution of other features except the age feature is obtained. It can be understood that the other features can be specifically selected as needed, for example, one or more features of the upper node of the current layer node can also be eliminated. After the feature distribution of the samples in the education node, the deposit node and the age node is obtained, the next node is generated according to the feature distribution. For example, for the education node, it can be split according to the occupational feature to obtain the next layer of nodes. Repeat the above steps until the convergence condition is met and a credit risk decision tree is obtained.
[0096] Through the above scheme, this embodiment reads the corresponding column data according to the first split feature of each node in the current layer, and divides each sample into each node in the current layer according to the column data; obtains the grouped samples in each node, and counts the feature distribution of each feature in the grouped samples; generates the next layer of nodes according to the feature distribution, splits the next layer of nodes until convergence, and obtains a decision tree. Thus, the decision tree is constructed based on column storage, which reduces the time of data reading and improves work efficiency.
[0097] In addition, this embodiment also provides a decision tree construction device based on column storage. Figure 3 , Figure 3 This is a functional module diagram of the first embodiment of the decision tree construction device based on column storage of the present invention.
[0098] In this embodiment, the decision tree construction device stored in the column is a virtual device, which is stored in Figure 1 The memory 1005 of the column-stored decision tree construction device shown is used to implement all functions of the column-stored decision tree construction program: used to read the corresponding column data according to the first splitting feature of each node in the current layer, and divide each sample into each node in the current layer according to the column data; used to obtain the grouped samples in each node, and count the feature distribution of each feature in the grouped samples; used to generate the next layer of nodes according to the feature distribution; used to split the next layer of nodes until convergence to obtain a decision tree.
[0099] Specifically, the decision tree construction device based on column storage includes:
[0100] A partitioning module 10 is used to read corresponding column data according to the first splitting feature of each node in the current layer, and partition each sample into each node in the current layer according to the column data;
[0101] A statistical module 20 is used to obtain group samples in each node and to count the characteristic distribution of each characteristic in the group samples;
[0102] A generating module 30, used for generating the next layer of nodes according to the feature distribution;
[0103] The obtaining module 40 is used to split the nodes in the next layer until convergence to obtain a decision tree.
[0104] Furthermore, the generating module comprises:
[0105] A sending unit, used for sending the characteristic distribution to one or more execution machines, so that the one or more execution machines perform parallel solving to obtain an optimal value;
[0106] A generating unit is used to generate a next layer of nodes by using the optimal value as a second splitting feature.
[0107] Furthermore, the division module includes:
[0108] A reading unit is used to obtain the first split feature and read column data corresponding to the first split feature from a data table.
[0109] Furthermore, the generating module further includes:
[0110] The scanning unit is used to scan the sample data, perform feature consistency processing on the sample data, and store the sample data in columns according to the features.
[0111] Furthermore, the statistical module includes:
[0112] An acquisition unit, used to record the samples divided into the same node as the grouped samples, and acquire the grouped samples corresponding to the respective nodes;
[0113] The statistical unit is used to perform statistics on the grouped samples according to preset feature statistical rules to obtain the feature distribution of each feature.
[0114] In addition, an embodiment of the present invention further provides a computer storage medium, on which a decision tree construction program based on column storage is stored. When the decision tree construction program based on column storage is executed by a processor, the steps of the decision tree construction method based on column storage as described above are implemented, which will not be repeated here.
[0115] Compared with the prior art, the present invention proposes a decision tree construction method, device, equipment and storage medium based on column storage, which relates to the field of machine learning technology. The method includes: reading the corresponding column data according to the first split feature of each node in the current layer, and dividing each sample into each node in the current layer according to the column data; obtaining the grouped samples in each node, and counting the feature distribution of each feature in the grouped samples; generating the next layer of nodes according to the feature distribution; splitting the next layer of nodes until convergence, and obtaining a decision tree. Therefore, constructing a decision tree based on column storage reduces the time of data reading and improves work efficiency.
[0116] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0117] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0118] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present invention.
[0119] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A decision tree construction method based on column storage, characterized in that: The method includes: Reading corresponding column data according to the first splitting feature of each node in the current layer, and dividing each sample into each node in the current layer according to the column data; Obtaining group samples in each of the nodes, and counting the feature distribution of each feature in the group samples; The step of obtaining the grouped samples in each node and counting the feature distribution of each feature in the grouped samples includes: Record the samples divided into the same node as the grouped samples, and obtain the grouped samples corresponding to the respective nodes; The grouped samples are counted according to a preset feature statistical rule to obtain a feature distribution of each feature, wherein the preset feature statistical rule includes counting each feature using a normal distribution, or counting each feature in the form of an average value, a maximum value, a minimum value, and a median value; Sending the feature distribution to one or more execution machines, which perform parallel solving to obtain an optimal value; Using the optimal value as the second split feature to generate the next layer of nodes; The nodes in the next layer are split until convergence to obtain a decision tree.
2. The method according to claim 1, characterized in that Each of the nodes corresponds to a different first splitting feature, The step of dividing each sample into each node in the current layer according to the column data comprises: Acquire a first feature of each sample from the column data, where the first feature corresponds to the first split feature; The first splitting feature of each node is sent to one or more execution machines, and the one or more execution machines divide the samples into nodes in the current layer according to the first feature.
3. The method according to claim 1, characterized in that: The step of reading corresponding column data according to the first splitting feature of each node in the current layer includes: The first splitting feature of each node in the current layer is obtained, and column data corresponding to the first splitting feature is read from a data table.
4. The method according to claim 1, characterized in that Before the step of reading the corresponding column data according to the first splitting feature of each node in the current layer, the following step is also included: Scan the sample data, perform feature consistency processing on the sample data, and store the sample data in columns according to the features.
5. The method according to claim 1, characterized in that The first splitting features of each node in the current layer are education level, deposit and age respectively. The steps of reading corresponding column data according to the first splitting features of each node in the current layer and dividing each sample into each node in the current layer according to the column data include: Read the education column data, deposit column data and age column data corresponding to education, deposit and age from the data table; The education column data, deposit column data and age column data are sent to three execution machines respectively, and the three execution machines divide the samples into nodes in the current layer according to the corresponding column data.
6. A decision tree construction device based on column storage, characterized in that: The decision tree construction device based on column storage includes: A partitioning module, configured to read corresponding column data according to the first splitting feature of each node in the current layer, and partition each sample into each node in the current layer according to the column data; A statistical module is used to obtain group samples in each node and to count the characteristic distribution of each feature in the group samples, wherein the statistical module is specifically used to record the samples divided into the same node as the group samples, and obtain the group samples corresponding to each node; perform statistics on the group samples according to preset characteristic statistical rules to obtain the characteristic distribution of each feature, wherein the preset characteristic statistical rules include performing statistics on each feature using a normal distribution, or performing statistics by means of average value, maximum value, minimum value and median value; A generation module is used to send the feature distribution to one or more execution machines, and the one or more execution machines perform parallel solutions to obtain the optimal value; the optimal value is used as the second split feature to generate the next layer of nodes; The acquisition module is used to split the nodes in the next layer until convergence to obtain a decision tree.
7. A decision tree construction device based on column storage, characterized in that: The column storage-based decision tree construction device includes a processor, a memory, and a column storage-based decision tree construction program stored in the memory. When the column storage-based decision tree construction program is executed by the processor, the steps of the column storage-based decision tree construction method described in any one of claims 1 to 5 are implemented.
8. A computer storage medium, characterized in that: The computer storage medium stores a decision tree construction program based on column storage, and when the decision tree construction program based on column storage is executed by the processor, the steps of the decision tree construction method based on column storage as described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Column-storage-oriented B+ tree index method for DWMS (data warehouse management system)
CN102609490A
Indexing method of distributed column storage system
CN106250523A
Method for pushing loan advertisement in application program, electronic device and medium
CN107895277A
Mechanical working state fault classification method for port quay crane based on decision tree algorithm
CN109522957A
Decision tree model training method and system, storage medium and prediction method
CN110728317A
