Decision trees are a common component of a machine learning system. The decision tree acts as the basis through which systems arrive at a prediction given certain data. At each node of the tree, the system may evaluate a set of conditions, and choose the branch that best matches those conditions. The trees themselves can be very wide and encompass a large number of increasingly branching decision points.
Zooming into increasingly smaller sections may reduce usefulness of the decision tree. For example, the expanded decision tree sections may no longer visually display relationships that appear in the non-expanded decision tree 100. For example, the overall structure of decision tree 100 may visually contrast different decision tree nodes, fields, branches, matches, etc. and help distinguish important data model information. However, as explained above, too many nodes, branches, and text may exist to display the entire structure of decision tree 100 on the same screen.
Model generator 112 may generate a decision tree 117 that visually represents model 113 as a series of interconnected nodes and branches. The nodes may represent questions and the branches may represent possible answers to the questions. Model 113 and the associated decision tree 117 can then be used to generate predictions or answers for input data 111. For example, model 113 and decision tree 117 may use financial and educational data 111 about an individual to predict a future income level for the individual or generate an answer regarding a credit risk of the individual. Model generators, models, and decision trees are known to those skilled in the art and are therefore not described in further detail.
As explained above, it may be difficult to clearly display decision tree 117 in an original raw form. For example, there may be too many nodes and branches, and too much text to clearly display the entire decision tree 117. A user may try to manually zoom into specific portions of decision tree 117 to more clearly view a subset of nodes and branches. However, zooming into a specific area may prevent a viewer from seeing other more important decision tree information and visually comparing information in different parts of the decision tree.
Visualization system 115 may automatically prune decision tree 117 and only display the most significant nodes and branches. For example, a relatively large amount of sample data 110 may be used for generating or training a first portion of decision tree 117 and a relatively small amount of sample data 110 may be used for generating a second portion of decision tree 117. The larger amount of sample data may allow the first portion of decision tree 117 to provide more reliable predictions than the second portion of decision tree 117.
Visualization system 115 may only display the nodes from decision tree 117 that receive the largest amounts of sample data. This allows the user to more easily view the key questions and answers in decision tree 117. Visualization system 115 also may display the nodes in decision tree in different colors that are associated with node questions. The color coding scheme may visually display node-question relationships, question-answer path relationships, or node-output relationships without cluttering the decision tree with large amounts of text. More generally, visualization system 115 may display nodes or branches with different design characteristics depending on particular attributes of the data. In an embodiment, visualization system 115 may show nodes or branches in different colors depending on an attribute of sample data 110 or input data 111, e.g., age or may show nodes or branches with different design characteristics, e.g., hashed, dashed, or solid lines or thick or thin lines, depending on another attribute of the data, e.g., sample size, number of instances, and the like.
Visualization system 115 may vary how decision tree 117 is pruned, color coded, and generally displayed on a computer device 118 based on model artifacts 114 and user inputs 116. Model artifacts 114 may comprise any information or metrics that relate to model 113 generated by model generator 112. For example, model artifacts 114 may identify the number of instances of sample data 110 received by particular nodes within decision tree 117, the fields and outputs associated with the nodes, and any other metric that may indicate importance levels for the nodes.
Instances may refer to any data that can be represented as a set of attributes. For example, an instance may comprise a credit record for an individual and the attributes may include age, salary, address, employment status, etc. In another example, the instance may comprise a medical record for a patient in a hospital and the attributes may comprise age, gender, blood pressure, glucose level, etc. In yet another example, the instance may comprise a stock record and the attributes may comprise an industry identifier, a capitalization value, and a price to earnings ratio for the stock.
The idea is a system for visualizing generic decision trees using visualization and interaction techniques appropriate for various web clients such as handheld, notebook, or desktop computers. An example of the interface is shown in
For explanation purposes, any field, branching criteria, or any other model parameters associated with a node may be referred to generally as a question and any parameters, data or other branching criteria used for selecting a branch will be referred to generally as an answer.
As explained above, the visualization system 115 may automatically prune decision tree 122 and not show all of the nodes and branches that originally existed in the raw non-modified decision tree model. Pruned decision tree 122 may include fewer nodes than the original decision tree but may be easier to understand and display the most significant portions of the decision tree. Nodes and branches for some decision tree paths may not be displayed at all. Other nodes may be displayed but the branches and paths extending from those nodes may not be displayed.
For example, the model generator may generate an original decision tree from sample data containing records for 100 different individuals. The record for only one individual may pass through a first node in the original decision tree. Dozens of records for other individuals may pass through other nodes in the original decision tree. The visualization system 115 may automatically prune the first node from decision tree 122.
In addition to being too large, raw decision trees may be difficult to interpret because of the large amounts of textual information. For example, the textual information may identify the question, field, and/or branching criteria associated with the nodes. Rather than displaying text, the visualization system may use a series of colors, shades, images, symbols, or the like, or any combination thereof to display node information.
For illustrative purposes, reference numbers are used to represent different colors. For example, some nodes 124 may be displayed with a color 1 indicating a first question/field/criteria. A second set of nodes 124 may be displayed with a color 2 indicating a second question/field/criteria, etc.
Nodes 124 with color 1 may ask a same first question, such as the salary of an individual and all of nodes 124 with color 2 may ask a same second question, such as an education level of the individual. Nodes 124 with the same color may have different thresholds or criteria. For example, some of nodes 124 with color 1 may ask if the salary for the individual is above $50K per year and other nodes 124 with color 1 may ask if the salary of the individual is above $80K.
The number of node colors may be limited to maintain the ability to discriminate between the colors. For example, only nodes 124 associated with a top ten key questions may be assigned colors. In order to better utilize the available colors, the visualization analyzes the “most important” fields or outputs used in the decision tree. This is determined by counting the amount of training data that each node receives. The top approximately 12 fields will receive a unique color, while the remaining nodes will receive a neutral grey color. Other nodes 124 may be displayed in decision tree 122 but may be associated with questions that did not receive enough sample data to qualify as one of the top ten key questions. Nodes 124 associated with the non-key questions may all be assigned a same color or may not be assigned any color.
Instead of being associated with questions, some nodes 124 in decision tree 124 may be associated with answers, outcomes, predictions, outputs, etc. For example, based on the questions and answers associated with nodes along a path, some nodes 124 may generate an answer “bad credit” and other nodes may generate an answer “good credit.” These nodes 124 are alternatively referred to as terminal nodes and may be assigned a different shape and/or color than the branching question nodes.
For example, the center section of all terminal nodes 124 may be displayed with a same color 11. In addition, branching nodes 124 associated with questions may be displayed with a hatched outline while terminal nodes 124 associated with answers, outcomes, predictions, outputs, etc. may be displayed with a solid outline. For explanation purposes, the answers, outcomes, predictions, outputs, etc. associated with terminal nodes may be referred to generally as outputs.
Color 134A not only visually identifies the question associated with the node but also may visually identify the question as receiving more than some threshold amount of the sample data during creation of the decision tree model. For example, only the nodes associated with the top ten model questions may be displayed in decision tree 122. Thus, each of nodes 124A in the decision tree will be displayed with one of ten different colors.
A terminal node 124B may comprise a solid outer ring 132B with a cross-hatched center section 130B. A color 134B within center section 130B is represented by the cross-hatched lines. The solid outer ring 132B and color 130B may identify node 124B as a terminal node associated with an answer, outcome, prediction, output, etc. For example, the output associated with terminal node 124B may comprise an income level for an individual or a confidence factor a person is good credit risk.
Decision tree 122 in
A cluster 140 of bad credit nodes with color 4 are displayed in a center portion of decision tree 122. A user may mouse over cluster 140 of nodes 124 and view the sequence of questions that resulted in the bad credit output. For example, a first question associated with node 124A may be related to employment status and a second question associated with a second lower level node 124B may be related to a credit check. The combination of questions for nodes 124A and 124B might identify the basis for the bad credit output associated with node cluster 140.
The visualization system may generate the colors associated with the outputs based on a percentage of sample data instances that resulted in the output. For example, 70 percent of the instances applied to a particular node may have resulted in the “good credit” output and 30 percent of the instances through the same node may have resulted in the “bad credit” output. The visualization system may assign the color 2 to the node indicating a majority of the outputs associated with the node are “good credit.”
In response to a second user input, the visualization system may toggle back to the color coded questions shown in
For example, a root level of decision tree 122 is shown in
Displaying the branch thicknesses allow users to more easily extract information from the decision tree 122. For example, node 124A may be associated with an employment question, node 124B may be associated with a credit question, and branch 126E may be associated with an answer of being employed for less than 1 year. Decision tree 122 shows that the largest amount of the sample data was associated with persons employed for less than one year.
The thickness of branches 126 also may visually indicate the reliability of the outputs generated from different branches and the sufficiency of the sample data used for generating decision tree 122. For example, a substantially larger amount of sample data was received by node 124B through branch 126E compared with other nodes and branches. Thus, outputs associated with node 124B and branch 126E may be considered more reliable than other outputs.
A user might also use the branch thickness to identify insufficiencies with the sample data. For example, the thickness of branch 126E may visually indicate 70 percent of the sample data contained records for individuals employed less than one year. This may indicate that the decision tree model needs more sample data for individuals employed for more than one year. Alternatively, a user may be confident that the sample data provides an accurate representation of the test population. In this case, the larger thickness of branch 126E may simply indicate that most of the population is usually only employed for less than one year.
For example, a user may select or hover a cursor over a particular node within a decision tree 150, such as node 156D. The visualization system may identify a path 152 from selected node 156D to a root node 156A. The visualization system then may display a color coded legend 154 on the side of electronic page 120 that contains all of the questions and answers associated with all of the nodes within path 152.
For example, a relationship question 154A associated with root node 156A may be displayed in box with color 1 and node 156A may be displayed with color 1. An answer of husband to relationship question 154A may cause the model to move to a node 156B. The visualization system may display question 154B associated with node 156B in a box with the color 2 and may display node 156B with color 2. An answer of high school to question 154B may cause the model to move to a next node 156C. The visualization system may display a capital gain question 154C associated with node 156C with the color 3 and may display node 156C with color 3.
The visualization system may display other metrics or data values 158. For example, a user may reselect or continue to hover the cursor over node 156D or may select a branch connected to node 156D. In response to the user selection, the visualization system may display a popup window that contains data 158 associated with node 156D. For example, data 158 may indicate that 1.33% of the sample data instances reached node 156D. As mentioned above, instances may comprise any group of information and attributes used for generating decision tree 150. For example, an instance may be census data associated with an individual or may be financial information related to a stock.
Thus, legend 154 displays the status of all the records at a split point along path 152, such as relationship=Husband. Legend 154 also contains the question/field to be queried at the each level of decision tree path 152, such as capital-gain. Fields commonly used by decision tree 150 and significant fields in terms of maximizing information gain that appear closer to root node 156A can also be quickly viewed.
Popup window 159 may display numeric data 158 identifying a percentage of records (instances) in the sample data that passed through node 156B during the model training process. The record information 158 may help a user understand other aspects of the underlying sample data. Data 158 may correspond with the width of branch 126. For example, the width of branch 126 visually indicates node 156B received a relatively large percentage of the sample data. Selecting node 156B or branch 126 causes the visualization system to display popup window 159 and display the actual 40.52% of sample data that passed through node 156B.
Any other values or metrics can be displayed within popup window 159, such as average values or other statistics related to questions, fields, outputs, or attributes. For example, the visualization system may display a dropdown menu within popup window 159. The user may select different metrics related to node 156B or branch 126 for displaying via selections in the dropdown menu.
In response to the user selecting or clicking node 182, the visualization system may display child nodes 184 connected below parent node 182. Child nodes 184 may be displayed with any of the color and/or symbol coding described above. In one example, the visualization system may isolate color coding to child nodes 184. For example, the top ranked child nodes 184 may be automatically color coded with associated questions. The visualization system also may display data 187 related to child nodes 184 in popup windows in response to the user selecting or hovering over child nodes 184 or selecting branches 186 connected to child nodes 184.
In order to keep the decision tree from getting too dense, branches 186 of the child node subtree may be expanded one at a time. For example, selecting parent node 182 may display a first branch 186A and a first child node 184A. Selecting parent node 182 a second time may display a second branch 186B and a second child node 184B.
A user may want to selectively prune the number of nodes 124 that are displayed in decision tree 122B. This may greatly simplify the decision tree model. An electronic image or icon represents a slider 190 and may be used for selectively varying the number of nodes displayed in the decision tree. As mentioned above, the top 100 nodes 124A may be displayed in decision tree 122A. Moving slider 190 to the right may cause the visualization system to re-pruned decision tree 124A into decision tree 124B with a fewer nodes 124B.
For example, the visualization system then may identify a number of nodes to display in decision tree 122B based on the position of slider 190, such as 20 nodes. The visualization system may then identify the 20 nodes and/or 20 questions that received the largest amount of sample data and display the identified nodes 124B in decision tree 122B. The visualization system may display nodes 124B with colors corresponding with the associated node questions. The visualization system also may display any of the other information described above, such as color coded outputs and/or popup windows that display other mode metrics.
Legend 200 also may display values 204 associated with the importance 204 of different fields/questions/factors 202 used in a decision tree 122. For example, decision tree 122 may predict salaries for individuals. Field 202A may have an importance value of 16691 which appears to have the third highest importance within fields 202. Thus, age field 202A may be ranked as the third most important question/field in decision tree 122 for predicting the salary of an individual. Any statistics can be used for identifying importance values 204. For example, importance values 204 may be based on the confidence level for fields 202.
For example, legend 220 may display outputs or classes 222A associated with node 224 or the output associated with node 224, a count 222B identifying a number of instances of sample data that generated output 222A, and a color 222C associated with the particular output. In this example, an output 226A of >50K may have a count 222B of 25030 and an output 226B of ≤50K may have a count 222B of 155593.
Hardware and Software
While only a single computing device 1000 is shown, the computing device 1000 may include any collection of devices or circuitry that individually or jointly execute a set (or multiple sets) of instructions to perform any one or more of the operations discussed above. Computing device 1000 may be part of an integrated control system or system manager, or may be provided as a portable electronic device configured to interface with a networked system either locally or remotely via wireless transmission.
Processors 1004 may comprise a central processing unit (CPU), a graphics processing unit (GPU), programmable logic devices, dedicated processor systems, micro controllers, or microprocessors that may perform some or all of the operations described above. Processors 1004 may also include, but may not be limited to, an analog processor, a digital processor, a microprocessor, multi-core processor, processor array, network processor, etc.
Some of the operations described above may be implemented in software and other operations may be implemented in hardware. One or more of the operations, processes, or methods described herein may be performed by an apparatus, device, or system similar to those as described herein and with reference to the illustrated figures.
Processors 1004 may execute instructions or “code” 1006 stored in any one of memories 1008, 1010, or 1020. The memories may store data as well. Instructions 1006 and data can also be transmitted or received over a network 1014 via a network interface device 1012 utilizing any one of a number of well-known transfer protocols.
Memories 1008, 1010, and 1020 may be integrated together with processing device 1000, for example RAM or FLASH memory disposed within an integrated circuit microprocessor or the like. In other examples, the memory may comprise an independent device, such as an external disk drive, storage array, or any other storage devices used in database systems. The memory and processing devices may be operatively coupled together, or in communication with each other, for example by an I/O port, network connection, etc. such that the processing device may read a file stored on the memory.
Some memory may be “read only” by design (ROM) by virtue of permission settings, or not. Other examples of memory may include, but may be not limited to, WORM, EPROM, EEPROM, FLASH, etc. which may be implemented in solid state semiconductor devices. Other memories may comprise moving parts, such a conventional rotating disk drive. All such memories may be “machine-readable” in that they may be readable by a processing device.
“Computer-readable storage medium” (or alternatively, “machine-readable storage medium”) may include all of the foregoing types of memory, as well as new technologies that may arise in the future, as long as they may be capable of storing digital information in the nature of a computer program or other data, at least temporarily, in such a manner that the stored information may be “read” by an appropriate processing device. The term “computer-readable” may not be limited to the historical usage of “computer” to imply a complete mainframe, mini-computer, desktop, wireless device, or even a laptop computer. Rather, “computer-readable” may comprise a storage medium that may be readable by a processor, processing device, or any computing system. Such media may be any available media that may be locally and/or remotely accessible by a computer or processor, and may include volatile and non-volatile media, and removable and non-removable media.
Computing device 1000 can further include a video display 1016, such as a liquid crystal display (LCD) or a cathode ray tube (CRT) and a user interface 1018, such as a keyboard, mouse, touch screen, etc. All of the components of computing device 1000 may be connected together via a bus 1002 and/or network.
For the sake of convenience, operations may be described as various interconnected or coupled functional blocks or diagrams. However, there may be cases where these functional blocks or diagrams may be equivalently aggregated into a single logic device, program, or operation with unclear boundaries.
Having described and illustrated the principles of a preferred embodiment, it should be apparent that the embodiments may be modified in arrangement and detail without departing from such principles. Claim is made to all modifications and variation coming within the spirit and scope of the following claims.
The present application is a continuation of and claims priority benefit to U.S. patent application Ser. No. 13/667,542, filed Nov. 2, 2012, which claims priority to U.S. Provisional Patent Ser. No. 61/555,615, filed Nov. 4, 2011, entitled: VISUALIZATION AND INTERACTION WITH COMPACT REPRESENTATIONS OF DECISION TREES, all of which are herein incorporated by reference in their entirety. U.S. Provisional Patent Ser. No. 61/557,826, filed Nov. 9, 2011, entitled: METHOD FOR BUILDING AND USING DECISION TREES IN A DISTRIBUTED ENVIRONMENT; and U.S. Provisional Patent Ser. No. 61/557,539, filed Nov. 9, 2011, entitled: EVOLVING PARALLEL SYSTEM TO AUTOMATICALLY IMPROVE THE PERFORMANCE OF DISTRIBUTED SYSTEMS are herein incorporated by reference in their entireties.
Number | Date | Country | |
---|---|---|---|
61555615 | Nov 2011 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 13667542 | Nov 2012 | US |
Child | 16726076 | US |