• CharlesAuguste's avatar
    [python] Improved python tree plots (#2304) · f52be9be
    CharlesAuguste authored
    * Some basic changes to the plot of the trees to make them readable.
    
    * Squeezed the information in the nodes.
    
    * Added colouring when a dictionnary mapping the features to the constraints is passed.
    
    * Fix spaces.
    
    * Added data percentage as an option in the nodes.
    
    * Squeezed the information in the leaves.
    
    * Important information is now in bold.
    
    * Added a legend for the color of monotone splits.
    
    * Changed "split_gain" to "gain" and "internal_value" to "value".
    
    * Sqeezed leaves a bit more.
    
    * Changed description in the legend.
    
    * Revert "Sqeezed leaves a bit more."
    
    This reverts commit dd8bf14a3ba604b0dfae3b7bb1c64b6784d15e03.
    
    * Increased the readability for the gain.
    
    * Tidied up the legend.
    
    * Added the data percentage in the leaves.
    
    * Added the monotone constraints to the dumped model.
    
    * Monotone constraints are now specified automatically when plotting trees.
    
    * Raise an exception instead of the bug that was here before.
    
    * Removed operators on the branches for a clearer design.
    
    * Small cleaning of the code.
    
    * Setting a monotone constraint on a categorical feature now returns an exception instead of doing nothing.
    
    * Fix bug when monotone constraints are empty.
    
    * Fix another bug when monotone constraints are empty.
    
    * Variable name change.
    
    * Added is / isn't on every edge of the trees.
    
    * Fix test "tree_create_digraph".
    
    * Add new test for plotting trees with monotone constraints.
    
    * Typo.
    
    * Update documentation of categorical features.
    
    * Typo.
    
    * Information in nodes more explicit.
    
    * Used regular strings instead of raw strings.
    
    * Small refactoring.
    
    * Some cleaning.
    
    * Added future statement.
    
    * Changed output for consistency.
    
    * Updated documentation.
    
    * Added comments for colors.
    
    * Changed text on edges for more clarity.
    
    * Small refactoring.
    
    * Modified text in leaves for consistency with nodes.
    
    * Updated default values and documentaton for consistency.
    
    * Replaced CHECK with Log::Fatal for user-friendliness.
    
    * Updated tests.
    
    * Typo.
    
    * Simplify imports.
    
    * Swapped count and weight to improve readibility of the leaves in the plotted trees.
    
    * Thresholds in bold.
    
    * Made information in nodes written in a specific order.
    
    * Added information to clarify legend.
    
    * Code cleaning.
    f52be9be
engine.py 27.3 KB