Decision tree and rule engine, decision tree Rule Engine

Source: Internet
Author: User

Decision tree and rule engine, decision tree Rule Engine

Use of Decision Trees

Decision Trees are often used in data mining and are one of the most basic algorithms. Almost everyone who has learned Data Mining knows decision trees. However, the original use of the restored decision tree is more practical and intuitive when used for decision making or decision-making. Its tree structure guides people to focus on several of the most important directions when facing a decision. These directions are fixed and further subdivided. In recent years, graphics/office automation tools such as mind-oriented graphs have gradually emerged and are well received by everyone, that is, a good implementation of decision trees. However, decision trees are not very commonly used in various enterprise application systems. In the final analysis, decision trees are thought-oriented content and erratic content, making it very difficult to form structured content. In addition, most business systems on the market use relational databases, which are very useful in processing formatted data, but tree data processing is not qualitative. Therefore, some technical companies are gradually Using Object-based databases. On the other hand, decisions and judgments in decision trees are relatively irregular. Many content is more like programming by programmers. They are rules rather than information, which leads to difficulties in traditional business systems. Composition and Program Performance of Decision TreesThe decision tree uses a tree structure to express business rules. As shown in. Each non-leaf node code a decision/decision, and the leaf node executes the action. Each edge represents an optional decision value, which can be understood as a judgment. For example, A = red or = blue is an optional value, and B is A decision node.
However, in program implementation, it is not necessarily such an organization. Generally, the node text is easier to see than the online text, in addition, various programming languages are based on tree-type controls, which are expressed in the form of nodes and seldom use connection lines for tables. Therefore, the most common representation in a program is to concentrate a large amount of information in the results. For example, if the node A = red is written, A = red is written instead of another name. For the leaf node, You need to display the Action in more detail ), the effect may be as follows:
The data of some decision tables can also be organized as decision trees or used to express more suitable data. The decision tree can quickly and effectively associate multiple related rules. The decision logic at each level may be clearly viewed through the tree relationship. When performing an operation, you can quickly traverse each decision node and check whether the operation meets the conditions. If the operation meets the conditions, you can traverse it down. Finally, find the applicable conditions and applicable operation actions. Parking lot pricing example using decision treeThe Business System caller does not need to fill in any code, and all calculations are performed in CKRule. The settings in CKRule are as follows. Park1_pf = new park1_(); _ pf. parkType = cmbParkType. text; _ pf. distType = cmbDistType. text; _ pf. cardType = cmbCardType. text; _ pf. partTime = Convert. toDouble (numericUpDown1.Value); _ pf = new RuleFacade (). exec ("cost-parking fee calculation-Decision Tree", _ pf); txt133. text = _ pf. cost + ""; to view the rule settings, use the CKRule editor to open "cost-parking Fee calculation-decision tree. ckp file, find the decision tree and master rule to view.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.