摘要 |
<p>Embodiments of the present invention provide a method and a device for generating a decision tree. The method comprises: generating a coding rule set according to a rule set; generating a first weighted undirected graph; calculating the weight of each side in the first weighted undirected graph; if the weight of a side having the greatest weight in the first weighted undirected graph is greater than a first threshold, executing a first operation circularly until the weight of a side having the greatest weight in a newly generated weighted undirected graph is smaller than or equal to the first threshold; and generating a decision tree for a sub-rule set corresponding to each vertex in the newly generated weighted undirected graph. Moreover, embodiments of the present invention further provide a method and a device for generating another decision tree. By means of the technical solutions provided in the embodiments of the present invention, the probability of the occurrence of rule replication can be reduced.</p> |