Plotting XGBoost Trees in Elixir

Plotting XGBoost Trees in Elixir

XGBoost is one of the most popular Machine Learning tools. Here's how to make beautiful plots for it with Elixir.

Run in Livebook

Plotting in EXGBoost

Mix.install([
  {:exgboost, "~> 0.5"},
  {:scidata, "~> 0.1"},
  {:kino_vega_lite, "~> 0.1"}
])

# This assumed you launch this livebook from its location in the exgboost/notebooks folder

Introduction

Much of the utility from decision trees come from their intuitiveness and ability to inform dcisions outside of the confines of a black-box model. A decision tree can be easily translated to a series of actions that can be taken on behalf of the stakeholder to achieve the desired outcome. This makes them especially useful in business decisions, where people might still want to have the final say but be as informed as possible. Additionally, tabular data is still quite popular in the business domain, which conforms to the required input for decision trees.

Decision trees can be used for both regression and classification tasks, but classification tends to be what is most associated with decision trees.

This notebook will go over some of the details of the EXGBoost.Plotting module, including using preconfiged styles, custom styling, as well as customizing the entire vidualization.

Plotting APIs

There are 2 main APIs exposed to control plotting in EXGBoost:

  • Top-level API (EXGBoost.plot_tree/2)

    • Using predefined styles
    • Defining custom styles
    • Mix of the first 2
  • EXBoost.Plotting module API

    • Use the Vega data spec defined in EXGBoost.get_data_spec/2
    • Define your own Vega spec using the data from either EXGBoost.Plotting.to_tabular/1 or some other means

    We will walk through each of these in detail.

Regardless of which API you choose to use, it is helpful to understand how the plotting module works (althought the higher-level API you choose to work with the less important it becomes).

Implementation Details

The plotting functionality provided in EXGBoost is powered by the Vega JavaScript library and the Elixir VegaLite library which provides the piping to interop with the JavaScript libraries. We do not actually much use the Elixir API provided by the Elixir VegaLite library. It is mainly used for the purposes of rendering.

Vega is a plotting library built on top of the very powerful D3 JavaScript library. Vega visualizations are defined according to the respective JSON Schema specification. Vega-Lite offers a reduced schema compared to the full Vega spec. EXGBoost.Plotting leverages several transforms which are not available in the reduced Vega-Lite schema, which is the reason for targeting the lower-level API.

For these reasons, unfortunately we could not just implement plotting for EXGBoost as a composable Vega-Lite pipeline. This makes working synamically with the spec a bit more unwieldly, but much care was taken to still make the high-level plotting API extensible, and if needed you can go straight to defining your own JSON spec.

Setup Data

We will still be using the Iris dataset for this notebook, but if you want more details about the process of training and evaluating a model please check out the Iris Classification with Gradient Boosting notebook.

So let's proceed by setting up the Iris dataset.

{x, y} = Scidata.Iris.download()
data = Enum.zip(x, y) |> Enum.shuffle()
{train, test} = Enum.split(data, ceil(length(data) * 0.8))
{x_train, y_train} = Enum.unzip(train)
{x_test, y_test} = Enum.unzip(test)

x_train = Nx.tensor(x_train)
y_train = Nx.tensor(y_train)

x_test = Nx.tensor(x_test)
y_test = Nx.tensor(y_test)
#Nx.Tensor<
  s64[30]
  [2, 1, 0, 0, 2, 2, 2, 1, 2, 2, 2, 0, 1, 0, 0, 2, 1, 1, 0, 0, 0, 1, 0, 2, 0, 1, 0, 2, 1, 2]
>

Train Your Booster

Now go ahead and train your booster. We will use early_stopping_rounds: 1 because we're not interested in the accuracy of the booster for this demonstration (Note that we need to set evals to use early stopping).

You will notice that EXGBoost also provides an implementation for Kino.Render so that EXGBoost.Boosters are rendered as a plot by default.

booster =
  EXGBoost.train(
    x_train,
    y_train,
    num_class: 3,
    objective: :multi_softprob,
    num_boost_rounds: 10,
    evals: [{x_train, y_train, "training"}],
    verbose_eval: false,
    early_stopping_rounds: 1
  )
{"$schema":"https://vega.github.io/schema/vega/v5.json","autosize":"fit","background":"#282a36","data":[{"name":"tree","values":[{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f2","split_condition":3,"tree_id":0,"yes":2},{"depth":null,"leaf":0.425454557,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":null,"leaf":-0.218918934,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f2","split_condition":3,"tree_id":1,"yes":2},{"depth":null,"leaf":-0.212727293,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"f3","split_condition":1.79999995,"tree_id":1,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"f2","split_condition":5,"tree_id":1,"yes":6},{"depth":null,"leaf":0.410982668,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"f2","split_condition":4.9000001,"tree_id":1,"yes":8},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-0.211034521,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f3","split_condition":1.60000002,"tree_id":2,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"f2","split_condition":4.9000001,"tree_id":2,"yes":4},{"depth":null,"leaf":-0.218530372,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"f3","split_condition":1.79999995,"tree_id":2,"yes":6},{"depth":null,"leaf":0.0719999969,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"f2","split_condition":4.9000001,"tree_id":2,"yes":8},{"depth":null,"leaf":0.128571421,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":0.422068983,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f2","split_condition":3,"tree_id":3,"yes":2},{"depth":null,"leaf":0.292982191,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":null,"leaf":-0.195790753,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f2","split_condition":3,"tree_id":4,"yes":2},{"depth":null,"leaf":-0.18925412,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"f3","split_condition":1.79999995,"tree_id":4,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"f2","split_condition":5,"tree_id":4,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"f0","split_condition":5.0999999,"tree_id":4,"yes":10},{"depth":null,"leaf":0.110490814,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":0.295589149,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.0065466417,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"f2","split_condition":4.9000001,"tree_id":4,"yes":8},{"depth":null,"leaf":-0.00258299569,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.187741965,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f3","split_condition":1.60000002,"tree_id":5,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"f2","split_condition":4.9000001,"tree_id":5,"yes":4},{"depth":null,"leaf":-0.195117101,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.00513018994,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"f3","split_condition":1.79999995,"tree_id":5,"yes":6},{"depth":null,"leaf":0.0662105083,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.283106089,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f2","split_condition":3,"tree_id":6,"yes":2},{"depth":null,"leaf":0.234668195,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":null,"leaf":-0.18040958,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f2","split_condition":3,"tree_id":7,"yes":2},{"depth":null,"leaf":-0.173018426,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"f3","split_condition":1.79999995,"tree_id":7,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"f2","split_condition":5,"tree_id":7,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"f0","split_condition":5.0999999,"tree_id":7,"yes":10},{"depth":null,"leaf":0.0843105838,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":0.236887291,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.0104054213,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"f2","split_condition":4.9000001,"tree_id":7,"yes":8},{"depth":null,"leaf":0.0072258329,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.171714455,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f3","split_condition":1.60000002,"tree_id":8,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"f2","split_condition":4.9000001,"tree_id":8,"yes":4},{"depth":null,"leaf":-0.179455951,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.0102903834,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"f3","split_condition":1.79999995,"tree_id":8,"yes":6},{"depth":null,"leaf":0.0586014725,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"f2","split_condition":4.9000001,"tree_id":8,"yes":8},{"depth":null,"leaf":0.068535842,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.2342868,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f2","split_condition":3,"tree_id":9,"yes":2},{"depth":null,"leaf":0.202173784,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":null,"leaf":-0.169466257,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f2","split_condition":3,"tree_id":10,"yes":2},{"depth":null,"leaf":-0.160806924,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"f3","split_condition":1.60000002,"tree_id":10,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"f2","split_condition":4.9000001,"tree_id":10,"yes":6},{"depth":null,"leaf":0.203813776,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.046239242,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"f2","split_condition":5.0999999,"tree_id":10,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":5,"split":"f1","split_condition":2.9000001,"tree_id":10,"yes":10},{"depth":null,"leaf":-0.145340025,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.123540193,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":-0.160442933,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f3","split_condition":1.60000002,"tree_id":11,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"f2","split_condition":4.9000001,"tree_id":11,"yes":4},{"depth":null,"leaf":-0.168171152,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.0149572417,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"f2","split_condition":5.0999999,"tree_id":11,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"f1","split_condition":2.9000001,"tree_id":11,"yes":8},{"depth":null,"leaf":0.195176765,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":-0.0395982973,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.204244092,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f2","split_condition":3,"tree_id":12,"yes":2},{"depth":null,"leaf":0.181544691,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":null,"leaf":-0.161027163,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f2","split_condition":3,"tree_id":13,"yes":2},{"depth":null,"leaf":-0.150903225,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"f2","split_condition":5.0999999,"tree_id":13,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"f3","split_condition":1.70000005,"tree_id":13,"yes":6},{"depth":null,"leaf":0.18685849,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"f1","split_condition":2.9000001,"tree_id":13,"yes":8},{"depth":null,"leaf":-0.13117227,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":0.077316612,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":-0.15599905,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f3","split_condition":1.60000002,"tree_id":14,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"f2","split_condition":4.9000001,"tree_id":14,"yes":4},{"depth":null,"leaf":-0.159298271,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.0134122102,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"f3","split_condition":1.79999995,"tree_id":14,"yes":6},{"depth":null,"leaf":0.0381595641,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"f0","split_condition":6,"tree_id":14,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":7,"split":"f3","split_condition":2,"tree_id":14,"yes":10},{"depth":null,"leaf":-0.00389169785,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.101416349,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.186925322,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f2","split_condition":3,"tree_id":15,"yes":2},{"depth":null,"leaf":0.16711998,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":null,"leaf":-0.154198557,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f2","split_condition":3,"tree_id":16,"yes":2},{"depth":null,"leaf":-0.142255381,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"f2","split_condition":5.0999999,"tree_id":16,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"f3","split_condition":1.70000005,"tree_id":16,"yes":6},{"depth":null,"leaf":0.172067791,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"f1","split_condition":2.9000001,"tree_id":16,"yes":8},{"depth":null,"leaf":-0.121421516,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":0.073711507,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":-0.148049027,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f3","split_condition":1.60000002,"tree_id":17,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"f2","split_condition":4.9000001,"tree_id":17,"yes":4},{"depth":null,"leaf":-0.151937172,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.0142573239,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"f2","split_condition":5.0999999,"tree_id":17,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"f1","split_condition":2.9000001,"tree_id":17,"yes":8},{"depth":null,"leaf":0.153471231,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":-0.0392971113,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.168022811,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f2","split_condition":3,"tree_id":18,"yes":2},{"depth":null,"leaf":0.156131104,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":null,"leaf":-0.148197949,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f2","split_condition":3,"tree_id":19,"yes":2},{"depth":null,"leaf":-0.134196311,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"f2","split_condition":5.0999999,"tree_id":19,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"f3","split_condition":1.70000005,"tree_id":19,"yes":6},{"depth":null,"leaf":0.160865128,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"f1","split_condition":2.9000001,"tree_id":19,"yes":8},{"depth":null,"leaf":-0.110056646,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":0.0594659112,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":-0.139969245,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f3","split_condition":1.60000002,"tree_id":20,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"f2","split_condition":4.9000001,"tree_id":20,"yes":4},{"depth":null,"leaf":-0.145403519,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.0147723975,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"f1","split_condition":3.20000005,"tree_id":20,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"f3","split_condition":1.79999995,"tree_id":20,"yes":8},{"depth":null,"leaf":0.0483957976,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.162800461,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":2,"leaf":null,"missing":10,"no":11,"nodeid":7,"parentid":3,"split":"f2","split_condition":5.19999981,"tree_id":20,"yes":10},{"depth":null,"leaf":-0.0793080404,"missing":null,"no":null,"nodeid":10,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.112726398,"missing":null,"no":null,"nodeid":11,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f2","split_condition":3,"tree_id":21,"yes":2},{"depth":null,"leaf":0.14705947,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":null,"leaf":-0.142660394,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f2","split_condition":5.0999999,"tree_id":22,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"f2","split_condition":3,"tree_id":22,"yes":4},{"depth":null,"leaf":-0.12631698,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"f3","split_condition":1.70000005,"tree_id":22,"yes":6},{"depth":null,"leaf":0.151711732,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"f1","split_condition":2.9000001,"tree_id":22,"yes":8},{"depth":null,"leaf":-0.101206295,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":0.0569678135,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":-0.132955521,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f3","split_condition":1.60000002,"tree_id":23,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"f2","split_condition":4.9000001,"tree_id":23,"yes":4},{"depth":null,"leaf":-0.1391913,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.0150168026,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"f3","split_condition":1.79999995,"tree_id":23,"yes":6},{"depth":null,"leaf":0.014580613,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"f0","split_condition":6,"tree_id":23,"yes":8},{"depth":null,"leaf":0.0168433767,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.154607058,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f2","split_condition":3,"tree_id":24,"yes":2},{"depth":null,"leaf":0.139016181,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":null,"leaf":-0.13727048,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f2","split_condition":5.0999999,"tree_id":25,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"f2","split_condition":3,"tree_id":25,"yes":4},{"depth":null,"leaf":-0.118402772,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"f3","split_condition":1.79999995,"tree_id":25,"yes":6},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":5,"split":"f0","split_condition":5.19999981,"tree_id":25,"yes":8},{"depth":null,"leaf":0.0103592547,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":0.152987525,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.0338534117,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.126058802,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f2","split_condition":5.0999999,"tree_id":26,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"f3","split_condition":1.70000005,"tree_id":26,"yes":4},{"depth":null,"leaf":-0.137931168,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"f1","split_condition":2.9000001,"tree_id":26,"yes":6},{"depth":null,"leaf":0.116194524,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":-0.0252925735,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":0.148122758,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f2","split_condition":3,"tree_id":27,"yes":2},{"depth":null,"leaf":0.131407082,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":null,"leaf":-0.131564274,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f2","split_condition":5.0999999,"tree_id":28,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"f2","split_condition":3,"tree_id":28,"yes":4},{"depth":null,"leaf":-0.110398278,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"f3","split_condition":1.70000005,"tree_id":28,"yes":6},{"depth":null,"leaf":0.135915175,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"f0","split_condition":6,"tree_id":28,"yes":8},{"depth":null,"leaf":0.01785478,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.0288929809,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.117059968,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"f2","split_condition":5.0999999,"tree_id":29,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"f3","split_condition":1.70000005,"tree_id":29,"yes":4},{"depth":null,"leaf":-0.131456167,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"f1","split_condition":2.9000001,"tree_id":29,"yes":6},{"depth":null,"leaf":0.108389735,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":-0.0236288365,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":0.138706177,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":29,"yes":null}]},{"name":"treeCalcs","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["x","y","depth","children"],"method":"tidy","separation":{"signal":"false"},"type":"tree"}]},{"name":"treeChildren","source":"treeCalcs","transform":[{"as":["childrenObjects"],"fields":["parentid"],"groupby":["parentid"],"ops":["values"],"type":"aggregate"},{"as":"childrenIds","expr":"pluck(datum.childrenObjects,'nodeid')","type":"formula"}]},{"name":"treeAncestors","source":"treeCalcs","transform":[{"as":"treeAncestors","expr":"treeAncestors('treeCalcs', datum.nodeid, 'root')","type":"formula"},{"fields":["treeAncestors"],"type":"flatten"},{"as":"allParents","expr":"datum.treeAncestors.parentid","type":"formula"}]},{"name":"treeChildrenAll","source":"treeAncestors","transform":[{"fields":["allParents","nodeid","name","parentid","x","y","depth","children"],"type":"project"},{"as":["allChildrenObjects","allChildrenCount","id"],"fields":["parentid","parentid","nodeid"],"groupby":["allParents"],"ops":["values","count","min"],"type":"aggregate"},{"as":"allChildrenIds","expr":"pluck(datum.allChildrenObjects,'nodeid')","type":"formula"}]},{"name":"treeClickStoreTemp","source":"treeAncestors","transform":[{"expr":"startingDepth != -1 ? datum.depth <= startingDepth : node != 0 && !isExpanded ? datum.parentid == node: node != 0 && isExpanded ? datum.allParents == node : false","type":"filter"},{"fields":["nodeid","parentid","x","y","depth","children"],"type":"project"},{"fields":["nodeid"],"groupby":["nodeid","parentid","x","y","depth","children"],"ops":["min"],"type":"aggregate"}]},{"name":"treeClickStorePerm","on":[{"insert":"data('treeClickStoreTemp')","trigger":"startingDepth >= 0"},{"insert":"!isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"},{"remove":"isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"}],"values":[]},{"name":"treeLayout","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid)","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["x","y","depth","children"],"method":"tidy","nodeSize":[{"signal":"nodeWidth + spaceBetweenNodes"},{"signal":"nodeHeight+ spaceBetweenLevels"}],"separation":{"signal":"false"},"type":"tree"},{"as":"y","expr":"1*(datum.y+(height/10))","type":"formula"},{"as":"x","expr":"1*(datum.x+(width/2))","type":"formula"},{"field":"x","signal":"x_extent","type":"extent"},{"field":"y","signal":"y_extent","type":"extent"},{"as":"xscaled","expr":"scale('xscale',datum.x)","type":"formula"},{"as":"parent","expr":"datum.parentid","type":"formula"}]},{"name":"fullTreeLayout","source":"treeLayout","transform":[{"fields":["nodeid"],"from":"treeChildren","key":"parentid","type":"lookup","values":["childrenObjects","childrenIds"]},{"fields":["nodeid"],"from":"treeChildrenAll","key":"allParents","type":"lookup","values":["allChildrenIds","allChildrenObjects"]},{"fields":["nodeid"],"from":"treeCalcs","key":"nodeid","type":"lookup","values":["children"]},{"as":"treeParent","expr":"reverse(pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid'))[1]","type":"formula"},{"as":"isLeaf","expr":"datum.leaf == null","type":"formula"}]},{"name":"splitNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && datum.isLeaf","type":"filter"}]},{"name":"leafNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && !datum.isLeaf","type":"filter"}]},{"name":"links","source":"treeLayout","transform":[{"type":"treelinks"},{"orient":"vertical","shape":"line","sourceX":{"expr":"scale('xscale', datum.source.x)"},"sourceY":{"expr":"scale('yscale', datum.source.y)"},"targetX":{"expr":"scale('xscale', datum.target.x)"},"targetY":{"expr":"scale('yscale', datum.target.y) - scaledNodeHeight"},"type":"linkpath"},{"expr":" indata('treeClickStorePerm', 'nodeid', datum.target.nodeid)","type":"filter"}]},{"name":"yesPaths","source":"links","transform":[{"expr":"datum.source.yes === datum.target.nodeid ","type":"filter"}]},{"name":"noPaths","source":"links","transform":[{"expr":"datum.source.yes !== datum.target.nodeid ","type":"filter"}]}],"height":400,"marks":[{"encode":{"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"update":{"path":{"field":"path"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"}}},"from":{"data":"yesPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"path":{"field":"path"},"stroke":{"value":"#f8f8f2"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"},"strokewidth":{"value":1}}},"from":{"data":"noPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#50fa7b"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"yes"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"yesPaths"},"type":"text"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#ff5555"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"no"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"noPaths"},"type":"text"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#ff79c6"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"splitNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"bold"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"parent.split + ' <= ' + format(parent.split_condition, '.2f')"},"x":{"signal":"(scaledNodeWidth / 2)"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"},{"encode":{"update":{"align":{"value":"right"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"text":{"signal":"parent.children"},"x":{"signal":"item.mark.group.width - (9/ span(xdom))*width"},"y":{"signal":"item.mark.group.height/2"}}},"interactive":false,"type":"text"}],"name":"splitNode","type":"group"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#44475a"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#ff79c6"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"leafNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"normal"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"'leaf = ' + format(parent.leaf, '.2f')"},"x":{"signal":"scaledNodeWidth / 2"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"}],"name":"leafNode","type":"group"}],"padding":30,"scales":[{"domain":{"signal":"xdom"},"name":"xscale","range":{"signal":"xrange"},"zero":false},{"domain":{"signal":"ydom"},"name":"yscale","range":{"signal":"yrange"},"zero":false}],"signals":[{"name":"selectedTree","value":0},{"name":"node","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.nodeid"}],"value":0},{"name":"nodeHighlight","on":[{"events":[{"markname":"splitNode","type":"mouseover"},{"markname":"leafNode","type":"mouseover"}],"update":"pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid')"},{"events":{"type":"mouseout"},"update":"[0]"}],"value":"[0]"},{"name":"isExpanded","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.children > 0 && indata('treeClickStorePerm', 'nodeid', datum.childrenIds[0]) ? true : false"}],"value":0},{"name":"xrange","update":"[0, width]"},{"name":"yrange","update":"[0, height]"},{"name":"down","on":[{"events":"mousedown","update":"xy()"}],"value":null},{"name":"xcur","on":[{"events":"mousedown","update":"slice(xdom)"}],"value":null},{"name":"ycur","on":[{"events":"mousedown","update":"slice(ydom)"}],"value":null},{"name":"delta","on":[{"events":[{"between":[{"type":"mousedown"},{"source":"window","type":"mouseup"}],"consume":true,"source":"window","type":"mousemove"}],"update":"down ? [down[0]-x(), down[1]-y()] : [0,0]"}],"value":[0,0]},{"name":"anchor","on":[{"events":"wheel","update":"[invert('xscale', x()), invert('yscale', y())]"}],"value":[0,0]},{"name":"xext","update":"[0,width]"},{"name":"yext","update":"[0,height]"},{"name":"zoom","on":[{"events":"wheel!","force":true,"update":"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}],"value":1},{"name":"xdom","on":[{"events":{"signal":"delta"},"update":"[xcur[0] + span(xcur) * delta[0] / width, xcur[1] + span(xcur) * delta[0] / width]"},{"events":{"signal":"zoom"},"update":"[anchor[0] + (xdom[0] - anchor[0]) * zoom, anchor[0] + (xdom[1] - anchor[0]) * zoom]"}],"update":"[x_extent[0] - nodeWidth/ 2, x_extent[1] + nodeWidth / 2]"},{"name":"ydom","on":[{"events":{"signal":"delta"},"update":"[ycur[0] + span(ycur) * delta[1] / height, ycur[1] + span(ycur) * delta[1] / height]"},{"events":{"signal":"zoom"},"update":"[anchor[1] + (ydom[0] - anchor[1]) * zoom, anchor[1] + (ydom[1] - anchor[1]) * zoom]"}],"update":"[y_extent[0] - nodeHeight, y_extent[1] + nodeHeight/3]"},{"name":"scaledNodeWidth","update":"(nodeWidth/ span(xdom))*width"},{"name":"scaledNodeHeight","update":"abs(nodeHeight/ span(ydom))*height"},{"name":"scaledLimit","update":"(20/ span(xdom))*width"},{"name":"spaceBetweenLevels","value":100},{"name":"spaceBetweenNodes","value":10},{"name":"nodeWidth","value":100},{"name":"nodeHeight","value":45},{"name":"startingDepth","on":[{"events":{"throttle":0,"type":"timer"},"update":"-1"}],"value":3}],"width":600}

You'll notice that the plot doesn't display any labels to the features in the splits, and instead only shows features labelled as "f2" etc. If you provide feature labels during training, your plot will show the splits using the feature labels.

booster =
  EXGBoost.train(x_train, y_train,
    num_class: 3,
    objective: :multi_softprob,
    num_boost_rounds: 10,
    evals: [{x_train, y_train, "training"}],
    verbose_eval: false,
    feature_name: ["sepal length", "sepal width", "petal length", "petal width"],
    early_stopping_rounds: 1
  )
{"$schema":"https://vega.github.io/schema/vega/v5.json","autosize":"fit","background":"#282a36","data":[{"name":"tree","values":[{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":0,"yes":2},{"depth":null,"leaf":0.425454557,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":null,"leaf":-0.218918934,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":1,"yes":2},{"depth":null,"leaf":-0.212727293,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":1,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":1,"yes":6},{"depth":null,"leaf":0.410982668,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":1,"yes":8},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-0.211034521,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":2,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":4},{"depth":null,"leaf":-0.218530372,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":2,"yes":6},{"depth":null,"leaf":0.0719999969,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":8},{"depth":null,"leaf":0.128571421,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":0.422068983,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":3,"yes":2},{"depth":null,"leaf":0.292982191,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":null,"leaf":-0.195790753,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":4,"yes":2},{"depth":null,"leaf":-0.18925412,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":4,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":4,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":4,"yes":10},{"depth":null,"leaf":0.110490814,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":0.295589149,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.0065466417,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":4,"yes":8},{"depth":null,"leaf":-0.00258299569,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.187741965,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":5,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":5,"yes":4},{"depth":null,"leaf":-0.195117101,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.00513018994,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":5,"yes":6},{"depth":null,"leaf":0.0662105083,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.283106089,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":6,"yes":2},{"depth":null,"leaf":0.234668195,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":null,"leaf":-0.18040958,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":7,"yes":2},{"depth":null,"leaf":-0.173018426,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":7,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":7,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":7,"yes":10},{"depth":null,"leaf":0.0843105838,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":0.236887291,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.0104054213,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":7,"yes":8},{"depth":null,"leaf":0.0072258329,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.171714455,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":8,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":4},{"depth":null,"leaf":-0.179455951,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.0102903834,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":8,"yes":6},{"depth":null,"leaf":0.0586014725,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":8},{"depth":null,"leaf":0.068535842,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.2342868,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":9,"yes":2},{"depth":null,"leaf":0.202173784,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":null,"leaf":-0.169466257,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":10,"yes":2},{"depth":null,"leaf":-0.160806924,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.60000002,"tree_id":10,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":10,"yes":6},{"depth":null,"leaf":0.203813776,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.046239242,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":5.0999999,"tree_id":10,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":10,"yes":10},{"depth":null,"leaf":-0.145340025,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.123540193,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":-0.160442933,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":11,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":11,"yes":4},{"depth":null,"leaf":-0.168171152,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.0149572417,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":11,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":11,"yes":8},{"depth":null,"leaf":0.195176765,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":-0.0395982973,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.204244092,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":12,"yes":2},{"depth":null,"leaf":0.181544691,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":null,"leaf":-0.161027163,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":13,"yes":2},{"depth":null,"leaf":-0.150903225,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":13,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":13,"yes":6},{"depth":null,"leaf":0.18685849,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":13,"yes":8},{"depth":null,"leaf":-0.13117227,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":0.077316612,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":-0.15599905,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":14,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":14,"yes":4},{"depth":null,"leaf":-0.159298271,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.0134122102,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":14,"yes":6},{"depth":null,"leaf":0.0381595641,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":14,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":7,"split":"petal width","split_condition":2,"tree_id":14,"yes":10},{"depth":null,"leaf":-0.00389169785,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.101416349,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.186925322,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":15,"yes":2},{"depth":null,"leaf":0.16711998,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":null,"leaf":-0.154198557,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":16,"yes":2},{"depth":null,"leaf":-0.142255381,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":16,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":16,"yes":6},{"depth":null,"leaf":0.172067791,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":16,"yes":8},{"depth":null,"leaf":-0.121421516,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":0.073711507,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":-0.148049027,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":17,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":17,"yes":4},{"depth":null,"leaf":-0.151937172,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.0142573239,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":17,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":17,"yes":8},{"depth":null,"leaf":0.153471231,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":-0.0392971113,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.168022811,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":18,"yes":2},{"depth":null,"leaf":0.156131104,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":null,"leaf":-0.148197949,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":19,"yes":2},{"depth":null,"leaf":-0.134196311,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":19,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":19,"yes":6},{"depth":null,"leaf":0.160865128,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":19,"yes":8},{"depth":null,"leaf":-0.110056646,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":0.0594659112,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":-0.139969245,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":20,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":20,"yes":4},{"depth":null,"leaf":-0.145403519,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.0147723975,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"sepal width","split_condition":3.20000005,"tree_id":20,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"petal width","split_condition":1.79999995,"tree_id":20,"yes":8},{"depth":null,"leaf":0.0483957976,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.162800461,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":2,"leaf":null,"missing":10,"no":11,"nodeid":7,"parentid":3,"split":"petal length","split_condition":5.19999981,"tree_id":20,"yes":10},{"depth":null,"leaf":-0.0793080404,"missing":null,"no":null,"nodeid":10,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.112726398,"missing":null,"no":null,"nodeid":11,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":21,"yes":2},{"depth":null,"leaf":0.14705947,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":null,"leaf":-0.142660394,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":22,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":22,"yes":4},{"depth":null,"leaf":-0.12631698,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":22,"yes":6},{"depth":null,"leaf":0.151711732,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":22,"yes":8},{"depth":null,"leaf":-0.101206295,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":0.0569678135,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":-0.132955521,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":23,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":23,"yes":4},{"depth":null,"leaf":-0.1391913,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.0150168026,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":23,"yes":6},{"depth":null,"leaf":0.014580613,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":23,"yes":8},{"depth":null,"leaf":0.0168433767,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.154607058,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":24,"yes":2},{"depth":null,"leaf":0.139016181,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":null,"leaf":-0.13727048,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":25,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":25,"yes":4},{"depth":null,"leaf":-0.118402772,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.79999995,"tree_id":25,"yes":6},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":5,"split":"sepal length","split_condition":5.19999981,"tree_id":25,"yes":8},{"depth":null,"leaf":0.0103592547,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":0.152987525,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.0338534117,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.126058802,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":26,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":26,"yes":4},{"depth":null,"leaf":-0.137931168,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":26,"yes":6},{"depth":null,"leaf":0.116194524,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":-0.0252925735,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":0.148122758,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":27,"yes":2},{"depth":null,"leaf":0.131407082,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":null,"leaf":-0.131564274,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":28,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":28,"yes":4},{"depth":null,"leaf":-0.110398278,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":28,"yes":6},{"depth":null,"leaf":0.135915175,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal length","split_condition":6,"tree_id":28,"yes":8},{"depth":null,"leaf":0.01785478,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.0288929809,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.117059968,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":29,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":29,"yes":4},{"depth":null,"leaf":-0.131456167,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":29,"yes":6},{"depth":null,"leaf":0.108389735,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":-0.0236288365,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":0.138706177,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":29,"yes":null}]},{"name":"treeCalcs","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["x","y","depth","children"],"method":"tidy","separation":{"signal":"false"},"type":"tree"}]},{"name":"treeChildren","source":"treeCalcs","transform":[{"as":["childrenObjects"],"fields":["parentid"],"groupby":["parentid"],"ops":["values"],"type":"aggregate"},{"as":"childrenIds","expr":"pluck(datum.childrenObjects,'nodeid')","type":"formula"}]},{"name":"treeAncestors","source":"treeCalcs","transform":[{"as":"treeAncestors","expr":"treeAncestors('treeCalcs', datum.nodeid, 'root')","type":"formula"},{"fields":["treeAncestors"],"type":"flatten"},{"as":"allParents","expr":"datum.treeAncestors.parentid","type":"formula"}]},{"name":"treeChildrenAll","source":"treeAncestors","transform":[{"fields":["allParents","nodeid","name","parentid","x","y","depth","children"],"type":"project"},{"as":["allChildrenObjects","allChildrenCount","id"],"fields":["parentid","parentid","nodeid"],"groupby":["allParents"],"ops":["values","count","min"],"type":"aggregate"},{"as":"allChildrenIds","expr":"pluck(datum.allChildrenObjects,'nodeid')","type":"formula"}]},{"name":"treeClickStoreTemp","source":"treeAncestors","transform":[{"expr":"startingDepth != -1 ? datum.depth <= startingDepth : node != 0 && !isExpanded ? datum.parentid == node: node != 0 && isExpanded ? datum.allParents == node : false","type":"filter"},{"fields":["nodeid","parentid","x","y","depth","children"],"type":"project"},{"fields":["nodeid"],"groupby":["nodeid","parentid","x","y","depth","children"],"ops":["min"],"type":"aggregate"}]},{"name":"treeClickStorePerm","on":[{"insert":"data('treeClickStoreTemp')","trigger":"startingDepth >= 0"},{"insert":"!isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"},{"remove":"isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"}],"values":[]},{"name":"treeLayout","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid)","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["x","y","depth","children"],"method":"tidy","nodeSize":[{"signal":"nodeWidth + spaceBetweenNodes"},{"signal":"nodeHeight+ spaceBetweenLevels"}],"separation":{"signal":"false"},"type":"tree"},{"as":"y","expr":"1*(datum.y+(height/10))","type":"formula"},{"as":"x","expr":"1*(datum.x+(width/2))","type":"formula"},{"field":"x","signal":"x_extent","type":"extent"},{"field":"y","signal":"y_extent","type":"extent"},{"as":"xscaled","expr":"scale('xscale',datum.x)","type":"formula"},{"as":"parent","expr":"datum.parentid","type":"formula"}]},{"name":"fullTreeLayout","source":"treeLayout","transform":[{"fields":["nodeid"],"from":"treeChildren","key":"parentid","type":"lookup","values":["childrenObjects","childrenIds"]},{"fields":["nodeid"],"from":"treeChildrenAll","key":"allParents","type":"lookup","values":["allChildrenIds","allChildrenObjects"]},{"fields":["nodeid"],"from":"treeCalcs","key":"nodeid","type":"lookup","values":["children"]},{"as":"treeParent","expr":"reverse(pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid'))[1]","type":"formula"},{"as":"isLeaf","expr":"datum.leaf == null","type":"formula"}]},{"name":"splitNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && datum.isLeaf","type":"filter"}]},{"name":"leafNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && !datum.isLeaf","type":"filter"}]},{"name":"links","source":"treeLayout","transform":[{"type":"treelinks"},{"orient":"vertical","shape":"line","sourceX":{"expr":"scale('xscale', datum.source.x)"},"sourceY":{"expr":"scale('yscale', datum.source.y)"},"targetX":{"expr":"scale('xscale', datum.target.x)"},"targetY":{"expr":"scale('yscale', datum.target.y) - scaledNodeHeight"},"type":"linkpath"},{"expr":" indata('treeClickStorePerm', 'nodeid', datum.target.nodeid)","type":"filter"}]},{"name":"yesPaths","source":"links","transform":[{"expr":"datum.source.yes === datum.target.nodeid ","type":"filter"}]},{"name":"noPaths","source":"links","transform":[{"expr":"datum.source.yes !== datum.target.nodeid ","type":"filter"}]}],"height":400,"marks":[{"encode":{"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"update":{"path":{"field":"path"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"}}},"from":{"data":"yesPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"path":{"field":"path"},"stroke":{"value":"#f8f8f2"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"},"strokewidth":{"value":1}}},"from":{"data":"noPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#50fa7b"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"yes"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"yesPaths"},"type":"text"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#ff5555"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"no"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"noPaths"},"type":"text"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#ff79c6"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"splitNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"bold"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"parent.split + ' <= ' + format(parent.split_condition, '.2f')"},"x":{"signal":"(scaledNodeWidth / 2)"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"},{"encode":{"update":{"align":{"value":"right"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"text":{"signal":"parent.children"},"x":{"signal":"item.mark.group.width - (9/ span(xdom))*width"},"y":{"signal":"item.mark.group.height/2"}}},"interactive":false,"type":"text"}],"name":"splitNode","type":"group"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#44475a"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#ff79c6"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"leafNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"normal"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"'leaf = ' + format(parent.leaf, '.2f')"},"x":{"signal":"scaledNodeWidth / 2"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"}],"name":"leafNode","type":"group"}],"padding":30,"scales":[{"domain":{"signal":"xdom"},"name":"xscale","range":{"signal":"xrange"},"zero":false},{"domain":{"signal":"ydom"},"name":"yscale","range":{"signal":"yrange"},"zero":false}],"signals":[{"name":"selectedTree","value":0},{"name":"node","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.nodeid"}],"value":0},{"name":"nodeHighlight","on":[{"events":[{"markname":"splitNode","type":"mouseover"},{"markname":"leafNode","type":"mouseover"}],"update":"pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid')"},{"events":{"type":"mouseout"},"update":"[0]"}],"value":"[0]"},{"name":"isExpanded","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.children > 0 && indata('treeClickStorePerm', 'nodeid', datum.childrenIds[0]) ? true : false"}],"value":0},{"name":"xrange","update":"[0, width]"},{"name":"yrange","update":"[0, height]"},{"name":"down","on":[{"events":"mousedown","update":"xy()"}],"value":null},{"name":"xcur","on":[{"events":"mousedown","update":"slice(xdom)"}],"value":null},{"name":"ycur","on":[{"events":"mousedown","update":"slice(ydom)"}],"value":null},{"name":"delta","on":[{"events":[{"between":[{"type":"mousedown"},{"source":"window","type":"mouseup"}],"consume":true,"source":"window","type":"mousemove"}],"update":"down ? [down[0]-x(), down[1]-y()] : [0,0]"}],"value":[0,0]},{"name":"anchor","on":[{"events":"wheel","update":"[invert('xscale', x()), invert('yscale', y())]"}],"value":[0,0]},{"name":"xext","update":"[0,width]"},{"name":"yext","update":"[0,height]"},{"name":"zoom","on":[{"events":"wheel!","force":true,"update":"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}],"value":1},{"name":"xdom","on":[{"events":{"signal":"delta"},"update":"[xcur[0] + span(xcur) * delta[0] / width, xcur[1] + span(xcur) * delta[0] / width]"},{"events":{"signal":"zoom"},"update":"[anchor[0] + (xdom[0] - anchor[0]) * zoom, anchor[0] + (xdom[1] - anchor[0]) * zoom]"}],"update":"[x_extent[0] - nodeWidth/ 2, x_extent[1] + nodeWidth / 2]"},{"name":"ydom","on":[{"events":{"signal":"delta"},"update":"[ycur[0] + span(ycur) * delta[1] / height, ycur[1] + span(ycur) * delta[1] / height]"},{"events":{"signal":"zoom"},"update":"[anchor[1] + (ydom[0] - anchor[1]) * zoom, anchor[1] + (ydom[1] - anchor[1]) * zoom]"}],"update":"[y_extent[0] - nodeHeight, y_extent[1] + nodeHeight/3]"},{"name":"scaledNodeWidth","update":"(nodeWidth/ span(xdom))*width"},{"name":"scaledNodeHeight","update":"abs(nodeHeight/ span(ydom))*height"},{"name":"scaledLimit","update":"(20/ span(xdom))*width"},{"name":"spaceBetweenLevels","value":100},{"name":"spaceBetweenNodes","value":10},{"name":"nodeWidth","value":100},{"name":"nodeHeight","value":45},{"name":"startingDepth","on":[{"events":{"throttle":0,"type":"timer"},"update":"-1"}],"value":3}],"width":600}

Top-Level API

EXGBoost.plot_tree/2 is the quickest way to customize the output of the plot.

This API uses Vega Marks to describe the plot. Each of the following Mark options accepts any of the valid keys from their respective Mark type as described in the Vega documentation.

Please note that these are passed as a Keyword, and as such the keys must be atoms rather than strings as the Vega docs show. Valid options for this API are camel_cased atoms as opposed to the pascalCased strings the Vega docs describe, so if you wish to pass "fontSize" as the Vega docs show, you would instead pass it as font_size: in this API.

The plot is composed of the following parts:

  • Top-level keys: Options controlling parts of the plot outside of direct control of a Mark, such as :padding, :autosize, etc. Accepts any Vega top-level top-level key in addition to several specific to this API (scuh as :style and :depth).
  • :leaves: Mark specifying the leaf nodes of the tree
  • :splits Mark specifying the split (or inner / decision) nodes of the tree
  • :yes
  • :no

EXGBoost.plot_tree/2 defaults to outputting a VegaLite struct. If you pass the :path option it will save to a file instead.

If you want to add any marks to the underlying plot you will have to use the lower-level EXGBoost.Plotting API, as the top-level API is only capable of customizing these marks.

Top-Level Keys

EXGBoost supports changing the direction of the plots through the :rankdir option. Avaiable directions are [:tb, :bt, :lr, :rl], with top-to-bottom (:tb) being the default.

EXGBoost.plot_tree(booster, rankdir: :bt)
{"$schema":"https://vega.github.io/schema/vega/v5.json","autosize":"fit","background":"#282a36","data":[{"name":"tree","values":[{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":0,"yes":2},{"depth":null,"leaf":0.425454557,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":null,"leaf":-0.218918934,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":1,"yes":2},{"depth":null,"leaf":-0.212727293,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":1,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":1,"yes":6},{"depth":null,"leaf":0.410982668,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":1,"yes":8},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-0.211034521,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":2,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":4},{"depth":null,"leaf":-0.218530372,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":2,"yes":6},{"depth":null,"leaf":0.0719999969,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":8},{"depth":null,"leaf":0.128571421,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":0.422068983,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":3,"yes":2},{"depth":null,"leaf":0.292982191,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":null,"leaf":-0.195790753,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":4,"yes":2},{"depth":null,"leaf":-0.18925412,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":4,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":4,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":4,"yes":10},{"depth":null,"leaf":0.110490814,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":0.295589149,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.0065466417,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":4,"yes":8},{"depth":null,"leaf":-0.00258299569,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.187741965,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":5,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":5,"yes":4},{"depth":null,"leaf":-0.195117101,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.00513018994,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":5,"yes":6},{"depth":null,"leaf":0.0662105083,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.283106089,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":6,"yes":2},{"depth":null,"leaf":0.234668195,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":null,"leaf":-0.18040958,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":7,"yes":2},{"depth":null,"leaf":-0.173018426,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":7,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":7,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":7,"yes":10},{"depth":null,"leaf":0.0843105838,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":0.236887291,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.0104054213,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":7,"yes":8},{"depth":null,"leaf":0.0072258329,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.171714455,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":8,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":4},{"depth":null,"leaf":-0.179455951,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.0102903834,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":8,"yes":6},{"depth":null,"leaf":0.0586014725,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":8},{"depth":null,"leaf":0.068535842,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.2342868,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":9,"yes":2},{"depth":null,"leaf":0.202173784,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":null,"leaf":-0.169466257,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":10,"yes":2},{"depth":null,"leaf":-0.160806924,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.60000002,"tree_id":10,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":10,"yes":6},{"depth":null,"leaf":0.203813776,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.046239242,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":5.0999999,"tree_id":10,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":10,"yes":10},{"depth":null,"leaf":-0.145340025,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.123540193,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":-0.160442933,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":11,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":11,"yes":4},{"depth":null,"leaf":-0.168171152,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.0149572417,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":11,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":11,"yes":8},{"depth":null,"leaf":0.195176765,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":-0.0395982973,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.204244092,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":12,"yes":2},{"depth":null,"leaf":0.181544691,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":null,"leaf":-0.161027163,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":13,"yes":2},{"depth":null,"leaf":-0.150903225,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":13,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":13,"yes":6},{"depth":null,"leaf":0.18685849,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":13,"yes":8},{"depth":null,"leaf":-0.13117227,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":0.077316612,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":-0.15599905,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":14,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":14,"yes":4},{"depth":null,"leaf":-0.159298271,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.0134122102,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":14,"yes":6},{"depth":null,"leaf":0.0381595641,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":14,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":7,"split":"petal width","split_condition":2,"tree_id":14,"yes":10},{"depth":null,"leaf":-0.00389169785,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.101416349,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.186925322,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":15,"yes":2},{"depth":null,"leaf":0.16711998,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":null,"leaf":-0.154198557,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":16,"yes":2},{"depth":null,"leaf":-0.142255381,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":16,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":16,"yes":6},{"depth":null,"leaf":0.172067791,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":16,"yes":8},{"depth":null,"leaf":-0.121421516,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":0.073711507,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":-0.148049027,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":17,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":17,"yes":4},{"depth":null,"leaf":-0.151937172,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.0142573239,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":17,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":17,"yes":8},{"depth":null,"leaf":0.153471231,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":-0.0392971113,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.168022811,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":18,"yes":2},{"depth":null,"leaf":0.156131104,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":null,"leaf":-0.148197949,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":19,"yes":2},{"depth":null,"leaf":-0.134196311,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":19,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":19,"yes":6},{"depth":null,"leaf":0.160865128,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":19,"yes":8},{"depth":null,"leaf":-0.110056646,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":0.0594659112,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":-0.139969245,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":20,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":20,"yes":4},{"depth":null,"leaf":-0.145403519,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.0147723975,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"sepal width","split_condition":3.20000005,"tree_id":20,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"petal width","split_condition":1.79999995,"tree_id":20,"yes":8},{"depth":null,"leaf":0.0483957976,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.162800461,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":2,"leaf":null,"missing":10,"no":11,"nodeid":7,"parentid":3,"split":"petal length","split_condition":5.19999981,"tree_id":20,"yes":10},{"depth":null,"leaf":-0.0793080404,"missing":null,"no":null,"nodeid":10,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.112726398,"missing":null,"no":null,"nodeid":11,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":21,"yes":2},{"depth":null,"leaf":0.14705947,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":null,"leaf":-0.142660394,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":22,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":22,"yes":4},{"depth":null,"leaf":-0.12631698,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":22,"yes":6},{"depth":null,"leaf":0.151711732,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":22,"yes":8},{"depth":null,"leaf":-0.101206295,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":0.0569678135,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":-0.132955521,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":23,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":23,"yes":4},{"depth":null,"leaf":-0.1391913,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.0150168026,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":23,"yes":6},{"depth":null,"leaf":0.014580613,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":23,"yes":8},{"depth":null,"leaf":0.0168433767,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.154607058,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":24,"yes":2},{"depth":null,"leaf":0.139016181,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":null,"leaf":-0.13727048,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":25,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":25,"yes":4},{"depth":null,"leaf":-0.118402772,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.79999995,"tree_id":25,"yes":6},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":5,"split":"sepal length","split_condition":5.19999981,"tree_id":25,"yes":8},{"depth":null,"leaf":0.0103592547,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":0.152987525,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.0338534117,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.126058802,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":26,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":26,"yes":4},{"depth":null,"leaf":-0.137931168,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":26,"yes":6},{"depth":null,"leaf":0.116194524,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":-0.0252925735,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":0.148122758,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":27,"yes":2},{"depth":null,"leaf":0.131407082,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":null,"leaf":-0.131564274,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":28,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":28,"yes":4},{"depth":null,"leaf":-0.110398278,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":28,"yes":6},{"depth":null,"leaf":0.135915175,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal length","split_condition":6,"tree_id":28,"yes":8},{"depth":null,"leaf":0.01785478,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.0288929809,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.117059968,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":29,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":29,"yes":4},{"depth":null,"leaf":-0.131456167,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":29,"yes":6},{"depth":null,"leaf":0.108389735,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":-0.0236288365,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":0.138706177,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":29,"yes":null}]},{"name":"treeCalcs","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["x","y","depth","children"],"method":"tidy","separation":{"signal":"false"},"type":"tree"}]},{"name":"treeChildren","source":"treeCalcs","transform":[{"as":["childrenObjects"],"fields":["parentid"],"groupby":["parentid"],"ops":["values"],"type":"aggregate"},{"as":"childrenIds","expr":"pluck(datum.childrenObjects,'nodeid')","type":"formula"}]},{"name":"treeAncestors","source":"treeCalcs","transform":[{"as":"treeAncestors","expr":"treeAncestors('treeCalcs', datum.nodeid, 'root')","type":"formula"},{"fields":["treeAncestors"],"type":"flatten"},{"as":"allParents","expr":"datum.treeAncestors.parentid","type":"formula"}]},{"name":"treeChildrenAll","source":"treeAncestors","transform":[{"fields":["allParents","nodeid","name","parentid","x","y","depth","children"],"type":"project"},{"as":["allChildrenObjects","allChildrenCount","id"],"fields":["parentid","parentid","nodeid"],"groupby":["allParents"],"ops":["values","count","min"],"type":"aggregate"},{"as":"allChildrenIds","expr":"pluck(datum.allChildrenObjects,'nodeid')","type":"formula"}]},{"name":"treeClickStoreTemp","source":"treeAncestors","transform":[{"expr":"startingDepth != -1 ? datum.depth <= startingDepth : node != 0 && !isExpanded ? datum.parentid == node: node != 0 && isExpanded ? datum.allParents == node : false","type":"filter"},{"fields":["nodeid","parentid","x","y","depth","children"],"type":"project"},{"fields":["nodeid"],"groupby":["nodeid","parentid","x","y","depth","children"],"ops":["min"],"type":"aggregate"}]},{"name":"treeClickStorePerm","on":[{"insert":"data('treeClickStoreTemp')","trigger":"startingDepth >= 0"},{"insert":"!isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"},{"remove":"isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"}],"values":[]},{"name":"treeLayout","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid)","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["x","y","depth","children"],"method":"tidy","nodeSize":[{"signal":"nodeWidth + spaceBetweenNodes"},{"signal":"nodeHeight+ spaceBetweenLevels"}],"separation":{"signal":"false"},"type":"tree"},{"as":"y","expr":"-1*(datum.y+(height/10))","type":"formula"},{"as":"x","expr":"1*(datum.x+(width/2))","type":"formula"},{"field":"x","signal":"x_extent","type":"extent"},{"field":"y","signal":"y_extent","type":"extent"},{"as":"xscaled","expr":"scale('xscale',datum.x)","type":"formula"},{"as":"parent","expr":"datum.parentid","type":"formula"}]},{"name":"fullTreeLayout","source":"treeLayout","transform":[{"fields":["nodeid"],"from":"treeChildren","key":"parentid","type":"lookup","values":["childrenObjects","childrenIds"]},{"fields":["nodeid"],"from":"treeChildrenAll","key":"allParents","type":"lookup","values":["allChildrenIds","allChildrenObjects"]},{"fields":["nodeid"],"from":"treeCalcs","key":"nodeid","type":"lookup","values":["children"]},{"as":"treeParent","expr":"reverse(pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid'))[1]","type":"formula"},{"as":"isLeaf","expr":"datum.leaf == null","type":"formula"}]},{"name":"splitNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && datum.isLeaf","type":"filter"}]},{"name":"leafNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && !datum.isLeaf","type":"filter"}]},{"name":"links","source":"treeLayout","transform":[{"type":"treelinks"},{"orient":"vertical","shape":"line","sourceX":{"expr":"scale('xscale', datum.source.x)"},"sourceY":{"expr":"scale('yscale', datum.source.y)"},"targetX":{"expr":"scale('xscale', datum.target.x)"},"targetY":{"expr":"scale('yscale', datum.target.y) - scaledNodeHeight"},"type":"linkpath"},{"expr":" indata('treeClickStorePerm', 'nodeid', datum.target.nodeid)","type":"filter"}]},{"name":"yesPaths","source":"links","transform":[{"expr":"datum.source.yes === datum.target.nodeid ","type":"filter"}]},{"name":"noPaths","source":"links","transform":[{"expr":"datum.source.yes !== datum.target.nodeid ","type":"filter"}]}],"height":400,"marks":[{"encode":{"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"update":{"path":{"field":"path"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"}}},"from":{"data":"yesPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"path":{"field":"path"},"stroke":{"value":"#f8f8f2"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"},"strokewidth":{"value":1}}},"from":{"data":"noPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#50fa7b"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"yes"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"yesPaths"},"type":"text"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#ff5555"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"no"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"noPaths"},"type":"text"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#ff79c6"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"splitNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"bold"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"parent.split + ' <= ' + format(parent.split_condition, '.2f')"},"x":{"signal":"(scaledNodeWidth / 2)"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"},{"encode":{"update":{"align":{"value":"right"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"text":{"signal":"parent.children"},"x":{"signal":"item.mark.group.width - (9/ span(xdom))*width"},"y":{"signal":"item.mark.group.height/2"}}},"interactive":false,"type":"text"}],"name":"splitNode","type":"group"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#44475a"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#ff79c6"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"leafNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"normal"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"'leaf = ' + format(parent.leaf, '.2f')"},"x":{"signal":"scaledNodeWidth / 2"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"}],"name":"leafNode","type":"group"}],"padding":30,"scales":[{"domain":{"signal":"xdom"},"name":"xscale","range":{"signal":"xrange"},"zero":false},{"domain":{"signal":"ydom"},"name":"yscale","range":{"signal":"yrange"},"zero":false}],"signals":[{"name":"selectedTree","value":0},{"name":"node","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.nodeid"}],"value":0},{"name":"nodeHighlight","on":[{"events":[{"markname":"splitNode","type":"mouseover"},{"markname":"leafNode","type":"mouseover"}],"update":"pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid')"},{"events":{"type":"mouseout"},"update":"[0]"}],"value":"[0]"},{"name":"isExpanded","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.children > 0 && indata('treeClickStorePerm', 'nodeid', datum.childrenIds[0]) ? true : false"}],"value":0},{"name":"xrange","update":"[0, width]"},{"name":"yrange","update":"[0, height]"},{"name":"down","on":[{"events":"mousedown","update":"xy()"}],"value":null},{"name":"xcur","on":[{"events":"mousedown","update":"slice(xdom)"}],"value":null},{"name":"ycur","on":[{"events":"mousedown","update":"slice(ydom)"}],"value":null},{"name":"delta","on":[{"events":[{"between":[{"type":"mousedown"},{"source":"window","type":"mouseup"}],"consume":true,"source":"window","type":"mousemove"}],"update":"down ? [down[0]-x(), down[1]-y()] : [0,0]"}],"value":[0,0]},{"name":"anchor","on":[{"events":"wheel","update":"[invert('xscale', x()), invert('yscale', y())]"}],"value":[0,0]},{"name":"xext","update":"[0,width]"},{"name":"yext","update":"[0,height]"},{"name":"zoom","on":[{"events":"wheel!","force":true,"update":"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}],"value":1},{"name":"xdom","on":[{"events":{"signal":"delta"},"update":"[xcur[0] + span(xcur) * delta[0] / width, xcur[1] + span(xcur) * delta[0] / width]"},{"events":{"signal":"zoom"},"update":"[anchor[0] + (xdom[0] - anchor[0]) * zoom, anchor[0] + (xdom[1] - anchor[0]) * zoom]"}],"update":"[x_extent[0] - nodeWidth/ 2, x_extent[1] + nodeWidth / 2]"},{"name":"ydom","on":[{"events":{"signal":"delta"},"update":"[ycur[0] + span(ycur) * delta[1] / height, ycur[1] + span(ycur) * delta[1] / height]"},{"events":{"signal":"zoom"},"update":"[anchor[1] + (ydom[0] - anchor[1]) * zoom, anchor[1] + (ydom[1] - anchor[1]) * zoom]"}],"update":"[y_extent[0] - nodeHeight, y_extent[1] + nodeHeight/3]"},{"name":"scaledNodeWidth","update":"(nodeWidth/ span(xdom))*width"},{"name":"scaledNodeHeight","update":"abs(nodeHeight/ span(ydom))*height"},{"name":"scaledLimit","update":"(20/ span(xdom))*width"},{"name":"spaceBetweenLevels","value":100},{"name":"spaceBetweenNodes","value":10},{"name":"nodeWidth","value":100},{"name":"nodeHeight","value":45},{"name":"startingDepth","on":[{"events":{"throttle":0,"type":"timer"},"update":"-1"}],"value":3}],"width":600}

By default, plotting only shows one (the first) tree, but seeing as a Booster is really an ensemble of trees you can choose which tree to plot through the :index option, or set to nil to have a dropdown box to select the tree.

EXGBoost.plot_tree(booster, rankdir: :lr, index: 4)
{"$schema":"https://vega.github.io/schema/vega/v5.json","autosize":"fit","background":"#282a36","data":[{"name":"tree","values":[{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":0,"yes":2},{"depth":null,"leaf":0.425454557,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":null,"leaf":-0.218918934,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":1,"yes":2},{"depth":null,"leaf":-0.212727293,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":1,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":1,"yes":6},{"depth":null,"leaf":0.410982668,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":1,"yes":8},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-0.211034521,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":2,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":4},{"depth":null,"leaf":-0.218530372,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":2,"yes":6},{"depth":null,"leaf":0.0719999969,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":8},{"depth":null,"leaf":0.128571421,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":0.422068983,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":3,"yes":2},{"depth":null,"leaf":0.292982191,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":null,"leaf":-0.195790753,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":4,"yes":2},{"depth":null,"leaf":-0.18925412,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":4,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":4,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":4,"yes":10},{"depth":null,"leaf":0.110490814,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":0.295589149,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.0065466417,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":4,"yes":8},{"depth":null,"leaf":-0.00258299569,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.187741965,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":5,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":5,"yes":4},{"depth":null,"leaf":-0.195117101,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.00513018994,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":5,"yes":6},{"depth":null,"leaf":0.0662105083,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.283106089,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":6,"yes":2},{"depth":null,"leaf":0.234668195,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":null,"leaf":-0.18040958,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":7,"yes":2},{"depth":null,"leaf":-0.173018426,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":7,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":7,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":7,"yes":10},{"depth":null,"leaf":0.0843105838,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":0.236887291,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.0104054213,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":7,"yes":8},{"depth":null,"leaf":0.0072258329,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.171714455,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":8,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":4},{"depth":null,"leaf":-0.179455951,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.0102903834,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":8,"yes":6},{"depth":null,"leaf":0.0586014725,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":8},{"depth":null,"leaf":0.068535842,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.2342868,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":9,"yes":2},{"depth":null,"leaf":0.202173784,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":null,"leaf":-0.169466257,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":10,"yes":2},{"depth":null,"leaf":-0.160806924,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.60000002,"tree_id":10,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":10,"yes":6},{"depth":null,"leaf":0.203813776,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.046239242,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":5.0999999,"tree_id":10,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":10,"yes":10},{"depth":null,"leaf":-0.145340025,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.123540193,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":-0.160442933,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":11,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":11,"yes":4},{"depth":null,"leaf":-0.168171152,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.0149572417,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":11,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":11,"yes":8},{"depth":null,"leaf":0.195176765,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":-0.0395982973,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.204244092,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":12,"yes":2},{"depth":null,"leaf":0.181544691,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":null,"leaf":-0.161027163,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":13,"yes":2},{"depth":null,"leaf":-0.150903225,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":13,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":13,"yes":6},{"depth":null,"leaf":0.18685849,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":13,"yes":8},{"depth":null,"leaf":-0.13117227,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":0.077316612,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":-0.15599905,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":14,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":14,"yes":4},{"depth":null,"leaf":-0.159298271,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.0134122102,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":14,"yes":6},{"depth":null,"leaf":0.0381595641,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":14,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":7,"split":"petal width","split_condition":2,"tree_id":14,"yes":10},{"depth":null,"leaf":-0.00389169785,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.101416349,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.186925322,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":15,"yes":2},{"depth":null,"leaf":0.16711998,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":null,"leaf":-0.154198557,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":16,"yes":2},{"depth":null,"leaf":-0.142255381,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":16,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":16,"yes":6},{"depth":null,"leaf":0.172067791,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":16,"yes":8},{"depth":null,"leaf":-0.121421516,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":0.073711507,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":-0.148049027,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":17,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":17,"yes":4},{"depth":null,"leaf":-0.151937172,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.0142573239,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":17,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":17,"yes":8},{"depth":null,"leaf":0.153471231,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":-0.0392971113,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.168022811,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":18,"yes":2},{"depth":null,"leaf":0.156131104,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":null,"leaf":-0.148197949,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":19,"yes":2},{"depth":null,"leaf":-0.134196311,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":19,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":19,"yes":6},{"depth":null,"leaf":0.160865128,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":19,"yes":8},{"depth":null,"leaf":-0.110056646,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":0.0594659112,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":-0.139969245,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":20,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":20,"yes":4},{"depth":null,"leaf":-0.145403519,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.0147723975,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"sepal width","split_condition":3.20000005,"tree_id":20,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"petal width","split_condition":1.79999995,"tree_id":20,"yes":8},{"depth":null,"leaf":0.0483957976,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.162800461,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":2,"leaf":null,"missing":10,"no":11,"nodeid":7,"parentid":3,"split":"petal length","split_condition":5.19999981,"tree_id":20,"yes":10},{"depth":null,"leaf":-0.0793080404,"missing":null,"no":null,"nodeid":10,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.112726398,"missing":null,"no":null,"nodeid":11,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":21,"yes":2},{"depth":null,"leaf":0.14705947,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":null,"leaf":-0.142660394,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":22,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":22,"yes":4},{"depth":null,"leaf":-0.12631698,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":22,"yes":6},{"depth":null,"leaf":0.151711732,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":22,"yes":8},{"depth":null,"leaf":-0.101206295,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":0.0569678135,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":-0.132955521,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":23,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":23,"yes":4},{"depth":null,"leaf":-0.1391913,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.0150168026,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":23,"yes":6},{"depth":null,"leaf":0.014580613,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":23,"yes":8},{"depth":null,"leaf":0.0168433767,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.154607058,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":24,"yes":2},{"depth":null,"leaf":0.139016181,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":null,"leaf":-0.13727048,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":25,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":25,"yes":4},{"depth":null,"leaf":-0.118402772,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.79999995,"tree_id":25,"yes":6},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":5,"split":"sepal length","split_condition":5.19999981,"tree_id":25,"yes":8},{"depth":null,"leaf":0.0103592547,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":0.152987525,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.0338534117,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.126058802,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":26,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":26,"yes":4},{"depth":null,"leaf":-0.137931168,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":26,"yes":6},{"depth":null,"leaf":0.116194524,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":-0.0252925735,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":0.148122758,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":27,"yes":2},{"depth":null,"leaf":0.131407082,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":null,"leaf":-0.131564274,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":28,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":28,"yes":4},{"depth":null,"leaf":-0.110398278,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":28,"yes":6},{"depth":null,"leaf":0.135915175,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal length","split_condition":6,"tree_id":28,"yes":8},{"depth":null,"leaf":0.01785478,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.0288929809,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.117059968,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":29,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":29,"yes":4},{"depth":null,"leaf":-0.131456167,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":29,"yes":6},{"depth":null,"leaf":0.108389735,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":-0.0236288365,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":0.138706177,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":29,"yes":null}]},{"name":"treeCalcs","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["y","x","depth","children"],"method":"tidy","separation":{"signal":"false"},"type":"tree"}]},{"name":"treeChildren","source":"treeCalcs","transform":[{"as":["childrenObjects"],"fields":["parentid"],"groupby":["parentid"],"ops":["values"],"type":"aggregate"},{"as":"childrenIds","expr":"pluck(datum.childrenObjects,'nodeid')","type":"formula"}]},{"name":"treeAncestors","source":"treeCalcs","transform":[{"as":"treeAncestors","expr":"treeAncestors('treeCalcs', datum.nodeid, 'root')","type":"formula"},{"fields":["treeAncestors"],"type":"flatten"},{"as":"allParents","expr":"datum.treeAncestors.parentid","type":"formula"}]},{"name":"treeChildrenAll","source":"treeAncestors","transform":[{"fields":["allParents","nodeid","name","parentid","x","y","depth","children"],"type":"project"},{"as":["allChildrenObjects","allChildrenCount","id"],"fields":["parentid","parentid","nodeid"],"groupby":["allParents"],"ops":["values","count","min"],"type":"aggregate"},{"as":"allChildrenIds","expr":"pluck(datum.allChildrenObjects,'nodeid')","type":"formula"}]},{"name":"treeClickStoreTemp","source":"treeAncestors","transform":[{"expr":"startingDepth != -1 ? datum.depth <= startingDepth : node != 0 && !isExpanded ? datum.parentid == node: node != 0 && isExpanded ? datum.allParents == node : false","type":"filter"},{"fields":["nodeid","parentid","x","y","depth","children"],"type":"project"},{"fields":["nodeid"],"groupby":["nodeid","parentid","x","y","depth","children"],"ops":["min"],"type":"aggregate"}]},{"name":"treeClickStorePerm","on":[{"insert":"data('treeClickStoreTemp')","trigger":"startingDepth >= 0"},{"insert":"!isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"},{"remove":"isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"}],"values":[]},{"name":"treeLayout","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid)","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["y","x","depth","children"],"method":"tidy","nodeSize":[{"signal":"nodeWidth + spaceBetweenNodes"},{"signal":"nodeHeight+ spaceBetweenLevels"}],"separation":{"signal":"false"},"type":"tree"},{"as":"y","expr":"1*(datum.y+(height/10))","type":"formula"},{"as":"x","expr":"1*(datum.x+(width/2))","type":"formula"},{"field":"x","signal":"x_extent","type":"extent"},{"field":"y","signal":"y_extent","type":"extent"},{"as":"xscaled","expr":"scale('xscale',datum.x)","type":"formula"},{"as":"parent","expr":"datum.parentid","type":"formula"}]},{"name":"fullTreeLayout","source":"treeLayout","transform":[{"fields":["nodeid"],"from":"treeChildren","key":"parentid","type":"lookup","values":["childrenObjects","childrenIds"]},{"fields":["nodeid"],"from":"treeChildrenAll","key":"allParents","type":"lookup","values":["allChildrenIds","allChildrenObjects"]},{"fields":["nodeid"],"from":"treeCalcs","key":"nodeid","type":"lookup","values":["children"]},{"as":"treeParent","expr":"reverse(pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid'))[1]","type":"formula"},{"as":"isLeaf","expr":"datum.leaf == null","type":"formula"}]},{"name":"splitNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && datum.isLeaf","type":"filter"}]},{"name":"leafNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && !datum.isLeaf","type":"filter"}]},{"name":"links","source":"treeLayout","transform":[{"type":"treelinks"},{"orient":"horizontal","shape":"line","sourceX":{"expr":"scale('xscale', datum.source.x) + scaledNodeWidth/2"},"sourceY":{"expr":"scale('yscale', datum.source.y) - scaledNodeHeight/2"},"targetX":{"expr":"scale('xscale', datum.target.x) - scaledNodeWidth/2"},"targetY":{"expr":"scale('yscale', datum.target.y) - scaledNodeHeight/2"},"type":"linkpath"},{"expr":" indata('treeClickStorePerm', 'nodeid', datum.target.nodeid)","type":"filter"}]},{"name":"yesPaths","source":"links","transform":[{"expr":"datum.source.yes === datum.target.nodeid ","type":"filter"}]},{"name":"noPaths","source":"links","transform":[{"expr":"datum.source.yes !== datum.target.nodeid ","type":"filter"}]}],"height":400,"marks":[{"encode":{"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"update":{"path":{"field":"path"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"}}},"from":{"data":"yesPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"path":{"field":"path"},"stroke":{"value":"#f8f8f2"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"},"strokewidth":{"value":1}}},"from":{"data":"noPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#50fa7b"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"yes"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y-nodeWidth/3) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"yesPaths"},"type":"text"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#ff5555"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"no"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"noPaths"},"type":"text"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#ff79c6"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"splitNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"bold"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"parent.split + ' <= ' + format(parent.split_condition, '.2f')"},"x":{"signal":"(scaledNodeWidth / 2)"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"},{"encode":{"update":{"align":{"value":"right"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"text":{"signal":"parent.children"},"x":{"signal":"item.mark.group.width - (9/ span(xdom))*width"},"y":{"signal":"item.mark.group.height/2"}}},"interactive":false,"type":"text"}],"name":"splitNode","type":"group"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#44475a"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#ff79c6"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"leafNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"normal"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"'leaf = ' + format(parent.leaf, '.2f')"},"x":{"signal":"scaledNodeWidth / 2"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"}],"name":"leafNode","type":"group"}],"padding":30,"scales":[{"domain":{"signal":"xdom"},"name":"xscale","range":{"signal":"xrange"},"zero":false},{"domain":{"signal":"ydom"},"name":"yscale","range":{"signal":"yrange"},"zero":false}],"signals":[{"name":"selectedTree","value":4},{"name":"node","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.nodeid"}],"value":0},{"name":"nodeHighlight","on":[{"events":[{"markname":"splitNode","type":"mouseover"},{"markname":"leafNode","type":"mouseover"}],"update":"pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid')"},{"events":{"type":"mouseout"},"update":"[0]"}],"value":"[0]"},{"name":"isExpanded","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.children > 0 && indata('treeClickStorePerm', 'nodeid', datum.childrenIds[0]) ? true : false"}],"value":0},{"name":"xrange","update":"[0, width]"},{"name":"yrange","update":"[0, height]"},{"name":"down","on":[{"events":"mousedown","update":"xy()"}],"value":null},{"name":"xcur","on":[{"events":"mousedown","update":"slice(xdom)"}],"value":null},{"name":"ycur","on":[{"events":"mousedown","update":"slice(ydom)"}],"value":null},{"name":"delta","on":[{"events":[{"between":[{"type":"mousedown"},{"source":"window","type":"mouseup"}],"consume":true,"source":"window","type":"mousemove"}],"update":"down ? [down[0]-x(), down[1]-y()] : [0,0]"}],"value":[0,0]},{"name":"anchor","on":[{"events":"wheel","update":"[invert('xscale', x()), invert('yscale', y())]"}],"value":[0,0]},{"name":"xext","update":"[0,width]"},{"name":"yext","update":"[0,height]"},{"name":"zoom","on":[{"events":"wheel!","force":true,"update":"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}],"value":1},{"name":"xdom","on":[{"events":{"signal":"delta"},"update":"[xcur[0] + span(xcur) * delta[0] / width, xcur[1] + span(xcur) * delta[0] / width]"},{"events":{"signal":"zoom"},"update":"[anchor[0] + (xdom[0] - anchor[0]) * zoom, anchor[0] + (xdom[1] - anchor[0]) * zoom]"}],"update":"[x_extent[0] - nodeWidth/ 2, x_extent[1] + nodeWidth / 2]"},{"name":"ydom","on":[{"events":{"signal":"delta"},"update":"[ycur[0] + span(ycur) * delta[1] / height, ycur[1] + span(ycur) * delta[1] / height]"},{"events":{"signal":"zoom"},"update":"[anchor[1] + (ydom[0] - anchor[1]) * zoom, anchor[1] + (ydom[1] - anchor[1]) * zoom]"}],"update":"[y_extent[0] - nodeHeight, y_extent[1] + nodeHeight/3]"},{"name":"scaledNodeWidth","update":"(nodeWidth/ span(xdom))*width"},{"name":"scaledNodeHeight","update":"abs(nodeHeight/ span(ydom))*height"},{"name":"scaledLimit","update":"(20/ span(xdom))*width"},{"name":"spaceBetweenLevels","value":100},{"name":"spaceBetweenNodes","value":10},{"name":"nodeWidth","value":100},{"name":"nodeHeight","value":45},{"name":"startingDepth","on":[{"events":{"throttle":0,"type":"timer"},"update":"-1"}],"value":3}],"width":600}

You'll also notice that the plot is interactive, with support for scrolling, zooming, and collapsing sections of the tree. If you click on a split node you will toggle the visibility of its descendents, and the rest of the tree will fill the canvas.

You can also use the :depth option to programatically set the max depth to display in the tree:

EXGBoost.plot_tree(booster, rankdir: :lr, index: 4, depth: 3)
{"$schema":"https://vega.github.io/schema/vega/v5.json","autosize":"fit","background":"#282a36","data":[{"name":"tree","values":[{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":0,"yes":2},{"depth":null,"leaf":0.425454557,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":null,"leaf":-0.218918934,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":1,"yes":2},{"depth":null,"leaf":-0.212727293,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":1,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":1,"yes":6},{"depth":null,"leaf":0.410982668,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":1,"yes":8},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-0.211034521,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":2,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":4},{"depth":null,"leaf":-0.218530372,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":2,"yes":6},{"depth":null,"leaf":0.0719999969,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":8},{"depth":null,"leaf":0.128571421,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":0.422068983,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":3,"yes":2},{"depth":null,"leaf":0.292982191,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":null,"leaf":-0.195790753,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":4,"yes":2},{"depth":null,"leaf":-0.18925412,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":4,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":4,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":4,"yes":10},{"depth":null,"leaf":0.110490814,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":0.295589149,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.0065466417,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":4,"yes":8},{"depth":null,"leaf":-0.00258299569,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.187741965,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":5,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":5,"yes":4},{"depth":null,"leaf":-0.195117101,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.00513018994,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":5,"yes":6},{"depth":null,"leaf":0.0662105083,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.283106089,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":6,"yes":2},{"depth":null,"leaf":0.234668195,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":null,"leaf":-0.18040958,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":7,"yes":2},{"depth":null,"leaf":-0.173018426,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":7,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":7,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":7,"yes":10},{"depth":null,"leaf":0.0843105838,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":0.236887291,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.0104054213,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":7,"yes":8},{"depth":null,"leaf":0.0072258329,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.171714455,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":8,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":4},{"depth":null,"leaf":-0.179455951,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.0102903834,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":8,"yes":6},{"depth":null,"leaf":0.0586014725,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":8},{"depth":null,"leaf":0.068535842,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.2342868,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":9,"yes":2},{"depth":null,"leaf":0.202173784,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":null,"leaf":-0.169466257,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":10,"yes":2},{"depth":null,"leaf":-0.160806924,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.60000002,"tree_id":10,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":10,"yes":6},{"depth":null,"leaf":0.203813776,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.046239242,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":5.0999999,"tree_id":10,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":10,"yes":10},{"depth":null,"leaf":-0.145340025,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.123540193,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":-0.160442933,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":11,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":11,"yes":4},{"depth":null,"leaf":-0.168171152,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.0149572417,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":11,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":11,"yes":8},{"depth":null,"leaf":0.195176765,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":-0.0395982973,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.204244092,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":12,"yes":2},{"depth":null,"leaf":0.181544691,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":null,"leaf":-0.161027163,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":13,"yes":2},{"depth":null,"leaf":-0.150903225,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":13,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":13,"yes":6},{"depth":null,"leaf":0.18685849,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":13,"yes":8},{"depth":null,"leaf":-0.13117227,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":0.077316612,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":-0.15599905,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":14,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":14,"yes":4},{"depth":null,"leaf":-0.159298271,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.0134122102,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":14,"yes":6},{"depth":null,"leaf":0.0381595641,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":14,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":7,"split":"petal width","split_condition":2,"tree_id":14,"yes":10},{"depth":null,"leaf":-0.00389169785,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.101416349,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.186925322,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":15,"yes":2},{"depth":null,"leaf":0.16711998,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":null,"leaf":-0.154198557,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":16,"yes":2},{"depth":null,"leaf":-0.142255381,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":16,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":16,"yes":6},{"depth":null,"leaf":0.172067791,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":16,"yes":8},{"depth":null,"leaf":-0.121421516,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":0.073711507,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":-0.148049027,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":17,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":17,"yes":4},{"depth":null,"leaf":-0.151937172,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.0142573239,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":17,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":17,"yes":8},{"depth":null,"leaf":0.153471231,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":-0.0392971113,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.168022811,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":18,"yes":2},{"depth":null,"leaf":0.156131104,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":null,"leaf":-0.148197949,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":19,"yes":2},{"depth":null,"leaf":-0.134196311,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":19,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":19,"yes":6},{"depth":null,"leaf":0.160865128,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":19,"yes":8},{"depth":null,"leaf":-0.110056646,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":0.0594659112,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":-0.139969245,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":20,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":20,"yes":4},{"depth":null,"leaf":-0.145403519,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.0147723975,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"sepal width","split_condition":3.20000005,"tree_id":20,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"petal width","split_condition":1.79999995,"tree_id":20,"yes":8},{"depth":null,"leaf":0.0483957976,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.162800461,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":2,"leaf":null,"missing":10,"no":11,"nodeid":7,"parentid":3,"split":"petal length","split_condition":5.19999981,"tree_id":20,"yes":10},{"depth":null,"leaf":-0.0793080404,"missing":null,"no":null,"nodeid":10,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.112726398,"missing":null,"no":null,"nodeid":11,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":21,"yes":2},{"depth":null,"leaf":0.14705947,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":null,"leaf":-0.142660394,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":22,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":22,"yes":4},{"depth":null,"leaf":-0.12631698,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":22,"yes":6},{"depth":null,"leaf":0.151711732,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":22,"yes":8},{"depth":null,"leaf":-0.101206295,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":0.0569678135,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":-0.132955521,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":23,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":23,"yes":4},{"depth":null,"leaf":-0.1391913,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.0150168026,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":23,"yes":6},{"depth":null,"leaf":0.014580613,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":23,"yes":8},{"depth":null,"leaf":0.0168433767,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.154607058,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":24,"yes":2},{"depth":null,"leaf":0.139016181,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":null,"leaf":-0.13727048,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":25,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":25,"yes":4},{"depth":null,"leaf":-0.118402772,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.79999995,"tree_id":25,"yes":6},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":5,"split":"sepal length","split_condition":5.19999981,"tree_id":25,"yes":8},{"depth":null,"leaf":0.0103592547,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":0.152987525,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.0338534117,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.126058802,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":26,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":26,"yes":4},{"depth":null,"leaf":-0.137931168,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":26,"yes":6},{"depth":null,"leaf":0.116194524,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":-0.0252925735,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":0.148122758,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":27,"yes":2},{"depth":null,"leaf":0.131407082,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":null,"leaf":-0.131564274,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":28,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":28,"yes":4},{"depth":null,"leaf":-0.110398278,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":28,"yes":6},{"depth":null,"leaf":0.135915175,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal length","split_condition":6,"tree_id":28,"yes":8},{"depth":null,"leaf":0.01785478,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.0288929809,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.117059968,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":29,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":29,"yes":4},{"depth":null,"leaf":-0.131456167,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":29,"yes":6},{"depth":null,"leaf":0.108389735,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":-0.0236288365,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":0.138706177,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":29,"yes":null}]},{"name":"treeCalcs","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["y","x","depth","children"],"method":"tidy","separation":{"signal":"false"},"type":"tree"}]},{"name":"treeChildren","source":"treeCalcs","transform":[{"as":["childrenObjects"],"fields":["parentid"],"groupby":["parentid"],"ops":["values"],"type":"aggregate"},{"as":"childrenIds","expr":"pluck(datum.childrenObjects,'nodeid')","type":"formula"}]},{"name":"treeAncestors","source":"treeCalcs","transform":[{"as":"treeAncestors","expr":"treeAncestors('treeCalcs', datum.nodeid, 'root')","type":"formula"},{"fields":["treeAncestors"],"type":"flatten"},{"as":"allParents","expr":"datum.treeAncestors.parentid","type":"formula"}]},{"name":"treeChildrenAll","source":"treeAncestors","transform":[{"fields":["allParents","nodeid","name","parentid","x","y","depth","children"],"type":"project"},{"as":["allChildrenObjects","allChildrenCount","id"],"fields":["parentid","parentid","nodeid"],"groupby":["allParents"],"ops":["values","count","min"],"type":"aggregate"},{"as":"allChildrenIds","expr":"pluck(datum.allChildrenObjects,'nodeid')","type":"formula"}]},{"name":"treeClickStoreTemp","source":"treeAncestors","transform":[{"expr":"startingDepth != -1 ? datum.depth <= startingDepth : node != 0 && !isExpanded ? datum.parentid == node: node != 0 && isExpanded ? datum.allParents == node : false","type":"filter"},{"fields":["nodeid","parentid","x","y","depth","children"],"type":"project"},{"fields":["nodeid"],"groupby":["nodeid","parentid","x","y","depth","children"],"ops":["min"],"type":"aggregate"}]},{"name":"treeClickStorePerm","on":[{"insert":"data('treeClickStoreTemp')","trigger":"startingDepth >= 0"},{"insert":"!isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"},{"remove":"isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"}],"values":[]},{"name":"treeLayout","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid)","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["y","x","depth","children"],"method":"tidy","nodeSize":[{"signal":"nodeWidth + spaceBetweenNodes"},{"signal":"nodeHeight+ spaceBetweenLevels"}],"separation":{"signal":"false"},"type":"tree"},{"as":"y","expr":"1*(datum.y+(height/10))","type":"formula"},{"as":"x","expr":"1*(datum.x+(width/2))","type":"formula"},{"field":"x","signal":"x_extent","type":"extent"},{"field":"y","signal":"y_extent","type":"extent"},{"as":"xscaled","expr":"scale('xscale',datum.x)","type":"formula"},{"as":"parent","expr":"datum.parentid","type":"formula"}]},{"name":"fullTreeLayout","source":"treeLayout","transform":[{"fields":["nodeid"],"from":"treeChildren","key":"parentid","type":"lookup","values":["childrenObjects","childrenIds"]},{"fields":["nodeid"],"from":"treeChildrenAll","key":"allParents","type":"lookup","values":["allChildrenIds","allChildrenObjects"]},{"fields":["nodeid"],"from":"treeCalcs","key":"nodeid","type":"lookup","values":["children"]},{"as":"treeParent","expr":"reverse(pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid'))[1]","type":"formula"},{"as":"isLeaf","expr":"datum.leaf == null","type":"formula"}]},{"name":"splitNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && datum.isLeaf","type":"filter"}]},{"name":"leafNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && !datum.isLeaf","type":"filter"}]},{"name":"links","source":"treeLayout","transform":[{"type":"treelinks"},{"orient":"horizontal","shape":"line","sourceX":{"expr":"scale('xscale', datum.source.x) + scaledNodeWidth/2"},"sourceY":{"expr":"scale('yscale', datum.source.y) - scaledNodeHeight/2"},"targetX":{"expr":"scale('xscale', datum.target.x) - scaledNodeWidth/2"},"targetY":{"expr":"scale('yscale', datum.target.y) - scaledNodeHeight/2"},"type":"linkpath"},{"expr":" indata('treeClickStorePerm', 'nodeid', datum.target.nodeid)","type":"filter"}]},{"name":"yesPaths","source":"links","transform":[{"expr":"datum.source.yes === datum.target.nodeid ","type":"filter"}]},{"name":"noPaths","source":"links","transform":[{"expr":"datum.source.yes !== datum.target.nodeid ","type":"filter"}]}],"height":400,"marks":[{"encode":{"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"update":{"path":{"field":"path"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"}}},"from":{"data":"yesPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"path":{"field":"path"},"stroke":{"value":"#f8f8f2"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"},"strokewidth":{"value":1}}},"from":{"data":"noPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#50fa7b"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"yes"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y-nodeWidth/3) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"yesPaths"},"type":"text"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#ff5555"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"no"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"noPaths"},"type":"text"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#ff79c6"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"splitNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"bold"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"parent.split + ' <= ' + format(parent.split_condition, '.2f')"},"x":{"signal":"(scaledNodeWidth / 2)"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"},{"encode":{"update":{"align":{"value":"right"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"text":{"signal":"parent.children"},"x":{"signal":"item.mark.group.width - (9/ span(xdom))*width"},"y":{"signal":"item.mark.group.height/2"}}},"interactive":false,"type":"text"}],"name":"splitNode","type":"group"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#44475a"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#ff79c6"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"leafNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"normal"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"'leaf = ' + format(parent.leaf, '.2f')"},"x":{"signal":"scaledNodeWidth / 2"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"}],"name":"leafNode","type":"group"}],"padding":30,"scales":[{"domain":{"signal":"xdom"},"name":"xscale","range":{"signal":"xrange"},"zero":false},{"domain":{"signal":"ydom"},"name":"yscale","range":{"signal":"yrange"},"zero":false}],"signals":[{"name":"selectedTree","value":4},{"name":"node","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.nodeid"}],"value":0},{"name":"nodeHighlight","on":[{"events":[{"markname":"splitNode","type":"mouseover"},{"markname":"leafNode","type":"mouseover"}],"update":"pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid')"},{"events":{"type":"mouseout"},"update":"[0]"}],"value":"[0]"},{"name":"isExpanded","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.children > 0 && indata('treeClickStorePerm', 'nodeid', datum.childrenIds[0]) ? true : false"}],"value":0},{"name":"xrange","update":"[0, width]"},{"name":"yrange","update":"[0, height]"},{"name":"down","on":[{"events":"mousedown","update":"xy()"}],"value":null},{"name":"xcur","on":[{"events":"mousedown","update":"slice(xdom)"}],"value":null},{"name":"ycur","on":[{"events":"mousedown","update":"slice(ydom)"}],"value":null},{"name":"delta","on":[{"events":[{"between":[{"type":"mousedown"},{"source":"window","type":"mouseup"}],"consume":true,"source":"window","type":"mousemove"}],"update":"down ? [down[0]-x(), down[1]-y()] : [0,0]"}],"value":[0,0]},{"name":"anchor","on":[{"events":"wheel","update":"[invert('xscale', x()), invert('yscale', y())]"}],"value":[0,0]},{"name":"xext","update":"[0,width]"},{"name":"yext","update":"[0,height]"},{"name":"zoom","on":[{"events":"wheel!","force":true,"update":"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}],"value":1},{"name":"xdom","on":[{"events":{"signal":"delta"},"update":"[xcur[0] + span(xcur) * delta[0] / width, xcur[1] + span(xcur) * delta[0] / width]"},{"events":{"signal":"zoom"},"update":"[anchor[0] + (xdom[0] - anchor[0]) * zoom, anchor[0] + (xdom[1] - anchor[0]) * zoom]"}],"update":"[x_extent[0] - nodeWidth/ 2, x_extent[1] + nodeWidth / 2]"},{"name":"ydom","on":[{"events":{"signal":"delta"},"update":"[ycur[0] + span(ycur) * delta[1] / height, ycur[1] + span(ycur) * delta[1] / height]"},{"events":{"signal":"zoom"},"update":"[anchor[1] + (ydom[0] - anchor[1]) * zoom, anchor[1] + (ydom[1] - anchor[1]) * zoom]"}],"update":"[y_extent[0] - nodeHeight, y_extent[1] + nodeHeight/3]"},{"name":"scaledNodeWidth","update":"(nodeWidth/ span(xdom))*width"},{"name":"scaledNodeHeight","update":"abs(nodeHeight/ span(ydom))*height"},{"name":"scaledLimit","update":"(20/ span(xdom))*width"},{"name":"spaceBetweenLevels","value":100},{"name":"spaceBetweenNodes","value":10},{"name":"nodeWidth","value":100},{"name":"nodeHeight","value":45},{"name":"startingDepth","on":[{"events":{"throttle":0,"type":"timer"},"update":"-1"}],"value":3}],"width":600}

One way to affect the canvas size is by controlling the padding.

You can add padding to all side by specifying an integer for the :padding option

EXGBoost.plot_tree(booster, rankdir: :rl, index: 4, depth: 3, padding: 50)
{"$schema":"https://vega.github.io/schema/vega/v5.json","autosize":"fit","background":"#282a36","data":[{"name":"tree","values":[{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":0,"yes":2},{"depth":null,"leaf":0.425454557,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":null,"leaf":-0.218918934,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":1,"yes":2},{"depth":null,"leaf":-0.212727293,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":1,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":1,"yes":6},{"depth":null,"leaf":0.410982668,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":1,"yes":8},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-0.211034521,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":2,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":4},{"depth":null,"leaf":-0.218530372,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":2,"yes":6},{"depth":null,"leaf":0.0719999969,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":8},{"depth":null,"leaf":0.128571421,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":0.422068983,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":3,"yes":2},{"depth":null,"leaf":0.292982191,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":null,"leaf":-0.195790753,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":4,"yes":2},{"depth":null,"leaf":-0.18925412,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":4,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":4,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":4,"yes":10},{"depth":null,"leaf":0.110490814,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":0.295589149,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.0065466417,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":4,"yes":8},{"depth":null,"leaf":-0.00258299569,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.187741965,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":5,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":5,"yes":4},{"depth":null,"leaf":-0.195117101,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.00513018994,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":5,"yes":6},{"depth":null,"leaf":0.0662105083,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.283106089,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":6,"yes":2},{"depth":null,"leaf":0.234668195,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":null,"leaf":-0.18040958,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":7,"yes":2},{"depth":null,"leaf":-0.173018426,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":7,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":7,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":7,"yes":10},{"depth":null,"leaf":0.0843105838,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":0.236887291,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.0104054213,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":7,"yes":8},{"depth":null,"leaf":0.0072258329,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.171714455,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":8,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":4},{"depth":null,"leaf":-0.179455951,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.0102903834,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":8,"yes":6},{"depth":null,"leaf":0.0586014725,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":8},{"depth":null,"leaf":0.068535842,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.2342868,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":9,"yes":2},{"depth":null,"leaf":0.202173784,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":null,"leaf":-0.169466257,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":10,"yes":2},{"depth":null,"leaf":-0.160806924,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.60000002,"tree_id":10,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":10,"yes":6},{"depth":null,"leaf":0.203813776,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.046239242,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":5.0999999,"tree_id":10,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":10,"yes":10},{"depth":null,"leaf":-0.145340025,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.123540193,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":-0.160442933,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":11,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":11,"yes":4},{"depth":null,"leaf":-0.168171152,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.0149572417,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":11,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":11,"yes":8},{"depth":null,"leaf":0.195176765,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":-0.0395982973,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.204244092,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":12,"yes":2},{"depth":null,"leaf":0.181544691,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":null,"leaf":-0.161027163,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":13,"yes":2},{"depth":null,"leaf":-0.150903225,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":13,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":13,"yes":6},{"depth":null,"leaf":0.18685849,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":13,"yes":8},{"depth":null,"leaf":-0.13117227,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":0.077316612,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":-0.15599905,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":14,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":14,"yes":4},{"depth":null,"leaf":-0.159298271,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.0134122102,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":14,"yes":6},{"depth":null,"leaf":0.0381595641,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":14,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":7,"split":"petal width","split_condition":2,"tree_id":14,"yes":10},{"depth":null,"leaf":-0.00389169785,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.101416349,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.186925322,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":15,"yes":2},{"depth":null,"leaf":0.16711998,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":null,"leaf":-0.154198557,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":16,"yes":2},{"depth":null,"leaf":-0.142255381,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":16,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":16,"yes":6},{"depth":null,"leaf":0.172067791,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":16,"yes":8},{"depth":null,"leaf":-0.121421516,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":0.073711507,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":-0.148049027,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":17,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":17,"yes":4},{"depth":null,"leaf":-0.151937172,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.0142573239,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":17,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":17,"yes":8},{"depth":null,"leaf":0.153471231,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":-0.0392971113,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.168022811,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":18,"yes":2},{"depth":null,"leaf":0.156131104,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":null,"leaf":-0.148197949,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":19,"yes":2},{"depth":null,"leaf":-0.134196311,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":19,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":19,"yes":6},{"depth":null,"leaf":0.160865128,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":19,"yes":8},{"depth":null,"leaf":-0.110056646,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":0.0594659112,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":-0.139969245,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":20,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":20,"yes":4},{"depth":null,"leaf":-0.145403519,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.0147723975,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"sepal width","split_condition":3.20000005,"tree_id":20,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"petal width","split_condition":1.79999995,"tree_id":20,"yes":8},{"depth":null,"leaf":0.0483957976,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.162800461,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":2,"leaf":null,"missing":10,"no":11,"nodeid":7,"parentid":3,"split":"petal length","split_condition":5.19999981,"tree_id":20,"yes":10},{"depth":null,"leaf":-0.0793080404,"missing":null,"no":null,"nodeid":10,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.112726398,"missing":null,"no":null,"nodeid":11,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":21,"yes":2},{"depth":null,"leaf":0.14705947,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":null,"leaf":-0.142660394,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":22,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":22,"yes":4},{"depth":null,"leaf":-0.12631698,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":22,"yes":6},{"depth":null,"leaf":0.151711732,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":22,"yes":8},{"depth":null,"leaf":-0.101206295,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":0.0569678135,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":-0.132955521,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":23,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":23,"yes":4},{"depth":null,"leaf":-0.1391913,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.0150168026,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":23,"yes":6},{"depth":null,"leaf":0.014580613,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":23,"yes":8},{"depth":null,"leaf":0.0168433767,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.154607058,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":24,"yes":2},{"depth":null,"leaf":0.139016181,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":null,"leaf":-0.13727048,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":25,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":25,"yes":4},{"depth":null,"leaf":-0.118402772,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.79999995,"tree_id":25,"yes":6},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":5,"split":"sepal length","split_condition":5.19999981,"tree_id":25,"yes":8},{"depth":null,"leaf":0.0103592547,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":0.152987525,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.0338534117,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.126058802,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":26,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":26,"yes":4},{"depth":null,"leaf":-0.137931168,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":26,"yes":6},{"depth":null,"leaf":0.116194524,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":-0.0252925735,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":0.148122758,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":27,"yes":2},{"depth":null,"leaf":0.131407082,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":null,"leaf":-0.131564274,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":28,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":28,"yes":4},{"depth":null,"leaf":-0.110398278,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":28,"yes":6},{"depth":null,"leaf":0.135915175,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal length","split_condition":6,"tree_id":28,"yes":8},{"depth":null,"leaf":0.01785478,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.0288929809,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.117059968,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":29,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":29,"yes":4},{"depth":null,"leaf":-0.131456167,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":29,"yes":6},{"depth":null,"leaf":0.108389735,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":-0.0236288365,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":0.138706177,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":29,"yes":null}]},{"name":"treeCalcs","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["y","x","depth","children"],"method":"tidy","separation":{"signal":"false"},"type":"tree"}]},{"name":"treeChildren","source":"treeCalcs","transform":[{"as":["childrenObjects"],"fields":["parentid"],"groupby":["parentid"],"ops":["values"],"type":"aggregate"},{"as":"childrenIds","expr":"pluck(datum.childrenObjects,'nodeid')","type":"formula"}]},{"name":"treeAncestors","source":"treeCalcs","transform":[{"as":"treeAncestors","expr":"treeAncestors('treeCalcs', datum.nodeid, 'root')","type":"formula"},{"fields":["treeAncestors"],"type":"flatten"},{"as":"allParents","expr":"datum.treeAncestors.parentid","type":"formula"}]},{"name":"treeChildrenAll","source":"treeAncestors","transform":[{"fields":["allParents","nodeid","name","parentid","x","y","depth","children"],"type":"project"},{"as":["allChildrenObjects","allChildrenCount","id"],"fields":["parentid","parentid","nodeid"],"groupby":["allParents"],"ops":["values","count","min"],"type":"aggregate"},{"as":"allChildrenIds","expr":"pluck(datum.allChildrenObjects,'nodeid')","type":"formula"}]},{"name":"treeClickStoreTemp","source":"treeAncestors","transform":[{"expr":"startingDepth != -1 ? datum.depth <= startingDepth : node != 0 && !isExpanded ? datum.parentid == node: node != 0 && isExpanded ? datum.allParents == node : false","type":"filter"},{"fields":["nodeid","parentid","x","y","depth","children"],"type":"project"},{"fields":["nodeid"],"groupby":["nodeid","parentid","x","y","depth","children"],"ops":["min"],"type":"aggregate"}]},{"name":"treeClickStorePerm","on":[{"insert":"data('treeClickStoreTemp')","trigger":"startingDepth >= 0"},{"insert":"!isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"},{"remove":"isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"}],"values":[]},{"name":"treeLayout","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid)","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["y","x","depth","children"],"method":"tidy","nodeSize":[{"signal":"nodeWidth + spaceBetweenNodes"},{"signal":"nodeHeight+ spaceBetweenLevels"}],"separation":{"signal":"false"},"type":"tree"},{"as":"y","expr":"1*(datum.y+(height/10))","type":"formula"},{"as":"x","expr":"-1*(datum.x+(width/2))","type":"formula"},{"field":"x","signal":"x_extent","type":"extent"},{"field":"y","signal":"y_extent","type":"extent"},{"as":"xscaled","expr":"scale('xscale',datum.x)","type":"formula"},{"as":"parent","expr":"datum.parentid","type":"formula"}]},{"name":"fullTreeLayout","source":"treeLayout","transform":[{"fields":["nodeid"],"from":"treeChildren","key":"parentid","type":"lookup","values":["childrenObjects","childrenIds"]},{"fields":["nodeid"],"from":"treeChildrenAll","key":"allParents","type":"lookup","values":["allChildrenIds","allChildrenObjects"]},{"fields":["nodeid"],"from":"treeCalcs","key":"nodeid","type":"lookup","values":["children"]},{"as":"treeParent","expr":"reverse(pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid'))[1]","type":"formula"},{"as":"isLeaf","expr":"datum.leaf == null","type":"formula"}]},{"name":"splitNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && datum.isLeaf","type":"filter"}]},{"name":"leafNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && !datum.isLeaf","type":"filter"}]},{"name":"links","source":"treeLayout","transform":[{"type":"treelinks"},{"orient":"horizontal","shape":"line","sourceX":{"expr":"scale('xscale', datum.source.x) - scaledNodeWidth/2"},"sourceY":{"expr":"scale('yscale', datum.source.y) - scaledNodeHeight/2"},"targetX":{"expr":"scale('xscale', datum.target.x) + scaledNodeWidth/2"},"targetY":{"expr":"scale('yscale', datum.target.y) - scaledNodeHeight/2"},"type":"linkpath"},{"expr":" indata('treeClickStorePerm', 'nodeid', datum.target.nodeid)","type":"filter"}]},{"name":"yesPaths","source":"links","transform":[{"expr":"datum.source.yes === datum.target.nodeid ","type":"filter"}]},{"name":"noPaths","source":"links","transform":[{"expr":"datum.source.yes !== datum.target.nodeid ","type":"filter"}]}],"height":400,"marks":[{"encode":{"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"update":{"path":{"field":"path"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"}}},"from":{"data":"yesPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"path":{"field":"path"},"stroke":{"value":"#f8f8f2"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"},"strokewidth":{"value":1}}},"from":{"data":"noPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#50fa7b"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"yes"},"x":{"signal":"(scale('xscale', datum.source.x+nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y-nodeWidth/3) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"yesPaths"},"type":"text"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#ff5555"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"no"},"x":{"signal":"(scale('xscale', datum.source.x+nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"noPaths"},"type":"text"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#ff79c6"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"splitNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"bold"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"parent.split + ' <= ' + format(parent.split_condition, '.2f')"},"x":{"signal":"(scaledNodeWidth / 2)"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"},{"encode":{"update":{"align":{"value":"right"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"text":{"signal":"parent.children"},"x":{"signal":"item.mark.group.width - (9/ span(xdom))*width"},"y":{"signal":"item.mark.group.height/2"}}},"interactive":false,"type":"text"}],"name":"splitNode","type":"group"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#44475a"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#ff79c6"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"leafNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"normal"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"'leaf = ' + format(parent.leaf, '.2f')"},"x":{"signal":"scaledNodeWidth / 2"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"}],"name":"leafNode","type":"group"}],"padding":50,"scales":[{"domain":{"signal":"xdom"},"name":"xscale","range":{"signal":"xrange"},"zero":false},{"domain":{"signal":"ydom"},"name":"yscale","range":{"signal":"yrange"},"zero":false}],"signals":[{"name":"selectedTree","value":4},{"name":"node","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.nodeid"}],"value":0},{"name":"nodeHighlight","on":[{"events":[{"markname":"splitNode","type":"mouseover"},{"markname":"leafNode","type":"mouseover"}],"update":"pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid')"},{"events":{"type":"mouseout"},"update":"[0]"}],"value":"[0]"},{"name":"isExpanded","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.children > 0 && indata('treeClickStorePerm', 'nodeid', datum.childrenIds[0]) ? true : false"}],"value":0},{"name":"xrange","update":"[0, width]"},{"name":"yrange","update":"[0, height]"},{"name":"down","on":[{"events":"mousedown","update":"xy()"}],"value":null},{"name":"xcur","on":[{"events":"mousedown","update":"slice(xdom)"}],"value":null},{"name":"ycur","on":[{"events":"mousedown","update":"slice(ydom)"}],"value":null},{"name":"delta","on":[{"events":[{"between":[{"type":"mousedown"},{"source":"window","type":"mouseup"}],"consume":true,"source":"window","type":"mousemove"}],"update":"down ? [down[0]-x(), down[1]-y()] : [0,0]"}],"value":[0,0]},{"name":"anchor","on":[{"events":"wheel","update":"[invert('xscale', x()), invert('yscale', y())]"}],"value":[0,0]},{"name":"xext","update":"[0,width]"},{"name":"yext","update":"[0,height]"},{"name":"zoom","on":[{"events":"wheel!","force":true,"update":"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}],"value":1},{"name":"xdom","on":[{"events":{"signal":"delta"},"update":"[xcur[0] + span(xcur) * delta[0] / width, xcur[1] + span(xcur) * delta[0] / width]"},{"events":{"signal":"zoom"},"update":"[anchor[0] + (xdom[0] - anchor[0]) * zoom, anchor[0] + (xdom[1] - anchor[0]) * zoom]"}],"update":"[x_extent[0] - nodeWidth/ 2, x_extent[1] + nodeWidth / 2]"},{"name":"ydom","on":[{"events":{"signal":"delta"},"update":"[ycur[0] + span(ycur) * delta[1] / height, ycur[1] + span(ycur) * delta[1] / height]"},{"events":{"signal":"zoom"},"update":"[anchor[1] + (ydom[0] - anchor[1]) * zoom, anchor[1] + (ydom[1] - anchor[1]) * zoom]"}],"update":"[y_extent[0] - nodeHeight, y_extent[1] + nodeHeight/3]"},{"name":"scaledNodeWidth","update":"(nodeWidth/ span(xdom))*width"},{"name":"scaledNodeHeight","update":"abs(nodeHeight/ span(ydom))*height"},{"name":"scaledLimit","update":"(20/ span(xdom))*width"},{"name":"spaceBetweenLevels","value":100},{"name":"spaceBetweenNodes","value":10},{"name":"nodeWidth","value":100},{"name":"nodeHeight","value":45},{"name":"startingDepth","on":[{"events":{"throttle":0,"type":"timer"},"update":"-1"}],"value":3}],"width":600}

Or specify padding for each side:

EXGBoost.plot_tree(booster,
  rankdir: :lr,
  index: 4,
  depth: 3,
  padding: [top: 5, bottom: 25, left: 50, right: 10]
)
{"$schema":"https://vega.github.io/schema/vega/v5.json","autosize":"fit","background":"#282a36","data":[{"name":"tree","values":[{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":0,"yes":2},{"depth":null,"leaf":0.425454557,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":null,"leaf":-0.218918934,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":1,"yes":2},{"depth":null,"leaf":-0.212727293,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":1,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":1,"yes":6},{"depth":null,"leaf":0.410982668,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":1,"yes":8},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-0.211034521,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":2,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":4},{"depth":null,"leaf":-0.218530372,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":2,"yes":6},{"depth":null,"leaf":0.0719999969,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":8},{"depth":null,"leaf":0.128571421,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":0.422068983,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":3,"yes":2},{"depth":null,"leaf":0.292982191,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":null,"leaf":-0.195790753,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":4,"yes":2},{"depth":null,"leaf":-0.18925412,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":4,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":4,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":4,"yes":10},{"depth":null,"leaf":0.110490814,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":0.295589149,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.0065466417,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":4,"yes":8},{"depth":null,"leaf":-0.00258299569,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.187741965,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":5,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":5,"yes":4},{"depth":null,"leaf":-0.195117101,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.00513018994,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":5,"yes":6},{"depth":null,"leaf":0.0662105083,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.283106089,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":6,"yes":2},{"depth":null,"leaf":0.234668195,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":null,"leaf":-0.18040958,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":7,"yes":2},{"depth":null,"leaf":-0.173018426,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":7,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":7,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":7,"yes":10},{"depth":null,"leaf":0.0843105838,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":0.236887291,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.0104054213,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":7,"yes":8},{"depth":null,"leaf":0.0072258329,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.171714455,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":8,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":4},{"depth":null,"leaf":-0.179455951,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.0102903834,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":8,"yes":6},{"depth":null,"leaf":0.0586014725,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":8},{"depth":null,"leaf":0.068535842,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.2342868,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":9,"yes":2},{"depth":null,"leaf":0.202173784,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":null,"leaf":-0.169466257,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":10,"yes":2},{"depth":null,"leaf":-0.160806924,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.60000002,"tree_id":10,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":10,"yes":6},{"depth":null,"leaf":0.203813776,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.046239242,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":5.0999999,"tree_id":10,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":10,"yes":10},{"depth":null,"leaf":-0.145340025,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.123540193,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":-0.160442933,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":11,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":11,"yes":4},{"depth":null,"leaf":-0.168171152,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.0149572417,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":11,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":11,"yes":8},{"depth":null,"leaf":0.195176765,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":-0.0395982973,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.204244092,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":12,"yes":2},{"depth":null,"leaf":0.181544691,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":null,"leaf":-0.161027163,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":13,"yes":2},{"depth":null,"leaf":-0.150903225,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":13,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":13,"yes":6},{"depth":null,"leaf":0.18685849,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":13,"yes":8},{"depth":null,"leaf":-0.13117227,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":0.077316612,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":-0.15599905,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":14,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":14,"yes":4},{"depth":null,"leaf":-0.159298271,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.0134122102,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":14,"yes":6},{"depth":null,"leaf":0.0381595641,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":14,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":7,"split":"petal width","split_condition":2,"tree_id":14,"yes":10},{"depth":null,"leaf":-0.00389169785,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.101416349,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.186925322,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":15,"yes":2},{"depth":null,"leaf":0.16711998,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":null,"leaf":-0.154198557,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":16,"yes":2},{"depth":null,"leaf":-0.142255381,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":16,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":16,"yes":6},{"depth":null,"leaf":0.172067791,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":16,"yes":8},{"depth":null,"leaf":-0.121421516,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":0.073711507,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":-0.148049027,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":17,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":17,"yes":4},{"depth":null,"leaf":-0.151937172,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.0142573239,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":17,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":17,"yes":8},{"depth":null,"leaf":0.153471231,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":-0.0392971113,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.168022811,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":18,"yes":2},{"depth":null,"leaf":0.156131104,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":null,"leaf":-0.148197949,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":19,"yes":2},{"depth":null,"leaf":-0.134196311,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":19,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":19,"yes":6},{"depth":null,"leaf":0.160865128,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":19,"yes":8},{"depth":null,"leaf":-0.110056646,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":0.0594659112,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":-0.139969245,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":20,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":20,"yes":4},{"depth":null,"leaf":-0.145403519,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.0147723975,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"sepal width","split_condition":3.20000005,"tree_id":20,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"petal width","split_condition":1.79999995,"tree_id":20,"yes":8},{"depth":null,"leaf":0.0483957976,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.162800461,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":2,"leaf":null,"missing":10,"no":11,"nodeid":7,"parentid":3,"split":"petal length","split_condition":5.19999981,"tree_id":20,"yes":10},{"depth":null,"leaf":-0.0793080404,"missing":null,"no":null,"nodeid":10,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.112726398,"missing":null,"no":null,"nodeid":11,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":21,"yes":2},{"depth":null,"leaf":0.14705947,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":null,"leaf":-0.142660394,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":22,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":22,"yes":4},{"depth":null,"leaf":-0.12631698,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":22,"yes":6},{"depth":null,"leaf":0.151711732,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":22,"yes":8},{"depth":null,"leaf":-0.101206295,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":0.0569678135,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":-0.132955521,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":23,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":23,"yes":4},{"depth":null,"leaf":-0.1391913,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.0150168026,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":23,"yes":6},{"depth":null,"leaf":0.014580613,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":23,"yes":8},{"depth":null,"leaf":0.0168433767,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.154607058,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":24,"yes":2},{"depth":null,"leaf":0.139016181,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":null,"leaf":-0.13727048,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":25,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":25,"yes":4},{"depth":null,"leaf":-0.118402772,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.79999995,"tree_id":25,"yes":6},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":5,"split":"sepal length","split_condition":5.19999981,"tree_id":25,"yes":8},{"depth":null,"leaf":0.0103592547,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":0.152987525,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.0338534117,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.126058802,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":26,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":26,"yes":4},{"depth":null,"leaf":-0.137931168,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":26,"yes":6},{"depth":null,"leaf":0.116194524,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":-0.0252925735,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":0.148122758,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":27,"yes":2},{"depth":null,"leaf":0.131407082,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":null,"leaf":-0.131564274,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":28,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":28,"yes":4},{"depth":null,"leaf":-0.110398278,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":28,"yes":6},{"depth":null,"leaf":0.135915175,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal length","split_condition":6,"tree_id":28,"yes":8},{"depth":null,"leaf":0.01785478,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.0288929809,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.117059968,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":29,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":29,"yes":4},{"depth":null,"leaf":-0.131456167,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":29,"yes":6},{"depth":null,"leaf":0.108389735,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":-0.0236288365,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":0.138706177,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":29,"yes":null}]},{"name":"treeCalcs","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["y","x","depth","children"],"method":"tidy","separation":{"signal":"false"},"type":"tree"}]},{"name":"treeChildren","source":"treeCalcs","transform":[{"as":["childrenObjects"],"fields":["parentid"],"groupby":["parentid"],"ops":["values"],"type":"aggregate"},{"as":"childrenIds","expr":"pluck(datum.childrenObjects,'nodeid')","type":"formula"}]},{"name":"treeAncestors","source":"treeCalcs","transform":[{"as":"treeAncestors","expr":"treeAncestors('treeCalcs', datum.nodeid, 'root')","type":"formula"},{"fields":["treeAncestors"],"type":"flatten"},{"as":"allParents","expr":"datum.treeAncestors.parentid","type":"formula"}]},{"name":"treeChildrenAll","source":"treeAncestors","transform":[{"fields":["allParents","nodeid","name","parentid","x","y","depth","children"],"type":"project"},{"as":["allChildrenObjects","allChildrenCount","id"],"fields":["parentid","parentid","nodeid"],"groupby":["allParents"],"ops":["values","count","min"],"type":"aggregate"},{"as":"allChildrenIds","expr":"pluck(datum.allChildrenObjects,'nodeid')","type":"formula"}]},{"name":"treeClickStoreTemp","source":"treeAncestors","transform":[{"expr":"startingDepth != -1 ? datum.depth <= startingDepth : node != 0 && !isExpanded ? datum.parentid == node: node != 0 && isExpanded ? datum.allParents == node : false","type":"filter"},{"fields":["nodeid","parentid","x","y","depth","children"],"type":"project"},{"fields":["nodeid"],"groupby":["nodeid","parentid","x","y","depth","children"],"ops":["min"],"type":"aggregate"}]},{"name":"treeClickStorePerm","on":[{"insert":"data('treeClickStoreTemp')","trigger":"startingDepth >= 0"},{"insert":"!isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"},{"remove":"isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"}],"values":[]},{"name":"treeLayout","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid)","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["y","x","depth","children"],"method":"tidy","nodeSize":[{"signal":"nodeWidth + spaceBetweenNodes"},{"signal":"nodeHeight+ spaceBetweenLevels"}],"separation":{"signal":"false"},"type":"tree"},{"as":"y","expr":"1*(datum.y+(height/10))","type":"formula"},{"as":"x","expr":"1*(datum.x+(width/2))","type":"formula"},{"field":"x","signal":"x_extent","type":"extent"},{"field":"y","signal":"y_extent","type":"extent"},{"as":"xscaled","expr":"scale('xscale',datum.x)","type":"formula"},{"as":"parent","expr":"datum.parentid","type":"formula"}]},{"name":"fullTreeLayout","source":"treeLayout","transform":[{"fields":["nodeid"],"from":"treeChildren","key":"parentid","type":"lookup","values":["childrenObjects","childrenIds"]},{"fields":["nodeid"],"from":"treeChildrenAll","key":"allParents","type":"lookup","values":["allChildrenIds","allChildrenObjects"]},{"fields":["nodeid"],"from":"treeCalcs","key":"nodeid","type":"lookup","values":["children"]},{"as":"treeParent","expr":"reverse(pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid'))[1]","type":"formula"},{"as":"isLeaf","expr":"datum.leaf == null","type":"formula"}]},{"name":"splitNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && datum.isLeaf","type":"filter"}]},{"name":"leafNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && !datum.isLeaf","type":"filter"}]},{"name":"links","source":"treeLayout","transform":[{"type":"treelinks"},{"orient":"horizontal","shape":"line","sourceX":{"expr":"scale('xscale', datum.source.x) + scaledNodeWidth/2"},"sourceY":{"expr":"scale('yscale', datum.source.y) - scaledNodeHeight/2"},"targetX":{"expr":"scale('xscale', datum.target.x) - scaledNodeWidth/2"},"targetY":{"expr":"scale('yscale', datum.target.y) - scaledNodeHeight/2"},"type":"linkpath"},{"expr":" indata('treeClickStorePerm', 'nodeid', datum.target.nodeid)","type":"filter"}]},{"name":"yesPaths","source":"links","transform":[{"expr":"datum.source.yes === datum.target.nodeid ","type":"filter"}]},{"name":"noPaths","source":"links","transform":[{"expr":"datum.source.yes !== datum.target.nodeid ","type":"filter"}]}],"height":400,"marks":[{"encode":{"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"update":{"path":{"field":"path"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"}}},"from":{"data":"yesPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"path":{"field":"path"},"stroke":{"value":"#f8f8f2"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"},"strokewidth":{"value":1}}},"from":{"data":"noPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#50fa7b"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"yes"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y-nodeWidth/3) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"yesPaths"},"type":"text"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#ff5555"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"no"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"noPaths"},"type":"text"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#ff79c6"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"splitNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"bold"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"parent.split + ' <= ' + format(parent.split_condition, '.2f')"},"x":{"signal":"(scaledNodeWidth / 2)"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"},{"encode":{"update":{"align":{"value":"right"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"text":{"signal":"parent.children"},"x":{"signal":"item.mark.group.width - (9/ span(xdom))*width"},"y":{"signal":"item.mark.group.height/2"}}},"interactive":false,"type":"text"}],"name":"splitNode","type":"group"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#44475a"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#ff79c6"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"leafNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"normal"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"'leaf = ' + format(parent.leaf, '.2f')"},"x":{"signal":"scaledNodeWidth / 2"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"}],"name":"leafNode","type":"group"}],"padding":{"bottom":25,"left":50,"right":10,"top":5},"scales":[{"domain":{"signal":"xdom"},"name":"xscale","range":{"signal":"xrange"},"zero":false},{"domain":{"signal":"ydom"},"name":"yscale","range":{"signal":"yrange"},"zero":false}],"signals":[{"name":"selectedTree","value":4},{"name":"node","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.nodeid"}],"value":0},{"name":"nodeHighlight","on":[{"events":[{"markname":"splitNode","type":"mouseover"},{"markname":"leafNode","type":"mouseover"}],"update":"pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid')"},{"events":{"type":"mouseout"},"update":"[0]"}],"value":"[0]"},{"name":"isExpanded","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.children > 0 && indata('treeClickStorePerm', 'nodeid', datum.childrenIds[0]) ? true : false"}],"value":0},{"name":"xrange","update":"[0, width]"},{"name":"yrange","update":"[0, height]"},{"name":"down","on":[{"events":"mousedown","update":"xy()"}],"value":null},{"name":"xcur","on":[{"events":"mousedown","update":"slice(xdom)"}],"value":null},{"name":"ycur","on":[{"events":"mousedown","update":"slice(ydom)"}],"value":null},{"name":"delta","on":[{"events":[{"between":[{"type":"mousedown"},{"source":"window","type":"mouseup"}],"consume":true,"source":"window","type":"mousemove"}],"update":"down ? [down[0]-x(), down[1]-y()] : [0,0]"}],"value":[0,0]},{"name":"anchor","on":[{"events":"wheel","update":"[invert('xscale', x()), invert('yscale', y())]"}],"value":[0,0]},{"name":"xext","update":"[0,width]"},{"name":"yext","update":"[0,height]"},{"name":"zoom","on":[{"events":"wheel!","force":true,"update":"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}],"value":1},{"name":"xdom","on":[{"events":{"signal":"delta"},"update":"[xcur[0] + span(xcur) * delta[0] / width, xcur[1] + span(xcur) * delta[0] / width]"},{"events":{"signal":"zoom"},"update":"[anchor[0] + (xdom[0] - anchor[0]) * zoom, anchor[0] + (xdom[1] - anchor[0]) * zoom]"}],"update":"[x_extent[0] - nodeWidth/ 2, x_extent[1] + nodeWidth / 2]"},{"name":"ydom","on":[{"events":{"signal":"delta"},"update":"[ycur[0] + span(ycur) * delta[1] / height, ycur[1] + span(ycur) * delta[1] / height]"},{"events":{"signal":"zoom"},"update":"[anchor[1] + (ydom[0] - anchor[1]) * zoom, anchor[1] + (ydom[1] - anchor[1]) * zoom]"}],"update":"[y_extent[0] - nodeHeight, y_extent[1] + nodeHeight/3]"},{"name":"scaledNodeWidth","update":"(nodeWidth/ span(xdom))*width"},{"name":"scaledNodeHeight","update":"abs(nodeHeight/ span(ydom))*height"},{"name":"scaledLimit","update":"(20/ span(xdom))*width"},{"name":"spaceBetweenLevels","value":100},{"name":"spaceBetweenNodes","value":10},{"name":"nodeWidth","value":100},{"name":"nodeHeight","value":45},{"name":"startingDepth","on":[{"events":{"throttle":0,"type":"timer"},"update":"-1"}],"value":3}],"width":600}

You can also specify the canvas size using the :width and :height options:

EXGBoost.plot_tree(booster,
  rankdir: :lr,
  index: 4,
  depth: 3,
  width: 500,
  height: 500
)
{"$schema":"https://vega.github.io/schema/vega/v5.json","autosize":"fit","background":"#282a36","data":[{"name":"tree","values":[{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":0,"yes":2},{"depth":null,"leaf":0.425454557,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":null,"leaf":-0.218918934,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":1,"yes":2},{"depth":null,"leaf":-0.212727293,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":1,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":1,"yes":6},{"depth":null,"leaf":0.410982668,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":1,"yes":8},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-0.211034521,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":2,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":4},{"depth":null,"leaf":-0.218530372,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":2,"yes":6},{"depth":null,"leaf":0.0719999969,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":8},{"depth":null,"leaf":0.128571421,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":0.422068983,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":3,"yes":2},{"depth":null,"leaf":0.292982191,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":null,"leaf":-0.195790753,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":4,"yes":2},{"depth":null,"leaf":-0.18925412,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":4,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":4,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":4,"yes":10},{"depth":null,"leaf":0.110490814,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":0.295589149,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.0065466417,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":4,"yes":8},{"depth":null,"leaf":-0.00258299569,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.187741965,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":5,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":5,"yes":4},{"depth":null,"leaf":-0.195117101,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.00513018994,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":5,"yes":6},{"depth":null,"leaf":0.0662105083,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.283106089,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":6,"yes":2},{"depth":null,"leaf":0.234668195,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":null,"leaf":-0.18040958,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":7,"yes":2},{"depth":null,"leaf":-0.173018426,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":7,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":7,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":7,"yes":10},{"depth":null,"leaf":0.0843105838,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":0.236887291,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.0104054213,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":7,"yes":8},{"depth":null,"leaf":0.0072258329,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.171714455,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":8,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":4},{"depth":null,"leaf":-0.179455951,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.0102903834,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":8,"yes":6},{"depth":null,"leaf":0.0586014725,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":8},{"depth":null,"leaf":0.068535842,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.2342868,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":9,"yes":2},{"depth":null,"leaf":0.202173784,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":null,"leaf":-0.169466257,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":10,"yes":2},{"depth":null,"leaf":-0.160806924,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.60000002,"tree_id":10,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":10,"yes":6},{"depth":null,"leaf":0.203813776,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.046239242,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":5.0999999,"tree_id":10,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":10,"yes":10},{"depth":null,"leaf":-0.145340025,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.123540193,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":-0.160442933,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":11,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":11,"yes":4},{"depth":null,"leaf":-0.168171152,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.0149572417,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":11,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":11,"yes":8},{"depth":null,"leaf":0.195176765,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":-0.0395982973,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.204244092,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":12,"yes":2},{"depth":null,"leaf":0.181544691,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":null,"leaf":-0.161027163,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":13,"yes":2},{"depth":null,"leaf":-0.150903225,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":13,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":13,"yes":6},{"depth":null,"leaf":0.18685849,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":13,"yes":8},{"depth":null,"leaf":-0.13117227,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":0.077316612,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":-0.15599905,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":14,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":14,"yes":4},{"depth":null,"leaf":-0.159298271,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.0134122102,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":14,"yes":6},{"depth":null,"leaf":0.0381595641,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":14,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":7,"split":"petal width","split_condition":2,"tree_id":14,"yes":10},{"depth":null,"leaf":-0.00389169785,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.101416349,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.186925322,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":15,"yes":2},{"depth":null,"leaf":0.16711998,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":null,"leaf":-0.154198557,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":16,"yes":2},{"depth":null,"leaf":-0.142255381,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":16,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":16,"yes":6},{"depth":null,"leaf":0.172067791,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":16,"yes":8},{"depth":null,"leaf":-0.121421516,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":0.073711507,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":-0.148049027,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":17,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":17,"yes":4},{"depth":null,"leaf":-0.151937172,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.0142573239,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":17,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":17,"yes":8},{"depth":null,"leaf":0.153471231,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":-0.0392971113,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.168022811,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":18,"yes":2},{"depth":null,"leaf":0.156131104,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":null,"leaf":-0.148197949,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":19,"yes":2},{"depth":null,"leaf":-0.134196311,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":19,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":19,"yes":6},{"depth":null,"leaf":0.160865128,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":19,"yes":8},{"depth":null,"leaf":-0.110056646,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":0.0594659112,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":-0.139969245,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":20,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":20,"yes":4},{"depth":null,"leaf":-0.145403519,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.0147723975,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"sepal width","split_condition":3.20000005,"tree_id":20,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"petal width","split_condition":1.79999995,"tree_id":20,"yes":8},{"depth":null,"leaf":0.0483957976,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.162800461,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":2,"leaf":null,"missing":10,"no":11,"nodeid":7,"parentid":3,"split":"petal length","split_condition":5.19999981,"tree_id":20,"yes":10},{"depth":null,"leaf":-0.0793080404,"missing":null,"no":null,"nodeid":10,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.112726398,"missing":null,"no":null,"nodeid":11,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":21,"yes":2},{"depth":null,"leaf":0.14705947,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":null,"leaf":-0.142660394,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":22,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":22,"yes":4},{"depth":null,"leaf":-0.12631698,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":22,"yes":6},{"depth":null,"leaf":0.151711732,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":22,"yes":8},{"depth":null,"leaf":-0.101206295,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":0.0569678135,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":-0.132955521,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":23,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":23,"yes":4},{"depth":null,"leaf":-0.1391913,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.0150168026,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":23,"yes":6},{"depth":null,"leaf":0.014580613,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":23,"yes":8},{"depth":null,"leaf":0.0168433767,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.154607058,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":24,"yes":2},{"depth":null,"leaf":0.139016181,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":null,"leaf":-0.13727048,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":25,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":25,"yes":4},{"depth":null,"leaf":-0.118402772,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.79999995,"tree_id":25,"yes":6},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":5,"split":"sepal length","split_condition":5.19999981,"tree_id":25,"yes":8},{"depth":null,"leaf":0.0103592547,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":0.152987525,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.0338534117,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.126058802,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":26,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":26,"yes":4},{"depth":null,"leaf":-0.137931168,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":26,"yes":6},{"depth":null,"leaf":0.116194524,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":-0.0252925735,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":0.148122758,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":27,"yes":2},{"depth":null,"leaf":0.131407082,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":null,"leaf":-0.131564274,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":28,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":28,"yes":4},{"depth":null,"leaf":-0.110398278,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":28,"yes":6},{"depth":null,"leaf":0.135915175,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal length","split_condition":6,"tree_id":28,"yes":8},{"depth":null,"leaf":0.01785478,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.0288929809,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.117059968,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":29,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":29,"yes":4},{"depth":null,"leaf":-0.131456167,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":29,"yes":6},{"depth":null,"leaf":0.108389735,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":-0.0236288365,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":0.138706177,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":29,"yes":null}]},{"name":"treeCalcs","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["y","x","depth","children"],"method":"tidy","separation":{"signal":"false"},"type":"tree"}]},{"name":"treeChildren","source":"treeCalcs","transform":[{"as":["childrenObjects"],"fields":["parentid"],"groupby":["parentid"],"ops":["values"],"type":"aggregate"},{"as":"childrenIds","expr":"pluck(datum.childrenObjects,'nodeid')","type":"formula"}]},{"name":"treeAncestors","source":"treeCalcs","transform":[{"as":"treeAncestors","expr":"treeAncestors('treeCalcs', datum.nodeid, 'root')","type":"formula"},{"fields":["treeAncestors"],"type":"flatten"},{"as":"allParents","expr":"datum.treeAncestors.parentid","type":"formula"}]},{"name":"treeChildrenAll","source":"treeAncestors","transform":[{"fields":["allParents","nodeid","name","parentid","x","y","depth","children"],"type":"project"},{"as":["allChildrenObjects","allChildrenCount","id"],"fields":["parentid","parentid","nodeid"],"groupby":["allParents"],"ops":["values","count","min"],"type":"aggregate"},{"as":"allChildrenIds","expr":"pluck(datum.allChildrenObjects,'nodeid')","type":"formula"}]},{"name":"treeClickStoreTemp","source":"treeAncestors","transform":[{"expr":"startingDepth != -1 ? datum.depth <= startingDepth : node != 0 && !isExpanded ? datum.parentid == node: node != 0 && isExpanded ? datum.allParents == node : false","type":"filter"},{"fields":["nodeid","parentid","x","y","depth","children"],"type":"project"},{"fields":["nodeid"],"groupby":["nodeid","parentid","x","y","depth","children"],"ops":["min"],"type":"aggregate"}]},{"name":"treeClickStorePerm","on":[{"insert":"data('treeClickStoreTemp')","trigger":"startingDepth >= 0"},{"insert":"!isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"},{"remove":"isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"}],"values":[]},{"name":"treeLayout","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid)","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["y","x","depth","children"],"method":"tidy","nodeSize":[{"signal":"nodeWidth + spaceBetweenNodes"},{"signal":"nodeHeight+ spaceBetweenLevels"}],"separation":{"signal":"false"},"type":"tree"},{"as":"y","expr":"1*(datum.y+(height/10))","type":"formula"},{"as":"x","expr":"1*(datum.x+(width/2))","type":"formula"},{"field":"x","signal":"x_extent","type":"extent"},{"field":"y","signal":"y_extent","type":"extent"},{"as":"xscaled","expr":"scale('xscale',datum.x)","type":"formula"},{"as":"parent","expr":"datum.parentid","type":"formula"}]},{"name":"fullTreeLayout","source":"treeLayout","transform":[{"fields":["nodeid"],"from":"treeChildren","key":"parentid","type":"lookup","values":["childrenObjects","childrenIds"]},{"fields":["nodeid"],"from":"treeChildrenAll","key":"allParents","type":"lookup","values":["allChildrenIds","allChildrenObjects"]},{"fields":["nodeid"],"from":"treeCalcs","key":"nodeid","type":"lookup","values":["children"]},{"as":"treeParent","expr":"reverse(pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid'))[1]","type":"formula"},{"as":"isLeaf","expr":"datum.leaf == null","type":"formula"}]},{"name":"splitNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && datum.isLeaf","type":"filter"}]},{"name":"leafNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && !datum.isLeaf","type":"filter"}]},{"name":"links","source":"treeLayout","transform":[{"type":"treelinks"},{"orient":"horizontal","shape":"line","sourceX":{"expr":"scale('xscale', datum.source.x) + scaledNodeWidth/2"},"sourceY":{"expr":"scale('yscale', datum.source.y) - scaledNodeHeight/2"},"targetX":{"expr":"scale('xscale', datum.target.x) - scaledNodeWidth/2"},"targetY":{"expr":"scale('yscale', datum.target.y) - scaledNodeHeight/2"},"type":"linkpath"},{"expr":" indata('treeClickStorePerm', 'nodeid', datum.target.nodeid)","type":"filter"}]},{"name":"yesPaths","source":"links","transform":[{"expr":"datum.source.yes === datum.target.nodeid ","type":"filter"}]},{"name":"noPaths","source":"links","transform":[{"expr":"datum.source.yes !== datum.target.nodeid ","type":"filter"}]}],"height":500,"marks":[{"encode":{"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"update":{"path":{"field":"path"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"}}},"from":{"data":"yesPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"path":{"field":"path"},"stroke":{"value":"#f8f8f2"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"},"strokewidth":{"value":1}}},"from":{"data":"noPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#50fa7b"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"yes"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y-nodeWidth/3) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"yesPaths"},"type":"text"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#ff5555"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"no"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"noPaths"},"type":"text"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#ff79c6"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"splitNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"bold"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"parent.split + ' <= ' + format(parent.split_condition, '.2f')"},"x":{"signal":"(scaledNodeWidth / 2)"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"},{"encode":{"update":{"align":{"value":"right"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"text":{"signal":"parent.children"},"x":{"signal":"item.mark.group.width - (9/ span(xdom))*width"},"y":{"signal":"item.mark.group.height/2"}}},"interactive":false,"type":"text"}],"name":"splitNode","type":"group"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#44475a"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#ff79c6"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"leafNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"normal"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"'leaf = ' + format(parent.leaf, '.2f')"},"x":{"signal":"scaledNodeWidth / 2"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"}],"name":"leafNode","type":"group"}],"padding":30,"scales":[{"domain":{"signal":"xdom"},"name":"xscale","range":{"signal":"xrange"},"zero":false},{"domain":{"signal":"ydom"},"name":"yscale","range":{"signal":"yrange"},"zero":false}],"signals":[{"name":"selectedTree","value":4},{"name":"node","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.nodeid"}],"value":0},{"name":"nodeHighlight","on":[{"events":[{"markname":"splitNode","type":"mouseover"},{"markname":"leafNode","type":"mouseover"}],"update":"pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid')"},{"events":{"type":"mouseout"},"update":"[0]"}],"value":"[0]"},{"name":"isExpanded","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.children > 0 && indata('treeClickStorePerm', 'nodeid', datum.childrenIds[0]) ? true : false"}],"value":0},{"name":"xrange","update":"[0, width]"},{"name":"yrange","update":"[0, height]"},{"name":"down","on":[{"events":"mousedown","update":"xy()"}],"value":null},{"name":"xcur","on":[{"events":"mousedown","update":"slice(xdom)"}],"value":null},{"name":"ycur","on":[{"events":"mousedown","update":"slice(ydom)"}],"value":null},{"name":"delta","on":[{"events":[{"between":[{"type":"mousedown"},{"source":"window","type":"mouseup"}],"consume":true,"source":"window","type":"mousemove"}],"update":"down ? [down[0]-x(), down[1]-y()] : [0,0]"}],"value":[0,0]},{"name":"anchor","on":[{"events":"wheel","update":"[invert('xscale', x()), invert('yscale', y())]"}],"value":[0,0]},{"name":"xext","update":"[0,width]"},{"name":"yext","update":"[0,height]"},{"name":"zoom","on":[{"events":"wheel!","force":true,"update":"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}],"value":1},{"name":"xdom","on":[{"events":{"signal":"delta"},"update":"[xcur[0] + span(xcur) * delta[0] / width, xcur[1] + span(xcur) * delta[0] / width]"},{"events":{"signal":"zoom"},"update":"[anchor[0] + (xdom[0] - anchor[0]) * zoom, anchor[0] + (xdom[1] - anchor[0]) * zoom]"}],"update":"[x_extent[0] - nodeWidth/ 2, x_extent[1] + nodeWidth / 2]"},{"name":"ydom","on":[{"events":{"signal":"delta"},"update":"[ycur[0] + span(ycur) * delta[1] / height, ycur[1] + span(ycur) * delta[1] / height]"},{"events":{"signal":"zoom"},"update":"[anchor[1] + (ydom[0] - anchor[1]) * zoom, anchor[1] + (ydom[1] - anchor[1]) * zoom]"}],"update":"[y_extent[0] - nodeHeight, y_extent[1] + nodeHeight/3]"},{"name":"scaledNodeWidth","update":"(nodeWidth/ span(xdom))*width"},{"name":"scaledNodeHeight","update":"abs(nodeHeight/ span(ydom))*height"},{"name":"scaledLimit","update":"(20/ span(xdom))*width"},{"name":"spaceBetweenLevels","value":100},{"name":"spaceBetweenNodes","value":10},{"name":"nodeWidth","value":100},{"name":"nodeHeight","value":45},{"name":"startingDepth","on":[{"events":{"throttle":0,"type":"timer"},"update":"-1"}],"value":3}],"width":500}

But do note that changing the padding of a canvas does change the size, even if you specify the size using :height and :width

EXGBoost.plot_tree(booster,
  rankdir: :lr,
  index: 4,
  depth: 3,
  width: 500,
  height: 500,
  padding: 10
)
{"$schema":"https://vega.github.io/schema/vega/v5.json","autosize":"fit","background":"#282a36","data":[{"name":"tree","values":[{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":0,"yes":2},{"depth":null,"leaf":0.425454557,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":null,"leaf":-0.218918934,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":1,"yes":2},{"depth":null,"leaf":-0.212727293,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":1,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":1,"yes":6},{"depth":null,"leaf":0.410982668,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":1,"yes":8},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-0.211034521,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":2,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":4},{"depth":null,"leaf":-0.218530372,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":2,"yes":6},{"depth":null,"leaf":0.0719999969,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":8},{"depth":null,"leaf":0.128571421,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":0.422068983,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":3,"yes":2},{"depth":null,"leaf":0.292982191,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":null,"leaf":-0.195790753,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":4,"yes":2},{"depth":null,"leaf":-0.18925412,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":4,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":4,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":4,"yes":10},{"depth":null,"leaf":0.110490814,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":0.295589149,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.0065466417,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":4,"yes":8},{"depth":null,"leaf":-0.00258299569,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.187741965,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":5,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":5,"yes":4},{"depth":null,"leaf":-0.195117101,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.00513018994,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":5,"yes":6},{"depth":null,"leaf":0.0662105083,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.283106089,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":6,"yes":2},{"depth":null,"leaf":0.234668195,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":null,"leaf":-0.18040958,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":7,"yes":2},{"depth":null,"leaf":-0.173018426,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":7,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":7,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":7,"yes":10},{"depth":null,"leaf":0.0843105838,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":0.236887291,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.0104054213,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":7,"yes":8},{"depth":null,"leaf":0.0072258329,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.171714455,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":8,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":4},{"depth":null,"leaf":-0.179455951,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.0102903834,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":8,"yes":6},{"depth":null,"leaf":0.0586014725,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":8},{"depth":null,"leaf":0.068535842,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.2342868,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":9,"yes":2},{"depth":null,"leaf":0.202173784,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":null,"leaf":-0.169466257,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":10,"yes":2},{"depth":null,"leaf":-0.160806924,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.60000002,"tree_id":10,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":10,"yes":6},{"depth":null,"leaf":0.203813776,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.046239242,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":5.0999999,"tree_id":10,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":10,"yes":10},{"depth":null,"leaf":-0.145340025,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.123540193,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":-0.160442933,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":11,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":11,"yes":4},{"depth":null,"leaf":-0.168171152,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.0149572417,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":11,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":11,"yes":8},{"depth":null,"leaf":0.195176765,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":-0.0395982973,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.204244092,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":12,"yes":2},{"depth":null,"leaf":0.181544691,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":null,"leaf":-0.161027163,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":13,"yes":2},{"depth":null,"leaf":-0.150903225,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":13,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":13,"yes":6},{"depth":null,"leaf":0.18685849,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":13,"yes":8},{"depth":null,"leaf":-0.13117227,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":0.077316612,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":-0.15599905,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":14,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":14,"yes":4},{"depth":null,"leaf":-0.159298271,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.0134122102,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":14,"yes":6},{"depth":null,"leaf":0.0381595641,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":14,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":7,"split":"petal width","split_condition":2,"tree_id":14,"yes":10},{"depth":null,"leaf":-0.00389169785,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.101416349,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.186925322,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":15,"yes":2},{"depth":null,"leaf":0.16711998,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":null,"leaf":-0.154198557,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":16,"yes":2},{"depth":null,"leaf":-0.142255381,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":16,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":16,"yes":6},{"depth":null,"leaf":0.172067791,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":16,"yes":8},{"depth":null,"leaf":-0.121421516,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":0.073711507,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":-0.148049027,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":17,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":17,"yes":4},{"depth":null,"leaf":-0.151937172,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.0142573239,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":17,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":17,"yes":8},{"depth":null,"leaf":0.153471231,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":-0.0392971113,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.168022811,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":18,"yes":2},{"depth":null,"leaf":0.156131104,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":null,"leaf":-0.148197949,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":19,"yes":2},{"depth":null,"leaf":-0.134196311,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":19,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":19,"yes":6},{"depth":null,"leaf":0.160865128,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":19,"yes":8},{"depth":null,"leaf":-0.110056646,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":0.0594659112,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":-0.139969245,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":20,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":20,"yes":4},{"depth":null,"leaf":-0.145403519,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.0147723975,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"sepal width","split_condition":3.20000005,"tree_id":20,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"petal width","split_condition":1.79999995,"tree_id":20,"yes":8},{"depth":null,"leaf":0.0483957976,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.162800461,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":2,"leaf":null,"missing":10,"no":11,"nodeid":7,"parentid":3,"split":"petal length","split_condition":5.19999981,"tree_id":20,"yes":10},{"depth":null,"leaf":-0.0793080404,"missing":null,"no":null,"nodeid":10,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.112726398,"missing":null,"no":null,"nodeid":11,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":21,"yes":2},{"depth":null,"leaf":0.14705947,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":null,"leaf":-0.142660394,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":22,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":22,"yes":4},{"depth":null,"leaf":-0.12631698,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":22,"yes":6},{"depth":null,"leaf":0.151711732,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":22,"yes":8},{"depth":null,"leaf":-0.101206295,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":0.0569678135,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":-0.132955521,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":23,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":23,"yes":4},{"depth":null,"leaf":-0.1391913,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.0150168026,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":23,"yes":6},{"depth":null,"leaf":0.014580613,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":23,"yes":8},{"depth":null,"leaf":0.0168433767,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.154607058,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":24,"yes":2},{"depth":null,"leaf":0.139016181,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":null,"leaf":-0.13727048,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":25,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":25,"yes":4},{"depth":null,"leaf":-0.118402772,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.79999995,"tree_id":25,"yes":6},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":5,"split":"sepal length","split_condition":5.19999981,"tree_id":25,"yes":8},{"depth":null,"leaf":0.0103592547,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":0.152987525,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.0338534117,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.126058802,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":26,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":26,"yes":4},{"depth":null,"leaf":-0.137931168,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":26,"yes":6},{"depth":null,"leaf":0.116194524,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":-0.0252925735,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":0.148122758,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":27,"yes":2},{"depth":null,"leaf":0.131407082,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":null,"leaf":-0.131564274,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":28,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":28,"yes":4},{"depth":null,"leaf":-0.110398278,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":28,"yes":6},{"depth":null,"leaf":0.135915175,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal length","split_condition":6,"tree_id":28,"yes":8},{"depth":null,"leaf":0.01785478,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.0288929809,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.117059968,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":29,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":29,"yes":4},{"depth":null,"leaf":-0.131456167,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":29,"yes":6},{"depth":null,"leaf":0.108389735,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":-0.0236288365,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":0.138706177,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":29,"yes":null}]},{"name":"treeCalcs","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["y","x","depth","children"],"method":"tidy","separation":{"signal":"false"},"type":"tree"}]},{"name":"treeChildren","source":"treeCalcs","transform":[{"as":["childrenObjects"],"fields":["parentid"],"groupby":["parentid"],"ops":["values"],"type":"aggregate"},{"as":"childrenIds","expr":"pluck(datum.childrenObjects,'nodeid')","type":"formula"}]},{"name":"treeAncestors","source":"treeCalcs","transform":[{"as":"treeAncestors","expr":"treeAncestors('treeCalcs', datum.nodeid, 'root')","type":"formula"},{"fields":["treeAncestors"],"type":"flatten"},{"as":"allParents","expr":"datum.treeAncestors.parentid","type":"formula"}]},{"name":"treeChildrenAll","source":"treeAncestors","transform":[{"fields":["allParents","nodeid","name","parentid","x","y","depth","children"],"type":"project"},{"as":["allChildrenObjects","allChildrenCount","id"],"fields":["parentid","parentid","nodeid"],"groupby":["allParents"],"ops":["values","count","min"],"type":"aggregate"},{"as":"allChildrenIds","expr":"pluck(datum.allChildrenObjects,'nodeid')","type":"formula"}]},{"name":"treeClickStoreTemp","source":"treeAncestors","transform":[{"expr":"startingDepth != -1 ? datum.depth <= startingDepth : node != 0 && !isExpanded ? datum.parentid == node: node != 0 && isExpanded ? datum.allParents == node : false","type":"filter"},{"fields":["nodeid","parentid","x","y","depth","children"],"type":"project"},{"fields":["nodeid"],"groupby":["nodeid","parentid","x","y","depth","children"],"ops":["min"],"type":"aggregate"}]},{"name":"treeClickStorePerm","on":[{"insert":"data('treeClickStoreTemp')","trigger":"startingDepth >= 0"},{"insert":"!isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"},{"remove":"isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"}],"values":[]},{"name":"treeLayout","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid)","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["y","x","depth","children"],"method":"tidy","nodeSize":[{"signal":"nodeWidth + spaceBetweenNodes"},{"signal":"nodeHeight+ spaceBetweenLevels"}],"separation":{"signal":"false"},"type":"tree"},{"as":"y","expr":"1*(datum.y+(height/10))","type":"formula"},{"as":"x","expr":"1*(datum.x+(width/2))","type":"formula"},{"field":"x","signal":"x_extent","type":"extent"},{"field":"y","signal":"y_extent","type":"extent"},{"as":"xscaled","expr":"scale('xscale',datum.x)","type":"formula"},{"as":"parent","expr":"datum.parentid","type":"formula"}]},{"name":"fullTreeLayout","source":"treeLayout","transform":[{"fields":["nodeid"],"from":"treeChildren","key":"parentid","type":"lookup","values":["childrenObjects","childrenIds"]},{"fields":["nodeid"],"from":"treeChildrenAll","key":"allParents","type":"lookup","values":["allChildrenIds","allChildrenObjects"]},{"fields":["nodeid"],"from":"treeCalcs","key":"nodeid","type":"lookup","values":["children"]},{"as":"treeParent","expr":"reverse(pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid'))[1]","type":"formula"},{"as":"isLeaf","expr":"datum.leaf == null","type":"formula"}]},{"name":"splitNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && datum.isLeaf","type":"filter"}]},{"name":"leafNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && !datum.isLeaf","type":"filter"}]},{"name":"links","source":"treeLayout","transform":[{"type":"treelinks"},{"orient":"horizontal","shape":"line","sourceX":{"expr":"scale('xscale', datum.source.x) + scaledNodeWidth/2"},"sourceY":{"expr":"scale('yscale', datum.source.y) - scaledNodeHeight/2"},"targetX":{"expr":"scale('xscale', datum.target.x) - scaledNodeWidth/2"},"targetY":{"expr":"scale('yscale', datum.target.y) - scaledNodeHeight/2"},"type":"linkpath"},{"expr":" indata('treeClickStorePerm', 'nodeid', datum.target.nodeid)","type":"filter"}]},{"name":"yesPaths","source":"links","transform":[{"expr":"datum.source.yes === datum.target.nodeid ","type":"filter"}]},{"name":"noPaths","source":"links","transform":[{"expr":"datum.source.yes !== datum.target.nodeid ","type":"filter"}]}],"height":500,"marks":[{"encode":{"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"update":{"path":{"field":"path"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"}}},"from":{"data":"yesPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"path":{"field":"path"},"stroke":{"value":"#f8f8f2"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"},"strokewidth":{"value":1}}},"from":{"data":"noPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#50fa7b"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"yes"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y-nodeWidth/3) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"yesPaths"},"type":"text"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#ff5555"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"no"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"noPaths"},"type":"text"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#ff79c6"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"splitNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"bold"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"parent.split + ' <= ' + format(parent.split_condition, '.2f')"},"x":{"signal":"(scaledNodeWidth / 2)"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"},{"encode":{"update":{"align":{"value":"right"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"text":{"signal":"parent.children"},"x":{"signal":"item.mark.group.width - (9/ span(xdom))*width"},"y":{"signal":"item.mark.group.height/2"}}},"interactive":false,"type":"text"}],"name":"splitNode","type":"group"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#44475a"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#ff79c6"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"leafNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"normal"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"'leaf = ' + format(parent.leaf, '.2f')"},"x":{"signal":"scaledNodeWidth / 2"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"}],"name":"leafNode","type":"group"}],"padding":10,"scales":[{"domain":{"signal":"xdom"},"name":"xscale","range":{"signal":"xrange"},"zero":false},{"domain":{"signal":"ydom"},"name":"yscale","range":{"signal":"yrange"},"zero":false}],"signals":[{"name":"selectedTree","value":4},{"name":"node","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.nodeid"}],"value":0},{"name":"nodeHighlight","on":[{"events":[{"markname":"splitNode","type":"mouseover"},{"markname":"leafNode","type":"mouseover"}],"update":"pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid')"},{"events":{"type":"mouseout"},"update":"[0]"}],"value":"[0]"},{"name":"isExpanded","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.children > 0 && indata('treeClickStorePerm', 'nodeid', datum.childrenIds[0]) ? true : false"}],"value":0},{"name":"xrange","update":"[0, width]"},{"name":"yrange","update":"[0, height]"},{"name":"down","on":[{"events":"mousedown","update":"xy()"}],"value":null},{"name":"xcur","on":[{"events":"mousedown","update":"slice(xdom)"}],"value":null},{"name":"ycur","on":[{"events":"mousedown","update":"slice(ydom)"}],"value":null},{"name":"delta","on":[{"events":[{"between":[{"type":"mousedown"},{"source":"window","type":"mouseup"}],"consume":true,"source":"window","type":"mousemove"}],"update":"down ? [down[0]-x(), down[1]-y()] : [0,0]"}],"value":[0,0]},{"name":"anchor","on":[{"events":"wheel","update":"[invert('xscale', x()), invert('yscale', y())]"}],"value":[0,0]},{"name":"xext","update":"[0,width]"},{"name":"yext","update":"[0,height]"},{"name":"zoom","on":[{"events":"wheel!","force":true,"update":"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}],"value":1},{"name":"xdom","on":[{"events":{"signal":"delta"},"update":"[xcur[0] + span(xcur) * delta[0] / width, xcur[1] + span(xcur) * delta[0] / width]"},{"events":{"signal":"zoom"},"update":"[anchor[0] + (xdom[0] - anchor[0]) * zoom, anchor[0] + (xdom[1] - anchor[0]) * zoom]"}],"update":"[x_extent[0] - nodeWidth/ 2, x_extent[1] + nodeWidth / 2]"},{"name":"ydom","on":[{"events":{"signal":"delta"},"update":"[ycur[0] + span(ycur) * delta[1] / height, ycur[1] + span(ycur) * delta[1] / height]"},{"events":{"signal":"zoom"},"update":"[anchor[1] + (ydom[0] - anchor[1]) * zoom, anchor[1] + (ydom[1] - anchor[1]) * zoom]"}],"update":"[y_extent[0] - nodeHeight, y_extent[1] + nodeHeight/3]"},{"name":"scaledNodeWidth","update":"(nodeWidth/ span(xdom))*width"},{"name":"scaledNodeHeight","update":"abs(nodeHeight/ span(ydom))*height"},{"name":"scaledLimit","update":"(20/ span(xdom))*width"},{"name":"spaceBetweenLevels","value":100},{"name":"spaceBetweenNodes","value":10},{"name":"nodeWidth","value":100},{"name":"nodeHeight","value":45},{"name":"startingDepth","on":[{"events":{"throttle":0,"type":"timer"},"update":"-1"}],"value":3}],"width":500}

You can change the dimensions of all nodes through the :node_height and :node_width options:

EXGBoost.plot_tree(booster, rankdir: :lr, index: 4, depth: 3, node_width: 60, node_height: 60)
{"$schema":"https://vega.github.io/schema/vega/v5.json","autosize":"fit","background":"#282a36","data":[{"name":"tree","values":[{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":0,"yes":2},{"depth":null,"leaf":0.425454557,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":null,"leaf":-0.218918934,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":1,"yes":2},{"depth":null,"leaf":-0.212727293,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":1,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":1,"yes":6},{"depth":null,"leaf":0.410982668,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":1,"yes":8},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-0.211034521,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":2,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":4},{"depth":null,"leaf":-0.218530372,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":2,"yes":6},{"depth":null,"leaf":0.0719999969,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":8},{"depth":null,"leaf":0.128571421,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":0.422068983,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":3,"yes":2},{"depth":null,"leaf":0.292982191,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":null,"leaf":-0.195790753,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":4,"yes":2},{"depth":null,"leaf":-0.18925412,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":4,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":4,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":4,"yes":10},{"depth":null,"leaf":0.110490814,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":0.295589149,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.0065466417,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":4,"yes":8},{"depth":null,"leaf":-0.00258299569,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.187741965,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":5,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":5,"yes":4},{"depth":null,"leaf":-0.195117101,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.00513018994,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":5,"yes":6},{"depth":null,"leaf":0.0662105083,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.283106089,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":6,"yes":2},{"depth":null,"leaf":0.234668195,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":null,"leaf":-0.18040958,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":7,"yes":2},{"depth":null,"leaf":-0.173018426,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":7,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":7,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":7,"yes":10},{"depth":null,"leaf":0.0843105838,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":0.236887291,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.0104054213,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":7,"yes":8},{"depth":null,"leaf":0.0072258329,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.171714455,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":8,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":4},{"depth":null,"leaf":-0.179455951,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.0102903834,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":8,"yes":6},{"depth":null,"leaf":0.0586014725,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":8},{"depth":null,"leaf":0.068535842,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.2342868,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":9,"yes":2},{"depth":null,"leaf":0.202173784,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":null,"leaf":-0.169466257,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":10,"yes":2},{"depth":null,"leaf":-0.160806924,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.60000002,"tree_id":10,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":10,"yes":6},{"depth":null,"leaf":0.203813776,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.046239242,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":5.0999999,"tree_id":10,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":10,"yes":10},{"depth":null,"leaf":-0.145340025,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.123540193,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":-0.160442933,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":11,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":11,"yes":4},{"depth":null,"leaf":-0.168171152,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.0149572417,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":11,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":11,"yes":8},{"depth":null,"leaf":0.195176765,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":-0.0395982973,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.204244092,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":12,"yes":2},{"depth":null,"leaf":0.181544691,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":null,"leaf":-0.161027163,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":13,"yes":2},{"depth":null,"leaf":-0.150903225,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":13,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":13,"yes":6},{"depth":null,"leaf":0.18685849,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":13,"yes":8},{"depth":null,"leaf":-0.13117227,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":0.077316612,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":-0.15599905,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":14,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":14,"yes":4},{"depth":null,"leaf":-0.159298271,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.0134122102,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":14,"yes":6},{"depth":null,"leaf":0.0381595641,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":14,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":7,"split":"petal width","split_condition":2,"tree_id":14,"yes":10},{"depth":null,"leaf":-0.00389169785,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.101416349,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.186925322,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":15,"yes":2},{"depth":null,"leaf":0.16711998,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":null,"leaf":-0.154198557,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":16,"yes":2},{"depth":null,"leaf":-0.142255381,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":16,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":16,"yes":6},{"depth":null,"leaf":0.172067791,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":16,"yes":8},{"depth":null,"leaf":-0.121421516,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":0.073711507,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":-0.148049027,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":17,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":17,"yes":4},{"depth":null,"leaf":-0.151937172,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.0142573239,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":17,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":17,"yes":8},{"depth":null,"leaf":0.153471231,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":-0.0392971113,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.168022811,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":18,"yes":2},{"depth":null,"leaf":0.156131104,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":null,"leaf":-0.148197949,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":19,"yes":2},{"depth":null,"leaf":-0.134196311,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":19,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":19,"yes":6},{"depth":null,"leaf":0.160865128,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":19,"yes":8},{"depth":null,"leaf":-0.110056646,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":0.0594659112,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":-0.139969245,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":20,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":20,"yes":4},{"depth":null,"leaf":-0.145403519,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.0147723975,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"sepal width","split_condition":3.20000005,"tree_id":20,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"petal width","split_condition":1.79999995,"tree_id":20,"yes":8},{"depth":null,"leaf":0.0483957976,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.162800461,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":2,"leaf":null,"missing":10,"no":11,"nodeid":7,"parentid":3,"split":"petal length","split_condition":5.19999981,"tree_id":20,"yes":10},{"depth":null,"leaf":-0.0793080404,"missing":null,"no":null,"nodeid":10,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.112726398,"missing":null,"no":null,"nodeid":11,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":21,"yes":2},{"depth":null,"leaf":0.14705947,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":null,"leaf":-0.142660394,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":22,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":22,"yes":4},{"depth":null,"leaf":-0.12631698,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":22,"yes":6},{"depth":null,"leaf":0.151711732,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":22,"yes":8},{"depth":null,"leaf":-0.101206295,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":0.0569678135,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":-0.132955521,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":23,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":23,"yes":4},{"depth":null,"leaf":-0.1391913,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.0150168026,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":23,"yes":6},{"depth":null,"leaf":0.014580613,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":23,"yes":8},{"depth":null,"leaf":0.0168433767,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.154607058,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":24,"yes":2},{"depth":null,"leaf":0.139016181,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":null,"leaf":-0.13727048,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":25,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":25,"yes":4},{"depth":null,"leaf":-0.118402772,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.79999995,"tree_id":25,"yes":6},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":5,"split":"sepal length","split_condition":5.19999981,"tree_id":25,"yes":8},{"depth":null,"leaf":0.0103592547,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":0.152987525,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.0338534117,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.126058802,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":26,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":26,"yes":4},{"depth":null,"leaf":-0.137931168,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":26,"yes":6},{"depth":null,"leaf":0.116194524,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":-0.0252925735,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":0.148122758,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":27,"yes":2},{"depth":null,"leaf":0.131407082,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":null,"leaf":-0.131564274,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":28,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":28,"yes":4},{"depth":null,"leaf":-0.110398278,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":28,"yes":6},{"depth":null,"leaf":0.135915175,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal length","split_condition":6,"tree_id":28,"yes":8},{"depth":null,"leaf":0.01785478,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.0288929809,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.117059968,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":29,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":29,"yes":4},{"depth":null,"leaf":-0.131456167,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":29,"yes":6},{"depth":null,"leaf":0.108389735,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":-0.0236288365,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":0.138706177,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":29,"yes":null}]},{"name":"treeCalcs","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["y","x","depth","children"],"method":"tidy","separation":{"signal":"false"},"type":"tree"}]},{"name":"treeChildren","source":"treeCalcs","transform":[{"as":["childrenObjects"],"fields":["parentid"],"groupby":["parentid"],"ops":["values"],"type":"aggregate"},{"as":"childrenIds","expr":"pluck(datum.childrenObjects,'nodeid')","type":"formula"}]},{"name":"treeAncestors","source":"treeCalcs","transform":[{"as":"treeAncestors","expr":"treeAncestors('treeCalcs', datum.nodeid, 'root')","type":"formula"},{"fields":["treeAncestors"],"type":"flatten"},{"as":"allParents","expr":"datum.treeAncestors.parentid","type":"formula"}]},{"name":"treeChildrenAll","source":"treeAncestors","transform":[{"fields":["allParents","nodeid","name","parentid","x","y","depth","children"],"type":"project"},{"as":["allChildrenObjects","allChildrenCount","id"],"fields":["parentid","parentid","nodeid"],"groupby":["allParents"],"ops":["values","count","min"],"type":"aggregate"},{"as":"allChildrenIds","expr":"pluck(datum.allChildrenObjects,'nodeid')","type":"formula"}]},{"name":"treeClickStoreTemp","source":"treeAncestors","transform":[{"expr":"startingDepth != -1 ? datum.depth <= startingDepth : node != 0 && !isExpanded ? datum.parentid == node: node != 0 && isExpanded ? datum.allParents == node : false","type":"filter"},{"fields":["nodeid","parentid","x","y","depth","children"],"type":"project"},{"fields":["nodeid"],"groupby":["nodeid","parentid","x","y","depth","children"],"ops":["min"],"type":"aggregate"}]},{"name":"treeClickStorePerm","on":[{"insert":"data('treeClickStoreTemp')","trigger":"startingDepth >= 0"},{"insert":"!isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"},{"remove":"isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"}],"values":[]},{"name":"treeLayout","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid)","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["y","x","depth","children"],"method":"tidy","nodeSize":[{"signal":"nodeWidth + spaceBetweenNodes"},{"signal":"nodeHeight+ spaceBetweenLevels"}],"separation":{"signal":"false"},"type":"tree"},{"as":"y","expr":"1*(datum.y+(height/10))","type":"formula"},{"as":"x","expr":"1*(datum.x+(width/2))","type":"formula"},{"field":"x","signal":"x_extent","type":"extent"},{"field":"y","signal":"y_extent","type":"extent"},{"as":"xscaled","expr":"scale('xscale',datum.x)","type":"formula"},{"as":"parent","expr":"datum.parentid","type":"formula"}]},{"name":"fullTreeLayout","source":"treeLayout","transform":[{"fields":["nodeid"],"from":"treeChildren","key":"parentid","type":"lookup","values":["childrenObjects","childrenIds"]},{"fields":["nodeid"],"from":"treeChildrenAll","key":"allParents","type":"lookup","values":["allChildrenIds","allChildrenObjects"]},{"fields":["nodeid"],"from":"treeCalcs","key":"nodeid","type":"lookup","values":["children"]},{"as":"treeParent","expr":"reverse(pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid'))[1]","type":"formula"},{"as":"isLeaf","expr":"datum.leaf == null","type":"formula"}]},{"name":"splitNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && datum.isLeaf","type":"filter"}]},{"name":"leafNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && !datum.isLeaf","type":"filter"}]},{"name":"links","source":"treeLayout","transform":[{"type":"treelinks"},{"orient":"horizontal","shape":"line","sourceX":{"expr":"scale('xscale', datum.source.x) + scaledNodeWidth/2"},"sourceY":{"expr":"scale('yscale', datum.source.y) - scaledNodeHeight/2"},"targetX":{"expr":"scale('xscale', datum.target.x) - scaledNodeWidth/2"},"targetY":{"expr":"scale('yscale', datum.target.y) - scaledNodeHeight/2"},"type":"linkpath"},{"expr":" indata('treeClickStorePerm', 'nodeid', datum.target.nodeid)","type":"filter"}]},{"name":"yesPaths","source":"links","transform":[{"expr":"datum.source.yes === datum.target.nodeid ","type":"filter"}]},{"name":"noPaths","source":"links","transform":[{"expr":"datum.source.yes !== datum.target.nodeid ","type":"filter"}]}],"height":400,"marks":[{"encode":{"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"update":{"path":{"field":"path"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"}}},"from":{"data":"yesPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"path":{"field":"path"},"stroke":{"value":"#f8f8f2"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"},"strokewidth":{"value":1}}},"from":{"data":"noPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#50fa7b"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"yes"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y-nodeWidth/3) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"yesPaths"},"type":"text"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#ff5555"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"no"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"noPaths"},"type":"text"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#ff79c6"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"splitNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"bold"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"parent.split + ' <= ' + format(parent.split_condition, '.2f')"},"x":{"signal":"(scaledNodeWidth / 2)"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"},{"encode":{"update":{"align":{"value":"right"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"text":{"signal":"parent.children"},"x":{"signal":"item.mark.group.width - (9/ span(xdom))*width"},"y":{"signal":"item.mark.group.height/2"}}},"interactive":false,"type":"text"}],"name":"splitNode","type":"group"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#44475a"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#ff79c6"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"leafNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"normal"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"'leaf = ' + format(parent.leaf, '.2f')"},"x":{"signal":"scaledNodeWidth / 2"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"}],"name":"leafNode","type":"group"}],"padding":30,"scales":[{"domain":{"signal":"xdom"},"name":"xscale","range":{"signal":"xrange"},"zero":false},{"domain":{"signal":"ydom"},"name":"yscale","range":{"signal":"yrange"},"zero":false}],"signals":[{"name":"selectedTree","value":4},{"name":"node","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.nodeid"}],"value":0},{"name":"nodeHighlight","on":[{"events":[{"markname":"splitNode","type":"mouseover"},{"markname":"leafNode","type":"mouseover"}],"update":"pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid')"},{"events":{"type":"mouseout"},"update":"[0]"}],"value":"[0]"},{"name":"isExpanded","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.children > 0 && indata('treeClickStorePerm', 'nodeid', datum.childrenIds[0]) ? true : false"}],"value":0},{"name":"xrange","update":"[0, width]"},{"name":"yrange","update":"[0, height]"},{"name":"down","on":[{"events":"mousedown","update":"xy()"}],"value":null},{"name":"xcur","on":[{"events":"mousedown","update":"slice(xdom)"}],"value":null},{"name":"ycur","on":[{"events":"mousedown","update":"slice(ydom)"}],"value":null},{"name":"delta","on":[{"events":[{"between":[{"type":"mousedown"},{"source":"window","type":"mouseup"}],"consume":true,"source":"window","type":"mousemove"}],"update":"down ? [down[0]-x(), down[1]-y()] : [0,0]"}],"value":[0,0]},{"name":"anchor","on":[{"events":"wheel","update":"[invert('xscale', x()), invert('yscale', y())]"}],"value":[0,0]},{"name":"xext","update":"[0,width]"},{"name":"yext","update":"[0,height]"},{"name":"zoom","on":[{"events":"wheel!","force":true,"update":"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}],"value":1},{"name":"xdom","on":[{"events":{"signal":"delta"},"update":"[xcur[0] + span(xcur) * delta[0] / width, xcur[1] + span(xcur) * delta[0] / width]"},{"events":{"signal":"zoom"},"update":"[anchor[0] + (xdom[0] - anchor[0]) * zoom, anchor[0] + (xdom[1] - anchor[0]) * zoom]"}],"update":"[x_extent[0] - nodeWidth/ 2, x_extent[1] + nodeWidth / 2]"},{"name":"ydom","on":[{"events":{"signal":"delta"},"update":"[ycur[0] + span(ycur) * delta[1] / height, ycur[1] + span(ycur) * delta[1] / height]"},{"events":{"signal":"zoom"},"update":"[anchor[1] + (ydom[0] - anchor[1]) * zoom, anchor[1] + (ydom[1] - anchor[1]) * zoom]"}],"update":"[y_extent[0] - nodeHeight, y_extent[1] + nodeHeight/3]"},{"name":"scaledNodeWidth","update":"(nodeWidth/ span(xdom))*width"},{"name":"scaledNodeHeight","update":"abs(nodeHeight/ span(ydom))*height"},{"name":"scaledLimit","update":"(20/ span(xdom))*width"},{"name":"spaceBetweenLevels","value":60},{"name":"spaceBetweenNodes","value":25},{"name":"nodeWidth","value":60},{"name":"nodeHeight","value":60},{"name":"startingDepth","on":[{"events":{"throttle":0,"type":"timer"},"update":"-1"}],"value":3}],"width":600}

Or change the space between nodes using the :space_between option.

Note that the size of the accompanying nodes and/or text will change to accomodate the new :space_between option while trying to maintain the canvas size.

EXGBoost.plot_tree(
  booster,
  rankdir: :lr,
  index: 4,
  depth: 3,
  space_between: [nodes: 200]
)
{"$schema":"https://vega.github.io/schema/vega/v5.json","autosize":"fit","background":"#282a36","data":[{"name":"tree","values":[{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":0,"yes":2},{"depth":null,"leaf":0.425454557,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":null,"leaf":-0.218918934,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":1,"yes":2},{"depth":null,"leaf":-0.212727293,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":1,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":1,"yes":6},{"depth":null,"leaf":0.410982668,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":1,"yes":8},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-0.211034521,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":2,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":4},{"depth":null,"leaf":-0.218530372,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":2,"yes":6},{"depth":null,"leaf":0.0719999969,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":8},{"depth":null,"leaf":0.128571421,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":0.422068983,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":3,"yes":2},{"depth":null,"leaf":0.292982191,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":null,"leaf":-0.195790753,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":4,"yes":2},{"depth":null,"leaf":-0.18925412,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":4,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":4,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":4,"yes":10},{"depth":null,"leaf":0.110490814,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":0.295589149,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.0065466417,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":4,"yes":8},{"depth":null,"leaf":-0.00258299569,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.187741965,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":5,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":5,"yes":4},{"depth":null,"leaf":-0.195117101,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.00513018994,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":5,"yes":6},{"depth":null,"leaf":0.0662105083,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.283106089,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":6,"yes":2},{"depth":null,"leaf":0.234668195,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":null,"leaf":-0.18040958,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":7,"yes":2},{"depth":null,"leaf":-0.173018426,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":7,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":7,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":7,"yes":10},{"depth":null,"leaf":0.0843105838,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":0.236887291,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.0104054213,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":7,"yes":8},{"depth":null,"leaf":0.0072258329,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.171714455,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":8,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":4},{"depth":null,"leaf":-0.179455951,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.0102903834,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":8,"yes":6},{"depth":null,"leaf":0.0586014725,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":8},{"depth":null,"leaf":0.068535842,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.2342868,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":9,"yes":2},{"depth":null,"leaf":0.202173784,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":null,"leaf":-0.169466257,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":10,"yes":2},{"depth":null,"leaf":-0.160806924,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.60000002,"tree_id":10,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":10,"yes":6},{"depth":null,"leaf":0.203813776,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.046239242,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":5.0999999,"tree_id":10,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":10,"yes":10},{"depth":null,"leaf":-0.145340025,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.123540193,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":-0.160442933,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":11,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":11,"yes":4},{"depth":null,"leaf":-0.168171152,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.0149572417,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":11,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":11,"yes":8},{"depth":null,"leaf":0.195176765,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":-0.0395982973,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.204244092,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":12,"yes":2},{"depth":null,"leaf":0.181544691,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":null,"leaf":-0.161027163,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":13,"yes":2},{"depth":null,"leaf":-0.150903225,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":13,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":13,"yes":6},{"depth":null,"leaf":0.18685849,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":13,"yes":8},{"depth":null,"leaf":-0.13117227,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":0.077316612,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":-0.15599905,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":14,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":14,"yes":4},{"depth":null,"leaf":-0.159298271,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.0134122102,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":14,"yes":6},{"depth":null,"leaf":0.0381595641,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":14,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":7,"split":"petal width","split_condition":2,"tree_id":14,"yes":10},{"depth":null,"leaf":-0.00389169785,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.101416349,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.186925322,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":15,"yes":2},{"depth":null,"leaf":0.16711998,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":null,"leaf":-0.154198557,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":16,"yes":2},{"depth":null,"leaf":-0.142255381,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":16,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":16,"yes":6},{"depth":null,"leaf":0.172067791,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":16,"yes":8},{"depth":null,"leaf":-0.121421516,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":0.073711507,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":-0.148049027,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":17,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":17,"yes":4},{"depth":null,"leaf":-0.151937172,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.0142573239,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":17,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":17,"yes":8},{"depth":null,"leaf":0.153471231,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":-0.0392971113,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.168022811,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":18,"yes":2},{"depth":null,"leaf":0.156131104,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":null,"leaf":-0.148197949,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":19,"yes":2},{"depth":null,"leaf":-0.134196311,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":19,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":19,"yes":6},{"depth":null,"leaf":0.160865128,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":19,"yes":8},{"depth":null,"leaf":-0.110056646,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":0.0594659112,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":-0.139969245,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":20,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":20,"yes":4},{"depth":null,"leaf":-0.145403519,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.0147723975,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"sepal width","split_condition":3.20000005,"tree_id":20,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"petal width","split_condition":1.79999995,"tree_id":20,"yes":8},{"depth":null,"leaf":0.0483957976,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.162800461,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":2,"leaf":null,"missing":10,"no":11,"nodeid":7,"parentid":3,"split":"petal length","split_condition":5.19999981,"tree_id":20,"yes":10},{"depth":null,"leaf":-0.0793080404,"missing":null,"no":null,"nodeid":10,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.112726398,"missing":null,"no":null,"nodeid":11,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":21,"yes":2},{"depth":null,"leaf":0.14705947,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":null,"leaf":-0.142660394,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":22,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":22,"yes":4},{"depth":null,"leaf":-0.12631698,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":22,"yes":6},{"depth":null,"leaf":0.151711732,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":22,"yes":8},{"depth":null,"leaf":-0.101206295,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":0.0569678135,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":-0.132955521,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":23,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":23,"yes":4},{"depth":null,"leaf":-0.1391913,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.0150168026,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":23,"yes":6},{"depth":null,"leaf":0.014580613,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":23,"yes":8},{"depth":null,"leaf":0.0168433767,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.154607058,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":24,"yes":2},{"depth":null,"leaf":0.139016181,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":null,"leaf":-0.13727048,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":25,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":25,"yes":4},{"depth":null,"leaf":-0.118402772,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.79999995,"tree_id":25,"yes":6},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":5,"split":"sepal length","split_condition":5.19999981,"tree_id":25,"yes":8},{"depth":null,"leaf":0.0103592547,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":0.152987525,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.0338534117,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.126058802,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":26,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":26,"yes":4},{"depth":null,"leaf":-0.137931168,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":26,"yes":6},{"depth":null,"leaf":0.116194524,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":-0.0252925735,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":0.148122758,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":27,"yes":2},{"depth":null,"leaf":0.131407082,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":null,"leaf":-0.131564274,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":28,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":28,"yes":4},{"depth":null,"leaf":-0.110398278,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":28,"yes":6},{"depth":null,"leaf":0.135915175,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal length","split_condition":6,"tree_id":28,"yes":8},{"depth":null,"leaf":0.01785478,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.0288929809,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.117059968,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":29,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":29,"yes":4},{"depth":null,"leaf":-0.131456167,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":29,"yes":6},{"depth":null,"leaf":0.108389735,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":-0.0236288365,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":0.138706177,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":29,"yes":null}]},{"name":"treeCalcs","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["y","x","depth","children"],"method":"tidy","separation":{"signal":"false"},"type":"tree"}]},{"name":"treeChildren","source":"treeCalcs","transform":[{"as":["childrenObjects"],"fields":["parentid"],"groupby":["parentid"],"ops":["values"],"type":"aggregate"},{"as":"childrenIds","expr":"pluck(datum.childrenObjects,'nodeid')","type":"formula"}]},{"name":"treeAncestors","source":"treeCalcs","transform":[{"as":"treeAncestors","expr":"treeAncestors('treeCalcs', datum.nodeid, 'root')","type":"formula"},{"fields":["treeAncestors"],"type":"flatten"},{"as":"allParents","expr":"datum.treeAncestors.parentid","type":"formula"}]},{"name":"treeChildrenAll","source":"treeAncestors","transform":[{"fields":["allParents","nodeid","name","parentid","x","y","depth","children"],"type":"project"},{"as":["allChildrenObjects","allChildrenCount","id"],"fields":["parentid","parentid","nodeid"],"groupby":["allParents"],"ops":["values","count","min"],"type":"aggregate"},{"as":"allChildrenIds","expr":"pluck(datum.allChildrenObjects,'nodeid')","type":"formula"}]},{"name":"treeClickStoreTemp","source":"treeAncestors","transform":[{"expr":"startingDepth != -1 ? datum.depth <= startingDepth : node != 0 && !isExpanded ? datum.parentid == node: node != 0 && isExpanded ? datum.allParents == node : false","type":"filter"},{"fields":["nodeid","parentid","x","y","depth","children"],"type":"project"},{"fields":["nodeid"],"groupby":["nodeid","parentid","x","y","depth","children"],"ops":["min"],"type":"aggregate"}]},{"name":"treeClickStorePerm","on":[{"insert":"data('treeClickStoreTemp')","trigger":"startingDepth >= 0"},{"insert":"!isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"},{"remove":"isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"}],"values":[]},{"name":"treeLayout","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid)","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["y","x","depth","children"],"method":"tidy","nodeSize":[{"signal":"nodeWidth + spaceBetweenNodes"},{"signal":"nodeHeight+ spaceBetweenLevels"}],"separation":{"signal":"false"},"type":"tree"},{"as":"y","expr":"1*(datum.y+(height/10))","type":"formula"},{"as":"x","expr":"1*(datum.x+(width/2))","type":"formula"},{"field":"x","signal":"x_extent","type":"extent"},{"field":"y","signal":"y_extent","type":"extent"},{"as":"xscaled","expr":"scale('xscale',datum.x)","type":"formula"},{"as":"parent","expr":"datum.parentid","type":"formula"}]},{"name":"fullTreeLayout","source":"treeLayout","transform":[{"fields":["nodeid"],"from":"treeChildren","key":"parentid","type":"lookup","values":["childrenObjects","childrenIds"]},{"fields":["nodeid"],"from":"treeChildrenAll","key":"allParents","type":"lookup","values":["allChildrenIds","allChildrenObjects"]},{"fields":["nodeid"],"from":"treeCalcs","key":"nodeid","type":"lookup","values":["children"]},{"as":"treeParent","expr":"reverse(pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid'))[1]","type":"formula"},{"as":"isLeaf","expr":"datum.leaf == null","type":"formula"}]},{"name":"splitNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && datum.isLeaf","type":"filter"}]},{"name":"leafNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && !datum.isLeaf","type":"filter"}]},{"name":"links","source":"treeLayout","transform":[{"type":"treelinks"},{"orient":"horizontal","shape":"line","sourceX":{"expr":"scale('xscale', datum.source.x) + scaledNodeWidth/2"},"sourceY":{"expr":"scale('yscale', datum.source.y) - scaledNodeHeight/2"},"targetX":{"expr":"scale('xscale', datum.target.x) - scaledNodeWidth/2"},"targetY":{"expr":"scale('yscale', datum.target.y) - scaledNodeHeight/2"},"type":"linkpath"},{"expr":" indata('treeClickStorePerm', 'nodeid', datum.target.nodeid)","type":"filter"}]},{"name":"yesPaths","source":"links","transform":[{"expr":"datum.source.yes === datum.target.nodeid ","type":"filter"}]},{"name":"noPaths","source":"links","transform":[{"expr":"datum.source.yes !== datum.target.nodeid ","type":"filter"}]}],"height":400,"marks":[{"encode":{"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"update":{"path":{"field":"path"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"}}},"from":{"data":"yesPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"path":{"field":"path"},"stroke":{"value":"#f8f8f2"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"},"strokewidth":{"value":1}}},"from":{"data":"noPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#50fa7b"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"yes"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y-nodeWidth/3) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"yesPaths"},"type":"text"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#ff5555"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"no"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"noPaths"},"type":"text"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#ff79c6"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"splitNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"bold"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"parent.split + ' <= ' + format(parent.split_condition, '.2f')"},"x":{"signal":"(scaledNodeWidth / 2)"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"},{"encode":{"update":{"align":{"value":"right"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"text":{"signal":"parent.children"},"x":{"signal":"item.mark.group.width - (9/ span(xdom))*width"},"y":{"signal":"item.mark.group.height/2"}}},"interactive":false,"type":"text"}],"name":"splitNode","type":"group"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#44475a"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#ff79c6"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"leafNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"normal"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"'leaf = ' + format(parent.leaf, '.2f')"},"x":{"signal":"scaledNodeWidth / 2"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"}],"name":"leafNode","type":"group"}],"padding":30,"scales":[{"domain":{"signal":"xdom"},"name":"xscale","range":{"signal":"xrange"},"zero":false},{"domain":{"signal":"ydom"},"name":"yscale","range":{"signal":"yrange"},"zero":false}],"signals":[{"name":"selectedTree","value":4},{"name":"node","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.nodeid"}],"value":0},{"name":"nodeHighlight","on":[{"events":[{"markname":"splitNode","type":"mouseover"},{"markname":"leafNode","type":"mouseover"}],"update":"pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid')"},{"events":{"type":"mouseout"},"update":"[0]"}],"value":"[0]"},{"name":"isExpanded","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.children > 0 && indata('treeClickStorePerm', 'nodeid', datum.childrenIds[0]) ? true : false"}],"value":0},{"name":"xrange","update":"[0, width]"},{"name":"yrange","update":"[0, height]"},{"name":"down","on":[{"events":"mousedown","update":"xy()"}],"value":null},{"name":"xcur","on":[{"events":"mousedown","update":"slice(xdom)"}],"value":null},{"name":"ycur","on":[{"events":"mousedown","update":"slice(ydom)"}],"value":null},{"name":"delta","on":[{"events":[{"between":[{"type":"mousedown"},{"source":"window","type":"mouseup"}],"consume":true,"source":"window","type":"mousemove"}],"update":"down ? [down[0]-x(), down[1]-y()] : [0,0]"}],"value":[0,0]},{"name":"anchor","on":[{"events":"wheel","update":"[invert('xscale', x()), invert('yscale', y())]"}],"value":[0,0]},{"name":"xext","update":"[0,width]"},{"name":"yext","update":"[0,height]"},{"name":"zoom","on":[{"events":"wheel!","force":true,"update":"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}],"value":1},{"name":"xdom","on":[{"events":{"signal":"delta"},"update":"[xcur[0] + span(xcur) * delta[0] / width, xcur[1] + span(xcur) * delta[0] / width]"},{"events":{"signal":"zoom"},"update":"[anchor[0] + (xdom[0] - anchor[0]) * zoom, anchor[0] + (xdom[1] - anchor[0]) * zoom]"}],"update":"[x_extent[0] - nodeWidth/ 2, x_extent[1] + nodeWidth / 2]"},{"name":"ydom","on":[{"events":{"signal":"delta"},"update":"[ycur[0] + span(ycur) * delta[1] / height, ycur[1] + span(ycur) * delta[1] / height]"},{"events":{"signal":"zoom"},"update":"[anchor[1] + (ydom[0] - anchor[1]) * zoom, anchor[1] + (ydom[1] - anchor[1]) * zoom]"}],"update":"[y_extent[0] - nodeHeight, y_extent[1] + nodeHeight/3]"},{"name":"scaledNodeWidth","update":"(nodeWidth/ span(xdom))*width"},{"name":"scaledNodeHeight","update":"abs(nodeHeight/ span(ydom))*height"},{"name":"scaledLimit","update":"(20/ span(xdom))*width"},{"name":"spaceBetweenLevels","value":100},{"name":"spaceBetweenNodes","value":200},{"name":"nodeWidth","value":100},{"name":"nodeHeight","value":45},{"name":"startingDepth","on":[{"events":{"throttle":0,"type":"timer"},"update":"-1"}],"value":3}],"width":600}

So if you want to add the space between while not changing the size of the nodes you might need to manually adjust the canvas size:

EXGBoost.plot_tree(
  booster,
  rankdir: :lr,
  index: 4,
  depth: 3,
  space_between: [nodes: 200],
  height: 800
)
{"$schema":"https://vega.github.io/schema/vega/v5.json","autosize":"fit","background":"#282a36","data":[{"name":"tree","values":[{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":0,"yes":2},{"depth":null,"leaf":0.425454557,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":null,"leaf":-0.218918934,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":1,"yes":2},{"depth":null,"leaf":-0.212727293,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":1,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":1,"yes":6},{"depth":null,"leaf":0.410982668,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":1,"yes":8},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-0.211034521,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":2,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":4},{"depth":null,"leaf":-0.218530372,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":2,"yes":6},{"depth":null,"leaf":0.0719999969,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":8},{"depth":null,"leaf":0.128571421,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":0.422068983,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":3,"yes":2},{"depth":null,"leaf":0.292982191,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":null,"leaf":-0.195790753,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":4,"yes":2},{"depth":null,"leaf":-0.18925412,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":4,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":4,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":4,"yes":10},{"depth":null,"leaf":0.110490814,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":0.295589149,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.0065466417,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":4,"yes":8},{"depth":null,"leaf":-0.00258299569,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.187741965,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":5,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":5,"yes":4},{"depth":null,"leaf":-0.195117101,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.00513018994,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":5,"yes":6},{"depth":null,"leaf":0.0662105083,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.283106089,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":6,"yes":2},{"depth":null,"leaf":0.234668195,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":null,"leaf":-0.18040958,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":7,"yes":2},{"depth":null,"leaf":-0.173018426,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":7,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":7,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":7,"yes":10},{"depth":null,"leaf":0.0843105838,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":0.236887291,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.0104054213,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":7,"yes":8},{"depth":null,"leaf":0.0072258329,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.171714455,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":8,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":4},{"depth":null,"leaf":-0.179455951,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.0102903834,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":8,"yes":6},{"depth":null,"leaf":0.0586014725,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":8},{"depth":null,"leaf":0.068535842,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.2342868,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":9,"yes":2},{"depth":null,"leaf":0.202173784,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":null,"leaf":-0.169466257,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":10,"yes":2},{"depth":null,"leaf":-0.160806924,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.60000002,"tree_id":10,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":10,"yes":6},{"depth":null,"leaf":0.203813776,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.046239242,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":5.0999999,"tree_id":10,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":10,"yes":10},{"depth":null,"leaf":-0.145340025,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.123540193,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":-0.160442933,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":11,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":11,"yes":4},{"depth":null,"leaf":-0.168171152,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.0149572417,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":11,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":11,"yes":8},{"depth":null,"leaf":0.195176765,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":-0.0395982973,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.204244092,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":12,"yes":2},{"depth":null,"leaf":0.181544691,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":null,"leaf":-0.161027163,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":13,"yes":2},{"depth":null,"leaf":-0.150903225,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":13,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":13,"yes":6},{"depth":null,"leaf":0.18685849,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":13,"yes":8},{"depth":null,"leaf":-0.13117227,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":0.077316612,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":-0.15599905,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":14,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":14,"yes":4},{"depth":null,"leaf":-0.159298271,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.0134122102,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":14,"yes":6},{"depth":null,"leaf":0.0381595641,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":14,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":7,"split":"petal width","split_condition":2,"tree_id":14,"yes":10},{"depth":null,"leaf":-0.00389169785,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.101416349,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.186925322,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":15,"yes":2},{"depth":null,"leaf":0.16711998,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":null,"leaf":-0.154198557,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":16,"yes":2},{"depth":null,"leaf":-0.142255381,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":16,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":16,"yes":6},{"depth":null,"leaf":0.172067791,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":16,"yes":8},{"depth":null,"leaf":-0.121421516,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":0.073711507,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":-0.148049027,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":17,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":17,"yes":4},{"depth":null,"leaf":-0.151937172,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.0142573239,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":17,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":17,"yes":8},{"depth":null,"leaf":0.153471231,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":-0.0392971113,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.168022811,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":18,"yes":2},{"depth":null,"leaf":0.156131104,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":null,"leaf":-0.148197949,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":19,"yes":2},{"depth":null,"leaf":-0.134196311,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":19,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":19,"yes":6},{"depth":null,"leaf":0.160865128,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":19,"yes":8},{"depth":null,"leaf":-0.110056646,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":0.0594659112,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":-0.139969245,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":20,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":20,"yes":4},{"depth":null,"leaf":-0.145403519,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.0147723975,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"sepal width","split_condition":3.20000005,"tree_id":20,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"petal width","split_condition":1.79999995,"tree_id":20,"yes":8},{"depth":null,"leaf":0.0483957976,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.162800461,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":2,"leaf":null,"missing":10,"no":11,"nodeid":7,"parentid":3,"split":"petal length","split_condition":5.19999981,"tree_id":20,"yes":10},{"depth":null,"leaf":-0.0793080404,"missing":null,"no":null,"nodeid":10,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.112726398,"missing":null,"no":null,"nodeid":11,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":21,"yes":2},{"depth":null,"leaf":0.14705947,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":null,"leaf":-0.142660394,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":22,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":22,"yes":4},{"depth":null,"leaf":-0.12631698,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":22,"yes":6},{"depth":null,"leaf":0.151711732,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":22,"yes":8},{"depth":null,"leaf":-0.101206295,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":0.0569678135,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":-0.132955521,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":23,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":23,"yes":4},{"depth":null,"leaf":-0.1391913,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.0150168026,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":23,"yes":6},{"depth":null,"leaf":0.014580613,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":23,"yes":8},{"depth":null,"leaf":0.0168433767,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.154607058,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":24,"yes":2},{"depth":null,"leaf":0.139016181,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":null,"leaf":-0.13727048,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":25,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":25,"yes":4},{"depth":null,"leaf":-0.118402772,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.79999995,"tree_id":25,"yes":6},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":5,"split":"sepal length","split_condition":5.19999981,"tree_id":25,"yes":8},{"depth":null,"leaf":0.0103592547,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":0.152987525,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.0338534117,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.126058802,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":26,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":26,"yes":4},{"depth":null,"leaf":-0.137931168,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":26,"yes":6},{"depth":null,"leaf":0.116194524,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":-0.0252925735,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":0.148122758,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":27,"yes":2},{"depth":null,"leaf":0.131407082,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":null,"leaf":-0.131564274,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":28,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":28,"yes":4},{"depth":null,"leaf":-0.110398278,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":28,"yes":6},{"depth":null,"leaf":0.135915175,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal length","split_condition":6,"tree_id":28,"yes":8},{"depth":null,"leaf":0.01785478,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.0288929809,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.117059968,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":29,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":29,"yes":4},{"depth":null,"leaf":-0.131456167,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":29,"yes":6},{"depth":null,"leaf":0.108389735,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":-0.0236288365,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":0.138706177,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":29,"yes":null}]},{"name":"treeCalcs","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["y","x","depth","children"],"method":"tidy","separation":{"signal":"false"},"type":"tree"}]},{"name":"treeChildren","source":"treeCalcs","transform":[{"as":["childrenObjects"],"fields":["parentid"],"groupby":["parentid"],"ops":["values"],"type":"aggregate"},{"as":"childrenIds","expr":"pluck(datum.childrenObjects,'nodeid')","type":"formula"}]},{"name":"treeAncestors","source":"treeCalcs","transform":[{"as":"treeAncestors","expr":"treeAncestors('treeCalcs', datum.nodeid, 'root')","type":"formula"},{"fields":["treeAncestors"],"type":"flatten"},{"as":"allParents","expr":"datum.treeAncestors.parentid","type":"formula"}]},{"name":"treeChildrenAll","source":"treeAncestors","transform":[{"fields":["allParents","nodeid","name","parentid","x","y","depth","children"],"type":"project"},{"as":["allChildrenObjects","allChildrenCount","id"],"fields":["parentid","parentid","nodeid"],"groupby":["allParents"],"ops":["values","count","min"],"type":"aggregate"},{"as":"allChildrenIds","expr":"pluck(datum.allChildrenObjects,'nodeid')","type":"formula"}]},{"name":"treeClickStoreTemp","source":"treeAncestors","transform":[{"expr":"startingDepth != -1 ? datum.depth <= startingDepth : node != 0 && !isExpanded ? datum.parentid == node: node != 0 && isExpanded ? datum.allParents == node : false","type":"filter"},{"fields":["nodeid","parentid","x","y","depth","children"],"type":"project"},{"fields":["nodeid"],"groupby":["nodeid","parentid","x","y","depth","children"],"ops":["min"],"type":"aggregate"}]},{"name":"treeClickStorePerm","on":[{"insert":"data('treeClickStoreTemp')","trigger":"startingDepth >= 0"},{"insert":"!isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"},{"remove":"isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"}],"values":[]},{"name":"treeLayout","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid)","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["y","x","depth","children"],"method":"tidy","nodeSize":[{"signal":"nodeWidth + spaceBetweenNodes"},{"signal":"nodeHeight+ spaceBetweenLevels"}],"separation":{"signal":"false"},"type":"tree"},{"as":"y","expr":"1*(datum.y+(height/10))","type":"formula"},{"as":"x","expr":"1*(datum.x+(width/2))","type":"formula"},{"field":"x","signal":"x_extent","type":"extent"},{"field":"y","signal":"y_extent","type":"extent"},{"as":"xscaled","expr":"scale('xscale',datum.x)","type":"formula"},{"as":"parent","expr":"datum.parentid","type":"formula"}]},{"name":"fullTreeLayout","source":"treeLayout","transform":[{"fields":["nodeid"],"from":"treeChildren","key":"parentid","type":"lookup","values":["childrenObjects","childrenIds"]},{"fields":["nodeid"],"from":"treeChildrenAll","key":"allParents","type":"lookup","values":["allChildrenIds","allChildrenObjects"]},{"fields":["nodeid"],"from":"treeCalcs","key":"nodeid","type":"lookup","values":["children"]},{"as":"treeParent","expr":"reverse(pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid'))[1]","type":"formula"},{"as":"isLeaf","expr":"datum.leaf == null","type":"formula"}]},{"name":"splitNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && datum.isLeaf","type":"filter"}]},{"name":"leafNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && !datum.isLeaf","type":"filter"}]},{"name":"links","source":"treeLayout","transform":[{"type":"treelinks"},{"orient":"horizontal","shape":"line","sourceX":{"expr":"scale('xscale', datum.source.x) + scaledNodeWidth/2"},"sourceY":{"expr":"scale('yscale', datum.source.y) - scaledNodeHeight/2"},"targetX":{"expr":"scale('xscale', datum.target.x) - scaledNodeWidth/2"},"targetY":{"expr":"scale('yscale', datum.target.y) - scaledNodeHeight/2"},"type":"linkpath"},{"expr":" indata('treeClickStorePerm', 'nodeid', datum.target.nodeid)","type":"filter"}]},{"name":"yesPaths","source":"links","transform":[{"expr":"datum.source.yes === datum.target.nodeid ","type":"filter"}]},{"name":"noPaths","source":"links","transform":[{"expr":"datum.source.yes !== datum.target.nodeid ","type":"filter"}]}],"height":800,"marks":[{"encode":{"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"update":{"path":{"field":"path"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"}}},"from":{"data":"yesPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"path":{"field":"path"},"stroke":{"value":"#f8f8f2"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"},"strokewidth":{"value":1}}},"from":{"data":"noPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#50fa7b"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"yes"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y-nodeWidth/3) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"yesPaths"},"type":"text"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#ff5555"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"no"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"noPaths"},"type":"text"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#ff79c6"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"splitNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"bold"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"parent.split + ' <= ' + format(parent.split_condition, '.2f')"},"x":{"signal":"(scaledNodeWidth / 2)"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"},{"encode":{"update":{"align":{"value":"right"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"text":{"signal":"parent.children"},"x":{"signal":"item.mark.group.width - (9/ span(xdom))*width"},"y":{"signal":"item.mark.group.height/2"}}},"interactive":false,"type":"text"}],"name":"splitNode","type":"group"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#44475a"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#ff79c6"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"leafNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"normal"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"'leaf = ' + format(parent.leaf, '.2f')"},"x":{"signal":"scaledNodeWidth / 2"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"}],"name":"leafNode","type":"group"}],"padding":30,"scales":[{"domain":{"signal":"xdom"},"name":"xscale","range":{"signal":"xrange"},"zero":false},{"domain":{"signal":"ydom"},"name":"yscale","range":{"signal":"yrange"},"zero":false}],"signals":[{"name":"selectedTree","value":4},{"name":"node","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.nodeid"}],"value":0},{"name":"nodeHighlight","on":[{"events":[{"markname":"splitNode","type":"mouseover"},{"markname":"leafNode","type":"mouseover"}],"update":"pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid')"},{"events":{"type":"mouseout"},"update":"[0]"}],"value":"[0]"},{"name":"isExpanded","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.children > 0 && indata('treeClickStorePerm', 'nodeid', datum.childrenIds[0]) ? true : false"}],"value":0},{"name":"xrange","update":"[0, width]"},{"name":"yrange","update":"[0, height]"},{"name":"down","on":[{"events":"mousedown","update":"xy()"}],"value":null},{"name":"xcur","on":[{"events":"mousedown","update":"slice(xdom)"}],"value":null},{"name":"ycur","on":[{"events":"mousedown","update":"slice(ydom)"}],"value":null},{"name":"delta","on":[{"events":[{"between":[{"type":"mousedown"},{"source":"window","type":"mouseup"}],"consume":true,"source":"window","type":"mousemove"}],"update":"down ? [down[0]-x(), down[1]-y()] : [0,0]"}],"value":[0,0]},{"name":"anchor","on":[{"events":"wheel","update":"[invert('xscale', x()), invert('yscale', y())]"}],"value":[0,0]},{"name":"xext","update":"[0,width]"},{"name":"yext","update":"[0,height]"},{"name":"zoom","on":[{"events":"wheel!","force":true,"update":"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}],"value":1},{"name":"xdom","on":[{"events":{"signal":"delta"},"update":"[xcur[0] + span(xcur) * delta[0] / width, xcur[1] + span(xcur) * delta[0] / width]"},{"events":{"signal":"zoom"},"update":"[anchor[0] + (xdom[0] - anchor[0]) * zoom, anchor[0] + (xdom[1] - anchor[0]) * zoom]"}],"update":"[x_extent[0] - nodeWidth/ 2, x_extent[1] + nodeWidth / 2]"},{"name":"ydom","on":[{"events":{"signal":"delta"},"update":"[ycur[0] + span(ycur) * delta[1] / height, ycur[1] + span(ycur) * delta[1] / height]"},{"events":{"signal":"zoom"},"update":"[anchor[1] + (ydom[0] - anchor[1]) * zoom, anchor[1] + (ydom[1] - anchor[1]) * zoom]"}],"update":"[y_extent[0] - nodeHeight, y_extent[1] + nodeHeight/3]"},{"name":"scaledNodeWidth","update":"(nodeWidth/ span(xdom))*width"},{"name":"scaledNodeHeight","update":"abs(nodeHeight/ span(ydom))*height"},{"name":"scaledLimit","update":"(20/ span(xdom))*width"},{"name":"spaceBetweenLevels","value":100},{"name":"spaceBetweenNodes","value":200},{"name":"nodeWidth","value":100},{"name":"nodeHeight","value":45},{"name":"startingDepth","on":[{"events":{"throttle":0,"type":"timer"},"update":"-1"}],"value":3}],"width":600}
EXGBoost.plot_tree(
  booster,
  rankdir: :lr,
  index: 4,
  depth: 3,
  space_between: [levels: 200]
)
{"$schema":"https://vega.github.io/schema/vega/v5.json","autosize":"fit","background":"#282a36","data":[{"name":"tree","values":[{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":0,"yes":2},{"depth":null,"leaf":0.425454557,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":null,"leaf":-0.218918934,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":1,"yes":2},{"depth":null,"leaf":-0.212727293,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":1,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":1,"yes":6},{"depth":null,"leaf":0.410982668,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":1,"yes":8},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-0.211034521,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":2,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":4},{"depth":null,"leaf":-0.218530372,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":2,"yes":6},{"depth":null,"leaf":0.0719999969,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":8},{"depth":null,"leaf":0.128571421,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":0.422068983,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":3,"yes":2},{"depth":null,"leaf":0.292982191,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":null,"leaf":-0.195790753,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":4,"yes":2},{"depth":null,"leaf":-0.18925412,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":4,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":4,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":4,"yes":10},{"depth":null,"leaf":0.110490814,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":0.295589149,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.0065466417,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":4,"yes":8},{"depth":null,"leaf":-0.00258299569,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.187741965,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":5,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":5,"yes":4},{"depth":null,"leaf":-0.195117101,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.00513018994,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":5,"yes":6},{"depth":null,"leaf":0.0662105083,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.283106089,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":6,"yes":2},{"depth":null,"leaf":0.234668195,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":null,"leaf":-0.18040958,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":7,"yes":2},{"depth":null,"leaf":-0.173018426,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":7,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":7,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":7,"yes":10},{"depth":null,"leaf":0.0843105838,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":0.236887291,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.0104054213,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":7,"yes":8},{"depth":null,"leaf":0.0072258329,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.171714455,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":8,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":4},{"depth":null,"leaf":-0.179455951,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.0102903834,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":8,"yes":6},{"depth":null,"leaf":0.0586014725,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":8},{"depth":null,"leaf":0.068535842,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.2342868,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":9,"yes":2},{"depth":null,"leaf":0.202173784,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":null,"leaf":-0.169466257,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":10,"yes":2},{"depth":null,"leaf":-0.160806924,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.60000002,"tree_id":10,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":10,"yes":6},{"depth":null,"leaf":0.203813776,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.046239242,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":5.0999999,"tree_id":10,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":10,"yes":10},{"depth":null,"leaf":-0.145340025,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.123540193,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":-0.160442933,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":11,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":11,"yes":4},{"depth":null,"leaf":-0.168171152,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.0149572417,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":11,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":11,"yes":8},{"depth":null,"leaf":0.195176765,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":-0.0395982973,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.204244092,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":12,"yes":2},{"depth":null,"leaf":0.181544691,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":null,"leaf":-0.161027163,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":13,"yes":2},{"depth":null,"leaf":-0.150903225,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":13,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":13,"yes":6},{"depth":null,"leaf":0.18685849,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":13,"yes":8},{"depth":null,"leaf":-0.13117227,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":0.077316612,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":-0.15599905,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":14,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":14,"yes":4},{"depth":null,"leaf":-0.159298271,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.0134122102,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":14,"yes":6},{"depth":null,"leaf":0.0381595641,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":14,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":7,"split":"petal width","split_condition":2,"tree_id":14,"yes":10},{"depth":null,"leaf":-0.00389169785,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.101416349,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.186925322,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":15,"yes":2},{"depth":null,"leaf":0.16711998,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":null,"leaf":-0.154198557,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":16,"yes":2},{"depth":null,"leaf":-0.142255381,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":16,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":16,"yes":6},{"depth":null,"leaf":0.172067791,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":16,"yes":8},{"depth":null,"leaf":-0.121421516,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":0.073711507,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":-0.148049027,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":17,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":17,"yes":4},{"depth":null,"leaf":-0.151937172,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.0142573239,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":17,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":17,"yes":8},{"depth":null,"leaf":0.153471231,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":-0.0392971113,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.168022811,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":18,"yes":2},{"depth":null,"leaf":0.156131104,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":null,"leaf":-0.148197949,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":19,"yes":2},{"depth":null,"leaf":-0.134196311,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":19,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":19,"yes":6},{"depth":null,"leaf":0.160865128,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":19,"yes":8},{"depth":null,"leaf":-0.110056646,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":0.0594659112,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":-0.139969245,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":20,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":20,"yes":4},{"depth":null,"leaf":-0.145403519,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.0147723975,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"sepal width","split_condition":3.20000005,"tree_id":20,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"petal width","split_condition":1.79999995,"tree_id":20,"yes":8},{"depth":null,"leaf":0.0483957976,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.162800461,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":2,"leaf":null,"missing":10,"no":11,"nodeid":7,"parentid":3,"split":"petal length","split_condition":5.19999981,"tree_id":20,"yes":10},{"depth":null,"leaf":-0.0793080404,"missing":null,"no":null,"nodeid":10,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.112726398,"missing":null,"no":null,"nodeid":11,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":21,"yes":2},{"depth":null,"leaf":0.14705947,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":null,"leaf":-0.142660394,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":22,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":22,"yes":4},{"depth":null,"leaf":-0.12631698,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":22,"yes":6},{"depth":null,"leaf":0.151711732,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":22,"yes":8},{"depth":null,"leaf":-0.101206295,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":0.0569678135,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":-0.132955521,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":23,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":23,"yes":4},{"depth":null,"leaf":-0.1391913,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.0150168026,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":23,"yes":6},{"depth":null,"leaf":0.014580613,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":23,"yes":8},{"depth":null,"leaf":0.0168433767,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.154607058,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":24,"yes":2},{"depth":null,"leaf":0.139016181,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":null,"leaf":-0.13727048,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":25,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":25,"yes":4},{"depth":null,"leaf":-0.118402772,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.79999995,"tree_id":25,"yes":6},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":5,"split":"sepal length","split_condition":5.19999981,"tree_id":25,"yes":8},{"depth":null,"leaf":0.0103592547,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":0.152987525,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.0338534117,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.126058802,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":26,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":26,"yes":4},{"depth":null,"leaf":-0.137931168,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":26,"yes":6},{"depth":null,"leaf":0.116194524,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":-0.0252925735,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":0.148122758,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":27,"yes":2},{"depth":null,"leaf":0.131407082,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":null,"leaf":-0.131564274,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":28,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":28,"yes":4},{"depth":null,"leaf":-0.110398278,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":28,"yes":6},{"depth":null,"leaf":0.135915175,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal length","split_condition":6,"tree_id":28,"yes":8},{"depth":null,"leaf":0.01785478,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.0288929809,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.117059968,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":29,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":29,"yes":4},{"depth":null,"leaf":-0.131456167,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":29,"yes":6},{"depth":null,"leaf":0.108389735,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":-0.0236288365,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":0.138706177,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":29,"yes":null}]},{"name":"treeCalcs","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["y","x","depth","children"],"method":"tidy","separation":{"signal":"false"},"type":"tree"}]},{"name":"treeChildren","source":"treeCalcs","transform":[{"as":["childrenObjects"],"fields":["parentid"],"groupby":["parentid"],"ops":["values"],"type":"aggregate"},{"as":"childrenIds","expr":"pluck(datum.childrenObjects,'nodeid')","type":"formula"}]},{"name":"treeAncestors","source":"treeCalcs","transform":[{"as":"treeAncestors","expr":"treeAncestors('treeCalcs', datum.nodeid, 'root')","type":"formula"},{"fields":["treeAncestors"],"type":"flatten"},{"as":"allParents","expr":"datum.treeAncestors.parentid","type":"formula"}]},{"name":"treeChildrenAll","source":"treeAncestors","transform":[{"fields":["allParents","nodeid","name","parentid","x","y","depth","children"],"type":"project"},{"as":["allChildrenObjects","allChildrenCount","id"],"fields":["parentid","parentid","nodeid"],"groupby":["allParents"],"ops":["values","count","min"],"type":"aggregate"},{"as":"allChildrenIds","expr":"pluck(datum.allChildrenObjects,'nodeid')","type":"formula"}]},{"name":"treeClickStoreTemp","source":"treeAncestors","transform":[{"expr":"startingDepth != -1 ? datum.depth <= startingDepth : node != 0 && !isExpanded ? datum.parentid == node: node != 0 && isExpanded ? datum.allParents == node : false","type":"filter"},{"fields":["nodeid","parentid","x","y","depth","children"],"type":"project"},{"fields":["nodeid"],"groupby":["nodeid","parentid","x","y","depth","children"],"ops":["min"],"type":"aggregate"}]},{"name":"treeClickStorePerm","on":[{"insert":"data('treeClickStoreTemp')","trigger":"startingDepth >= 0"},{"insert":"!isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"},{"remove":"isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"}],"values":[]},{"name":"treeLayout","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid)","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["y","x","depth","children"],"method":"tidy","nodeSize":[{"signal":"nodeWidth + spaceBetweenNodes"},{"signal":"nodeHeight+ spaceBetweenLevels"}],"separation":{"signal":"false"},"type":"tree"},{"as":"y","expr":"1*(datum.y+(height/10))","type":"formula"},{"as":"x","expr":"1*(datum.x+(width/2))","type":"formula"},{"field":"x","signal":"x_extent","type":"extent"},{"field":"y","signal":"y_extent","type":"extent"},{"as":"xscaled","expr":"scale('xscale',datum.x)","type":"formula"},{"as":"parent","expr":"datum.parentid","type":"formula"}]},{"name":"fullTreeLayout","source":"treeLayout","transform":[{"fields":["nodeid"],"from":"treeChildren","key":"parentid","type":"lookup","values":["childrenObjects","childrenIds"]},{"fields":["nodeid"],"from":"treeChildrenAll","key":"allParents","type":"lookup","values":["allChildrenIds","allChildrenObjects"]},{"fields":["nodeid"],"from":"treeCalcs","key":"nodeid","type":"lookup","values":["children"]},{"as":"treeParent","expr":"reverse(pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid'))[1]","type":"formula"},{"as":"isLeaf","expr":"datum.leaf == null","type":"formula"}]},{"name":"splitNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && datum.isLeaf","type":"filter"}]},{"name":"leafNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && !datum.isLeaf","type":"filter"}]},{"name":"links","source":"treeLayout","transform":[{"type":"treelinks"},{"orient":"horizontal","shape":"line","sourceX":{"expr":"scale('xscale', datum.source.x) + scaledNodeWidth/2"},"sourceY":{"expr":"scale('yscale', datum.source.y) - scaledNodeHeight/2"},"targetX":{"expr":"scale('xscale', datum.target.x) - scaledNodeWidth/2"},"targetY":{"expr":"scale('yscale', datum.target.y) - scaledNodeHeight/2"},"type":"linkpath"},{"expr":" indata('treeClickStorePerm', 'nodeid', datum.target.nodeid)","type":"filter"}]},{"name":"yesPaths","source":"links","transform":[{"expr":"datum.source.yes === datum.target.nodeid ","type":"filter"}]},{"name":"noPaths","source":"links","transform":[{"expr":"datum.source.yes !== datum.target.nodeid ","type":"filter"}]}],"height":400,"marks":[{"encode":{"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"update":{"path":{"field":"path"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"}}},"from":{"data":"yesPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"path":{"field":"path"},"stroke":{"value":"#f8f8f2"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"},"strokewidth":{"value":1}}},"from":{"data":"noPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#50fa7b"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"yes"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y-nodeWidth/3) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"yesPaths"},"type":"text"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#ff5555"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"no"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"noPaths"},"type":"text"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#ff79c6"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"splitNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"bold"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"parent.split + ' <= ' + format(parent.split_condition, '.2f')"},"x":{"signal":"(scaledNodeWidth / 2)"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"},{"encode":{"update":{"align":{"value":"right"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"text":{"signal":"parent.children"},"x":{"signal":"item.mark.group.width - (9/ span(xdom))*width"},"y":{"signal":"item.mark.group.height/2"}}},"interactive":false,"type":"text"}],"name":"splitNode","type":"group"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#44475a"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#ff79c6"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"leafNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"normal"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"'leaf = ' + format(parent.leaf, '.2f')"},"x":{"signal":"scaledNodeWidth / 2"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"}],"name":"leafNode","type":"group"}],"padding":30,"scales":[{"domain":{"signal":"xdom"},"name":"xscale","range":{"signal":"xrange"},"zero":false},{"domain":{"signal":"ydom"},"name":"yscale","range":{"signal":"yrange"},"zero":false}],"signals":[{"name":"selectedTree","value":4},{"name":"node","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.nodeid"}],"value":0},{"name":"nodeHighlight","on":[{"events":[{"markname":"splitNode","type":"mouseover"},{"markname":"leafNode","type":"mouseover"}],"update":"pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid')"},{"events":{"type":"mouseout"},"update":"[0]"}],"value":"[0]"},{"name":"isExpanded","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.children > 0 && indata('treeClickStorePerm', 'nodeid', datum.childrenIds[0]) ? true : false"}],"value":0},{"name":"xrange","update":"[0, width]"},{"name":"yrange","update":"[0, height]"},{"name":"down","on":[{"events":"mousedown","update":"xy()"}],"value":null},{"name":"xcur","on":[{"events":"mousedown","update":"slice(xdom)"}],"value":null},{"name":"ycur","on":[{"events":"mousedown","update":"slice(ydom)"}],"value":null},{"name":"delta","on":[{"events":[{"between":[{"type":"mousedown"},{"source":"window","type":"mouseup"}],"consume":true,"source":"window","type":"mousemove"}],"update":"down ? [down[0]-x(), down[1]-y()] : [0,0]"}],"value":[0,0]},{"name":"anchor","on":[{"events":"wheel","update":"[invert('xscale', x()), invert('yscale', y())]"}],"value":[0,0]},{"name":"xext","update":"[0,width]"},{"name":"yext","update":"[0,height]"},{"name":"zoom","on":[{"events":"wheel!","force":true,"update":"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}],"value":1},{"name":"xdom","on":[{"events":{"signal":"delta"},"update":"[xcur[0] + span(xcur) * delta[0] / width, xcur[1] + span(xcur) * delta[0] / width]"},{"events":{"signal":"zoom"},"update":"[anchor[0] + (xdom[0] - anchor[0]) * zoom, anchor[0] + (xdom[1] - anchor[0]) * zoom]"}],"update":"[x_extent[0] - nodeWidth/ 2, x_extent[1] + nodeWidth / 2]"},{"name":"ydom","on":[{"events":{"signal":"delta"},"update":"[ycur[0] + span(ycur) * delta[1] / height, ycur[1] + span(ycur) * delta[1] / height]"},{"events":{"signal":"zoom"},"update":"[anchor[1] + (ydom[0] - anchor[1]) * zoom, anchor[1] + (ydom[1] - anchor[1]) * zoom]"}],"update":"[y_extent[0] - nodeHeight, y_extent[1] + nodeHeight/3]"},{"name":"scaledNodeWidth","update":"(nodeWidth/ span(xdom))*width"},{"name":"scaledNodeHeight","update":"abs(nodeHeight/ span(ydom))*height"},{"name":"scaledLimit","update":"(20/ span(xdom))*width"},{"name":"spaceBetweenLevels","value":200},{"name":"spaceBetweenNodes","value":10},{"name":"nodeWidth","value":100},{"name":"nodeHeight","value":45},{"name":"startingDepth","on":[{"events":{"throttle":0,"type":"timer"},"update":"-1"}],"value":3}],"width":600}

Mark Options

The options controlling the appearance of individual marks all conform to a similar API. You can refer to the options and pre-defined defaults for a subset of the allowed options, but you can also pass other options so long as they are allowed by the Vega Mark spec (as defined here)

EXGBoost.plot_tree(
  booster,
  rankdir: :bt,
  index: 4,
  depth: 3,
  space_between: [levels: 200],
  yes: [
    text: [font_size: 18, fill: :teal]
  ],
  no: [
    text: [font_size: 20]
  ],
  node_width: 100
)
{"$schema":"https://vega.github.io/schema/vega/v5.json","autosize":"fit","background":"#282a36","data":[{"name":"tree","values":[{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":0,"yes":2},{"depth":null,"leaf":0.425454557,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":null,"leaf":-0.218918934,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":1,"yes":2},{"depth":null,"leaf":-0.212727293,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":1,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":1,"yes":6},{"depth":null,"leaf":0.410982668,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":1,"yes":8},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-0.211034521,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":2,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":4},{"depth":null,"leaf":-0.218530372,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":2,"yes":6},{"depth":null,"leaf":0.0719999969,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":8},{"depth":null,"leaf":0.128571421,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":0.422068983,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":3,"yes":2},{"depth":null,"leaf":0.292982191,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":null,"leaf":-0.195790753,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":4,"yes":2},{"depth":null,"leaf":-0.18925412,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":4,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":4,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":4,"yes":10},{"depth":null,"leaf":0.110490814,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":0.295589149,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.0065466417,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":4,"yes":8},{"depth":null,"leaf":-0.00258299569,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.187741965,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":5,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":5,"yes":4},{"depth":null,"leaf":-0.195117101,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.00513018994,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":5,"yes":6},{"depth":null,"leaf":0.0662105083,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.283106089,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":6,"yes":2},{"depth":null,"leaf":0.234668195,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":null,"leaf":-0.18040958,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":7,"yes":2},{"depth":null,"leaf":-0.173018426,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":7,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":7,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":7,"yes":10},{"depth":null,"leaf":0.0843105838,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":0.236887291,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.0104054213,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":7,"yes":8},{"depth":null,"leaf":0.0072258329,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.171714455,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":8,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":4},{"depth":null,"leaf":-0.179455951,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.0102903834,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":8,"yes":6},{"depth":null,"leaf":0.0586014725,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":8},{"depth":null,"leaf":0.068535842,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.2342868,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":9,"yes":2},{"depth":null,"leaf":0.202173784,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":null,"leaf":-0.169466257,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":10,"yes":2},{"depth":null,"leaf":-0.160806924,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.60000002,"tree_id":10,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":10,"yes":6},{"depth":null,"leaf":0.203813776,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.046239242,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":5.0999999,"tree_id":10,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":10,"yes":10},{"depth":null,"leaf":-0.145340025,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.123540193,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":-0.160442933,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":11,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":11,"yes":4},{"depth":null,"leaf":-0.168171152,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.0149572417,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":11,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":11,"yes":8},{"depth":null,"leaf":0.195176765,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":-0.0395982973,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.204244092,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":12,"yes":2},{"depth":null,"leaf":0.181544691,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":null,"leaf":-0.161027163,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":13,"yes":2},{"depth":null,"leaf":-0.150903225,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":13,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":13,"yes":6},{"depth":null,"leaf":0.18685849,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":13,"yes":8},{"depth":null,"leaf":-0.13117227,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":0.077316612,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":-0.15599905,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":14,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":14,"yes":4},{"depth":null,"leaf":-0.159298271,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.0134122102,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":14,"yes":6},{"depth":null,"leaf":0.0381595641,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":14,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":7,"split":"petal width","split_condition":2,"tree_id":14,"yes":10},{"depth":null,"leaf":-0.00389169785,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.101416349,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.186925322,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":15,"yes":2},{"depth":null,"leaf":0.16711998,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":null,"leaf":-0.154198557,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":16,"yes":2},{"depth":null,"leaf":-0.142255381,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":16,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":16,"yes":6},{"depth":null,"leaf":0.172067791,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":16,"yes":8},{"depth":null,"leaf":-0.121421516,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":0.073711507,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":-0.148049027,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":17,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":17,"yes":4},{"depth":null,"leaf":-0.151937172,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.0142573239,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":17,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":17,"yes":8},{"depth":null,"leaf":0.153471231,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":-0.0392971113,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.168022811,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":18,"yes":2},{"depth":null,"leaf":0.156131104,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":null,"leaf":-0.148197949,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":19,"yes":2},{"depth":null,"leaf":-0.134196311,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":19,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":19,"yes":6},{"depth":null,"leaf":0.160865128,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":19,"yes":8},{"depth":null,"leaf":-0.110056646,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":0.0594659112,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":-0.139969245,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":20,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":20,"yes":4},{"depth":null,"leaf":-0.145403519,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.0147723975,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"sepal width","split_condition":3.20000005,"tree_id":20,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"petal width","split_condition":1.79999995,"tree_id":20,"yes":8},{"depth":null,"leaf":0.0483957976,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.162800461,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":2,"leaf":null,"missing":10,"no":11,"nodeid":7,"parentid":3,"split":"petal length","split_condition":5.19999981,"tree_id":20,"yes":10},{"depth":null,"leaf":-0.0793080404,"missing":null,"no":null,"nodeid":10,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.112726398,"missing":null,"no":null,"nodeid":11,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":21,"yes":2},{"depth":null,"leaf":0.14705947,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":null,"leaf":-0.142660394,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":22,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":22,"yes":4},{"depth":null,"leaf":-0.12631698,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":22,"yes":6},{"depth":null,"leaf":0.151711732,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":22,"yes":8},{"depth":null,"leaf":-0.101206295,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":0.0569678135,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":-0.132955521,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":23,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":23,"yes":4},{"depth":null,"leaf":-0.1391913,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.0150168026,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":23,"yes":6},{"depth":null,"leaf":0.014580613,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":23,"yes":8},{"depth":null,"leaf":0.0168433767,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.154607058,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":24,"yes":2},{"depth":null,"leaf":0.139016181,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":null,"leaf":-0.13727048,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":25,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":25,"yes":4},{"depth":null,"leaf":-0.118402772,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.79999995,"tree_id":25,"yes":6},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":5,"split":"sepal length","split_condition":5.19999981,"tree_id":25,"yes":8},{"depth":null,"leaf":0.0103592547,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":0.152987525,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.0338534117,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.126058802,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":26,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":26,"yes":4},{"depth":null,"leaf":-0.137931168,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":26,"yes":6},{"depth":null,"leaf":0.116194524,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":-0.0252925735,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":0.148122758,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":27,"yes":2},{"depth":null,"leaf":0.131407082,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":null,"leaf":-0.131564274,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":28,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":28,"yes":4},{"depth":null,"leaf":-0.110398278,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":28,"yes":6},{"depth":null,"leaf":0.135915175,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal length","split_condition":6,"tree_id":28,"yes":8},{"depth":null,"leaf":0.01785478,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.0288929809,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.117059968,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":29,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":29,"yes":4},{"depth":null,"leaf":-0.131456167,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":29,"yes":6},{"depth":null,"leaf":0.108389735,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":-0.0236288365,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":0.138706177,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":29,"yes":null}]},{"name":"treeCalcs","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["x","y","depth","children"],"method":"tidy","separation":{"signal":"false"},"type":"tree"}]},{"name":"treeChildren","source":"treeCalcs","transform":[{"as":["childrenObjects"],"fields":["parentid"],"groupby":["parentid"],"ops":["values"],"type":"aggregate"},{"as":"childrenIds","expr":"pluck(datum.childrenObjects,'nodeid')","type":"formula"}]},{"name":"treeAncestors","source":"treeCalcs","transform":[{"as":"treeAncestors","expr":"treeAncestors('treeCalcs', datum.nodeid, 'root')","type":"formula"},{"fields":["treeAncestors"],"type":"flatten"},{"as":"allParents","expr":"datum.treeAncestors.parentid","type":"formula"}]},{"name":"treeChildrenAll","source":"treeAncestors","transform":[{"fields":["allParents","nodeid","name","parentid","x","y","depth","children"],"type":"project"},{"as":["allChildrenObjects","allChildrenCount","id"],"fields":["parentid","parentid","nodeid"],"groupby":["allParents"],"ops":["values","count","min"],"type":"aggregate"},{"as":"allChildrenIds","expr":"pluck(datum.allChildrenObjects,'nodeid')","type":"formula"}]},{"name":"treeClickStoreTemp","source":"treeAncestors","transform":[{"expr":"startingDepth != -1 ? datum.depth <= startingDepth : node != 0 && !isExpanded ? datum.parentid == node: node != 0 && isExpanded ? datum.allParents == node : false","type":"filter"},{"fields":["nodeid","parentid","x","y","depth","children"],"type":"project"},{"fields":["nodeid"],"groupby":["nodeid","parentid","x","y","depth","children"],"ops":["min"],"type":"aggregate"}]},{"name":"treeClickStorePerm","on":[{"insert":"data('treeClickStoreTemp')","trigger":"startingDepth >= 0"},{"insert":"!isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"},{"remove":"isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"}],"values":[]},{"name":"treeLayout","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid)","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["x","y","depth","children"],"method":"tidy","nodeSize":[{"signal":"nodeWidth + spaceBetweenNodes"},{"signal":"nodeHeight+ spaceBetweenLevels"}],"separation":{"signal":"false"},"type":"tree"},{"as":"y","expr":"-1*(datum.y+(height/10))","type":"formula"},{"as":"x","expr":"1*(datum.x+(width/2))","type":"formula"},{"field":"x","signal":"x_extent","type":"extent"},{"field":"y","signal":"y_extent","type":"extent"},{"as":"xscaled","expr":"scale('xscale',datum.x)","type":"formula"},{"as":"parent","expr":"datum.parentid","type":"formula"}]},{"name":"fullTreeLayout","source":"treeLayout","transform":[{"fields":["nodeid"],"from":"treeChildren","key":"parentid","type":"lookup","values":["childrenObjects","childrenIds"]},{"fields":["nodeid"],"from":"treeChildrenAll","key":"allParents","type":"lookup","values":["allChildrenIds","allChildrenObjects"]},{"fields":["nodeid"],"from":"treeCalcs","key":"nodeid","type":"lookup","values":["children"]},{"as":"treeParent","expr":"reverse(pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid'))[1]","type":"formula"},{"as":"isLeaf","expr":"datum.leaf == null","type":"formula"}]},{"name":"splitNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && datum.isLeaf","type":"filter"}]},{"name":"leafNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && !datum.isLeaf","type":"filter"}]},{"name":"links","source":"treeLayout","transform":[{"type":"treelinks"},{"orient":"vertical","shape":"line","sourceX":{"expr":"scale('xscale', datum.source.x)"},"sourceY":{"expr":"scale('yscale', datum.source.y)"},"targetX":{"expr":"scale('xscale', datum.target.x)"},"targetY":{"expr":"scale('yscale', datum.target.y) - scaledNodeHeight"},"type":"linkpath"},{"expr":" indata('treeClickStorePerm', 'nodeid', datum.target.nodeid)","type":"filter"}]},{"name":"yesPaths","source":"links","transform":[{"expr":"datum.source.yes === datum.target.nodeid ","type":"filter"}]},{"name":"noPaths","source":"links","transform":[{"expr":"datum.source.yes !== datum.target.nodeid ","type":"filter"}]}],"height":400,"marks":[{"encode":{"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"update":{"path":{"field":"path"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"}}},"from":{"data":"yesPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"path":{"field":"path"},"stroke":{"value":"#f8f8f2"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"},"strokewidth":{"value":1}}},"from":{"data":"noPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"teal"},"font":{"value":"Calibri"},"fontSize":{"signal":"(18/ span(xdom))*width"},"text":{"value":"yes"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"yesPaths"},"type":"text"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#ff5555"},"font":{"value":"Calibri"},"fontSize":{"signal":"(20/ span(xdom))*width"},"text":{"value":"no"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"noPaths"},"type":"text"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#ff79c6"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"splitNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"bold"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"parent.split + ' <= ' + format(parent.split_condition, '.2f')"},"x":{"signal":"(scaledNodeWidth / 2)"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"},{"encode":{"update":{"align":{"value":"right"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"text":{"signal":"parent.children"},"x":{"signal":"item.mark.group.width - (9/ span(xdom))*width"},"y":{"signal":"item.mark.group.height/2"}}},"interactive":false,"type":"text"}],"name":"splitNode","type":"group"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#44475a"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#ff79c6"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"leafNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"normal"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"'leaf = ' + format(parent.leaf, '.2f')"},"x":{"signal":"scaledNodeWidth / 2"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"}],"name":"leafNode","type":"group"}],"padding":30,"scales":[{"domain":{"signal":"xdom"},"name":"xscale","range":{"signal":"xrange"},"zero":false},{"domain":{"signal":"ydom"},"name":"yscale","range":{"signal":"yrange"},"zero":false}],"signals":[{"name":"selectedTree","value":4},{"name":"node","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.nodeid"}],"value":0},{"name":"nodeHighlight","on":[{"events":[{"markname":"splitNode","type":"mouseover"},{"markname":"leafNode","type":"mouseover"}],"update":"pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid')"},{"events":{"type":"mouseout"},"update":"[0]"}],"value":"[0]"},{"name":"isExpanded","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.children > 0 && indata('treeClickStorePerm', 'nodeid', datum.childrenIds[0]) ? true : false"}],"value":0},{"name":"xrange","update":"[0, width]"},{"name":"yrange","update":"[0, height]"},{"name":"down","on":[{"events":"mousedown","update":"xy()"}],"value":null},{"name":"xcur","on":[{"events":"mousedown","update":"slice(xdom)"}],"value":null},{"name":"ycur","on":[{"events":"mousedown","update":"slice(ydom)"}],"value":null},{"name":"delta","on":[{"events":[{"between":[{"type":"mousedown"},{"source":"window","type":"mouseup"}],"consume":true,"source":"window","type":"mousemove"}],"update":"down ? [down[0]-x(), down[1]-y()] : [0,0]"}],"value":[0,0]},{"name":"anchor","on":[{"events":"wheel","update":"[invert('xscale', x()), invert('yscale', y())]"}],"value":[0,0]},{"name":"xext","update":"[0,width]"},{"name":"yext","update":"[0,height]"},{"name":"zoom","on":[{"events":"wheel!","force":true,"update":"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}],"value":1},{"name":"xdom","on":[{"events":{"signal":"delta"},"update":"[xcur[0] + span(xcur) * delta[0] / width, xcur[1] + span(xcur) * delta[0] / width]"},{"events":{"signal":"zoom"},"update":"[anchor[0] + (xdom[0] - anchor[0]) * zoom, anchor[0] + (xdom[1] - anchor[0]) * zoom]"}],"update":"[x_extent[0] - nodeWidth/ 2, x_extent[1] + nodeWidth / 2]"},{"name":"ydom","on":[{"events":{"signal":"delta"},"update":"[ycur[0] + span(ycur) * delta[1] / height, ycur[1] + span(ycur) * delta[1] / height]"},{"events":{"signal":"zoom"},"update":"[anchor[1] + (ydom[0] - anchor[1]) * zoom, anchor[1] + (ydom[1] - anchor[1]) * zoom]"}],"update":"[y_extent[0] - nodeHeight, y_extent[1] + nodeHeight/3]"},{"name":"scaledNodeWidth","update":"(nodeWidth/ span(xdom))*width"},{"name":"scaledNodeHeight","update":"abs(nodeHeight/ span(ydom))*height"},{"name":"scaledLimit","update":"(20/ span(xdom))*width"},{"name":"spaceBetweenLevels","value":200},{"name":"spaceBetweenNodes","value":10},{"name":"nodeWidth","value":100},{"name":"nodeHeight","value":45},{"name":"startingDepth","on":[{"events":{"throttle":0,"type":"timer"},"update":"-1"}],"value":3}],"width":600}

Most marks accept an :opacity option that you can use to effectively hide the mark:

EXGBoost.plot_tree(
  booster,
  rankdir: :lr,
  index: 4,
  depth: 3,
  splits: [
    text: [opacity: 0],
    rect: [opacity: 0],
    children: [opacity: 1]
  ]
)
{"$schema":"https://vega.github.io/schema/vega/v5.json","autosize":"fit","background":"#282a36","data":[{"name":"tree","values":[{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":0,"yes":2},{"depth":null,"leaf":0.425454557,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":null,"leaf":-0.218918934,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":1,"yes":2},{"depth":null,"leaf":-0.212727293,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":1,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":1,"yes":6},{"depth":null,"leaf":0.410982668,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":1,"yes":8},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-0.211034521,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":2,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":4},{"depth":null,"leaf":-0.218530372,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":2,"yes":6},{"depth":null,"leaf":0.0719999969,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":8},{"depth":null,"leaf":0.128571421,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":0.422068983,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":3,"yes":2},{"depth":null,"leaf":0.292982191,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":null,"leaf":-0.195790753,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":4,"yes":2},{"depth":null,"leaf":-0.18925412,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":4,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":4,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":4,"yes":10},{"depth":null,"leaf":0.110490814,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":0.295589149,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.0065466417,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":4,"yes":8},{"depth":null,"leaf":-0.00258299569,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.187741965,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":5,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":5,"yes":4},{"depth":null,"leaf":-0.195117101,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.00513018994,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":5,"yes":6},{"depth":null,"leaf":0.0662105083,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.283106089,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":6,"yes":2},{"depth":null,"leaf":0.234668195,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":null,"leaf":-0.18040958,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":7,"yes":2},{"depth":null,"leaf":-0.173018426,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":7,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":7,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":7,"yes":10},{"depth":null,"leaf":0.0843105838,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":0.236887291,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.0104054213,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":7,"yes":8},{"depth":null,"leaf":0.0072258329,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.171714455,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":8,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":4},{"depth":null,"leaf":-0.179455951,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.0102903834,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":8,"yes":6},{"depth":null,"leaf":0.0586014725,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":8},{"depth":null,"leaf":0.068535842,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.2342868,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":9,"yes":2},{"depth":null,"leaf":0.202173784,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":null,"leaf":-0.169466257,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":10,"yes":2},{"depth":null,"leaf":-0.160806924,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.60000002,"tree_id":10,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":10,"yes":6},{"depth":null,"leaf":0.203813776,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.046239242,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":5.0999999,"tree_id":10,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":10,"yes":10},{"depth":null,"leaf":-0.145340025,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.123540193,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":-0.160442933,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":11,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":11,"yes":4},{"depth":null,"leaf":-0.168171152,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.0149572417,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":11,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":11,"yes":8},{"depth":null,"leaf":0.195176765,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":-0.0395982973,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.204244092,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":12,"yes":2},{"depth":null,"leaf":0.181544691,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":null,"leaf":-0.161027163,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":13,"yes":2},{"depth":null,"leaf":-0.150903225,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":13,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":13,"yes":6},{"depth":null,"leaf":0.18685849,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":13,"yes":8},{"depth":null,"leaf":-0.13117227,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":0.077316612,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":-0.15599905,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":14,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":14,"yes":4},{"depth":null,"leaf":-0.159298271,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.0134122102,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":14,"yes":6},{"depth":null,"leaf":0.0381595641,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":14,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":7,"split":"petal width","split_condition":2,"tree_id":14,"yes":10},{"depth":null,"leaf":-0.00389169785,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.101416349,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.186925322,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":15,"yes":2},{"depth":null,"leaf":0.16711998,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":null,"leaf":-0.154198557,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":16,"yes":2},{"depth":null,"leaf":-0.142255381,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":16,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":16,"yes":6},{"depth":null,"leaf":0.172067791,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":16,"yes":8},{"depth":null,"leaf":-0.121421516,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":0.073711507,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":-0.148049027,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":17,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":17,"yes":4},{"depth":null,"leaf":-0.151937172,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.0142573239,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":17,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":17,"yes":8},{"depth":null,"leaf":0.153471231,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":-0.0392971113,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.168022811,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":18,"yes":2},{"depth":null,"leaf":0.156131104,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":null,"leaf":-0.148197949,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":19,"yes":2},{"depth":null,"leaf":-0.134196311,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":19,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":19,"yes":6},{"depth":null,"leaf":0.160865128,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":19,"yes":8},{"depth":null,"leaf":-0.110056646,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":0.0594659112,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":-0.139969245,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":20,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":20,"yes":4},{"depth":null,"leaf":-0.145403519,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.0147723975,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"sepal width","split_condition":3.20000005,"tree_id":20,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"petal width","split_condition":1.79999995,"tree_id":20,"yes":8},{"depth":null,"leaf":0.0483957976,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.162800461,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":2,"leaf":null,"missing":10,"no":11,"nodeid":7,"parentid":3,"split":"petal length","split_condition":5.19999981,"tree_id":20,"yes":10},{"depth":null,"leaf":-0.0793080404,"missing":null,"no":null,"nodeid":10,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.112726398,"missing":null,"no":null,"nodeid":11,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":21,"yes":2},{"depth":null,"leaf":0.14705947,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":null,"leaf":-0.142660394,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":22,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":22,"yes":4},{"depth":null,"leaf":-0.12631698,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":22,"yes":6},{"depth":null,"leaf":0.151711732,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":22,"yes":8},{"depth":null,"leaf":-0.101206295,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":0.0569678135,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":-0.132955521,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":23,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":23,"yes":4},{"depth":null,"leaf":-0.1391913,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.0150168026,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":23,"yes":6},{"depth":null,"leaf":0.014580613,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":23,"yes":8},{"depth":null,"leaf":0.0168433767,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.154607058,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":24,"yes":2},{"depth":null,"leaf":0.139016181,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":null,"leaf":-0.13727048,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":25,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":25,"yes":4},{"depth":null,"leaf":-0.118402772,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.79999995,"tree_id":25,"yes":6},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":5,"split":"sepal length","split_condition":5.19999981,"tree_id":25,"yes":8},{"depth":null,"leaf":0.0103592547,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":0.152987525,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.0338534117,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.126058802,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":26,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":26,"yes":4},{"depth":null,"leaf":-0.137931168,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":26,"yes":6},{"depth":null,"leaf":0.116194524,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":-0.0252925735,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":0.148122758,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":27,"yes":2},{"depth":null,"leaf":0.131407082,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":null,"leaf":-0.131564274,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":28,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":28,"yes":4},{"depth":null,"leaf":-0.110398278,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":28,"yes":6},{"depth":null,"leaf":0.135915175,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal length","split_condition":6,"tree_id":28,"yes":8},{"depth":null,"leaf":0.01785478,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.0288929809,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.117059968,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":29,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":29,"yes":4},{"depth":null,"leaf":-0.131456167,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":29,"yes":6},{"depth":null,"leaf":0.108389735,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":-0.0236288365,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":0.138706177,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":29,"yes":null}]},{"name":"treeCalcs","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["y","x","depth","children"],"method":"tidy","separation":{"signal":"false"},"type":"tree"}]},{"name":"treeChildren","source":"treeCalcs","transform":[{"as":["childrenObjects"],"fields":["parentid"],"groupby":["parentid"],"ops":["values"],"type":"aggregate"},{"as":"childrenIds","expr":"pluck(datum.childrenObjects,'nodeid')","type":"formula"}]},{"name":"treeAncestors","source":"treeCalcs","transform":[{"as":"treeAncestors","expr":"treeAncestors('treeCalcs', datum.nodeid, 'root')","type":"formula"},{"fields":["treeAncestors"],"type":"flatten"},{"as":"allParents","expr":"datum.treeAncestors.parentid","type":"formula"}]},{"name":"treeChildrenAll","source":"treeAncestors","transform":[{"fields":["allParents","nodeid","name","parentid","x","y","depth","children"],"type":"project"},{"as":["allChildrenObjects","allChildrenCount","id"],"fields":["parentid","parentid","nodeid"],"groupby":["allParents"],"ops":["values","count","min"],"type":"aggregate"},{"as":"allChildrenIds","expr":"pluck(datum.allChildrenObjects,'nodeid')","type":"formula"}]},{"name":"treeClickStoreTemp","source":"treeAncestors","transform":[{"expr":"startingDepth != -1 ? datum.depth <= startingDepth : node != 0 && !isExpanded ? datum.parentid == node: node != 0 && isExpanded ? datum.allParents == node : false","type":"filter"},{"fields":["nodeid","parentid","x","y","depth","children"],"type":"project"},{"fields":["nodeid"],"groupby":["nodeid","parentid","x","y","depth","children"],"ops":["min"],"type":"aggregate"}]},{"name":"treeClickStorePerm","on":[{"insert":"data('treeClickStoreTemp')","trigger":"startingDepth >= 0"},{"insert":"!isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"},{"remove":"isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"}],"values":[]},{"name":"treeLayout","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid)","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["y","x","depth","children"],"method":"tidy","nodeSize":[{"signal":"nodeWidth + spaceBetweenNodes"},{"signal":"nodeHeight+ spaceBetweenLevels"}],"separation":{"signal":"false"},"type":"tree"},{"as":"y","expr":"1*(datum.y+(height/10))","type":"formula"},{"as":"x","expr":"1*(datum.x+(width/2))","type":"formula"},{"field":"x","signal":"x_extent","type":"extent"},{"field":"y","signal":"y_extent","type":"extent"},{"as":"xscaled","expr":"scale('xscale',datum.x)","type":"formula"},{"as":"parent","expr":"datum.parentid","type":"formula"}]},{"name":"fullTreeLayout","source":"treeLayout","transform":[{"fields":["nodeid"],"from":"treeChildren","key":"parentid","type":"lookup","values":["childrenObjects","childrenIds"]},{"fields":["nodeid"],"from":"treeChildrenAll","key":"allParents","type":"lookup","values":["allChildrenIds","allChildrenObjects"]},{"fields":["nodeid"],"from":"treeCalcs","key":"nodeid","type":"lookup","values":["children"]},{"as":"treeParent","expr":"reverse(pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid'))[1]","type":"formula"},{"as":"isLeaf","expr":"datum.leaf == null","type":"formula"}]},{"name":"splitNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && datum.isLeaf","type":"filter"}]},{"name":"leafNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && !datum.isLeaf","type":"filter"}]},{"name":"links","source":"treeLayout","transform":[{"type":"treelinks"},{"orient":"horizontal","shape":"line","sourceX":{"expr":"scale('xscale', datum.source.x) + scaledNodeWidth/2"},"sourceY":{"expr":"scale('yscale', datum.source.y) - scaledNodeHeight/2"},"targetX":{"expr":"scale('xscale', datum.target.x) - scaledNodeWidth/2"},"targetY":{"expr":"scale('yscale', datum.target.y) - scaledNodeHeight/2"},"type":"linkpath"},{"expr":" indata('treeClickStorePerm', 'nodeid', datum.target.nodeid)","type":"filter"}]},{"name":"yesPaths","source":"links","transform":[{"expr":"datum.source.yes === datum.target.nodeid ","type":"filter"}]},{"name":"noPaths","source":"links","transform":[{"expr":"datum.source.yes !== datum.target.nodeid ","type":"filter"}]}],"height":400,"marks":[{"encode":{"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"update":{"path":{"field":"path"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"}}},"from":{"data":"yesPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"path":{"field":"path"},"stroke":{"value":"#f8f8f2"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"},"strokewidth":{"value":1}}},"from":{"data":"noPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#50fa7b"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"yes"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y-nodeWidth/3) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"yesPaths"},"type":"text"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#ff5555"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"no"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"noPaths"},"type":"text"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#ff79c6"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":0},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"splitNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"bold"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"opacity":{"value":0},"text":{"signal":"parent.split + ' <= ' + format(parent.split_condition, '.2f')"},"x":{"signal":"(scaledNodeWidth / 2)"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"},{"encode":{"update":{"align":{"value":"right"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"opacity":{"value":1},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"text":{"signal":"parent.children"},"x":{"signal":"item.mark.group.width - (9/ span(xdom))*width"},"y":{"signal":"item.mark.group.height/2"}}},"interactive":false,"type":"text"}],"name":"splitNode","type":"group"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#44475a"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#ff79c6"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"leafNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"normal"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"'leaf = ' + format(parent.leaf, '.2f')"},"x":{"signal":"scaledNodeWidth / 2"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"}],"name":"leafNode","type":"group"}],"padding":30,"scales":[{"domain":{"signal":"xdom"},"name":"xscale","range":{"signal":"xrange"},"zero":false},{"domain":{"signal":"ydom"},"name":"yscale","range":{"signal":"yrange"},"zero":false}],"signals":[{"name":"selectedTree","value":4},{"name":"node","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.nodeid"}],"value":0},{"name":"nodeHighlight","on":[{"events":[{"markname":"splitNode","type":"mouseover"},{"markname":"leafNode","type":"mouseover"}],"update":"pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid')"},{"events":{"type":"mouseout"},"update":"[0]"}],"value":"[0]"},{"name":"isExpanded","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.children > 0 && indata('treeClickStorePerm', 'nodeid', datum.childrenIds[0]) ? true : false"}],"value":0},{"name":"xrange","update":"[0, width]"},{"name":"yrange","update":"[0, height]"},{"name":"down","on":[{"events":"mousedown","update":"xy()"}],"value":null},{"name":"xcur","on":[{"events":"mousedown","update":"slice(xdom)"}],"value":null},{"name":"ycur","on":[{"events":"mousedown","update":"slice(ydom)"}],"value":null},{"name":"delta","on":[{"events":[{"between":[{"type":"mousedown"},{"source":"window","type":"mouseup"}],"consume":true,"source":"window","type":"mousemove"}],"update":"down ? [down[0]-x(), down[1]-y()] : [0,0]"}],"value":[0,0]},{"name":"anchor","on":[{"events":"wheel","update":"[invert('xscale', x()), invert('yscale', y())]"}],"value":[0,0]},{"name":"xext","update":"[0,width]"},{"name":"yext","update":"[0,height]"},{"name":"zoom","on":[{"events":"wheel!","force":true,"update":"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}],"value":1},{"name":"xdom","on":[{"events":{"signal":"delta"},"update":"[xcur[0] + span(xcur) * delta[0] / width, xcur[1] + span(xcur) * delta[0] / width]"},{"events":{"signal":"zoom"},"update":"[anchor[0] + (xdom[0] - anchor[0]) * zoom, anchor[0] + (xdom[1] - anchor[0]) * zoom]"}],"update":"[x_extent[0] - nodeWidth/ 2, x_extent[1] + nodeWidth / 2]"},{"name":"ydom","on":[{"events":{"signal":"delta"},"update":"[ycur[0] + span(ycur) * delta[1] / height, ycur[1] + span(ycur) * delta[1] / height]"},{"events":{"signal":"zoom"},"update":"[anchor[1] + (ydom[0] - anchor[1]) * zoom, anchor[1] + (ydom[1] - anchor[1]) * zoom]"}],"update":"[y_extent[0] - nodeHeight, y_extent[1] + nodeHeight/3]"},{"name":"scaledNodeWidth","update":"(nodeWidth/ span(xdom))*width"},{"name":"scaledNodeHeight","update":"abs(nodeHeight/ span(ydom))*height"},{"name":"scaledLimit","update":"(20/ span(xdom))*width"},{"name":"spaceBetweenLevels","value":100},{"name":"spaceBetweenNodes","value":10},{"name":"nodeWidth","value":100},{"name":"nodeHeight","value":45},{"name":"startingDepth","on":[{"events":{"throttle":0,"type":"timer"},"update":"-1"}],"value":3}],"width":600}

And text marks accept normal text options such as :fill, :font_size, and :font:

EXGBoost.plot_tree(
  booster,
  node_width: 250,
  splits: [
    text: [font: "Helvetica Neue", font_size: 20, fill: "orange"]
  ],
  space_between: [levels: 20]
)
{"$schema":"https://vega.github.io/schema/vega/v5.json","autosize":"fit","background":"#282a36","data":[{"name":"tree","values":[{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":0,"yes":2},{"depth":null,"leaf":0.425454557,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":null,"leaf":-0.218918934,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":1,"yes":2},{"depth":null,"leaf":-0.212727293,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":1,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":1,"yes":6},{"depth":null,"leaf":0.410982668,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":1,"yes":8},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-0.211034521,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":2,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":4},{"depth":null,"leaf":-0.218530372,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":2,"yes":6},{"depth":null,"leaf":0.0719999969,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":8},{"depth":null,"leaf":0.128571421,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":0.422068983,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":3,"yes":2},{"depth":null,"leaf":0.292982191,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":null,"leaf":-0.195790753,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":4,"yes":2},{"depth":null,"leaf":-0.18925412,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":4,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":4,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":4,"yes":10},{"depth":null,"leaf":0.110490814,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":0.295589149,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.0065466417,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":4,"yes":8},{"depth":null,"leaf":-0.00258299569,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.187741965,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":5,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":5,"yes":4},{"depth":null,"leaf":-0.195117101,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.00513018994,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":5,"yes":6},{"depth":null,"leaf":0.0662105083,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.283106089,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":6,"yes":2},{"depth":null,"leaf":0.234668195,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":null,"leaf":-0.18040958,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":7,"yes":2},{"depth":null,"leaf":-0.173018426,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":7,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":7,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":7,"yes":10},{"depth":null,"leaf":0.0843105838,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":0.236887291,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.0104054213,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":7,"yes":8},{"depth":null,"leaf":0.0072258329,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.171714455,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":8,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":4},{"depth":null,"leaf":-0.179455951,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.0102903834,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":8,"yes":6},{"depth":null,"leaf":0.0586014725,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":8},{"depth":null,"leaf":0.068535842,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.2342868,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":9,"yes":2},{"depth":null,"leaf":0.202173784,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":null,"leaf":-0.169466257,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":10,"yes":2},{"depth":null,"leaf":-0.160806924,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.60000002,"tree_id":10,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":10,"yes":6},{"depth":null,"leaf":0.203813776,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.046239242,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":5.0999999,"tree_id":10,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":10,"yes":10},{"depth":null,"leaf":-0.145340025,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.123540193,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":-0.160442933,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":11,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":11,"yes":4},{"depth":null,"leaf":-0.168171152,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.0149572417,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":11,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":11,"yes":8},{"depth":null,"leaf":0.195176765,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":-0.0395982973,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.204244092,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":12,"yes":2},{"depth":null,"leaf":0.181544691,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":null,"leaf":-0.161027163,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":13,"yes":2},{"depth":null,"leaf":-0.150903225,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":13,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":13,"yes":6},{"depth":null,"leaf":0.18685849,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":13,"yes":8},{"depth":null,"leaf":-0.13117227,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":0.077316612,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":-0.15599905,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":14,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":14,"yes":4},{"depth":null,"leaf":-0.159298271,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.0134122102,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":14,"yes":6},{"depth":null,"leaf":0.0381595641,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":14,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":7,"split":"petal width","split_condition":2,"tree_id":14,"yes":10},{"depth":null,"leaf":-0.00389169785,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.101416349,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.186925322,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":15,"yes":2},{"depth":null,"leaf":0.16711998,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":null,"leaf":-0.154198557,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":16,"yes":2},{"depth":null,"leaf":-0.142255381,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":16,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":16,"yes":6},{"depth":null,"leaf":0.172067791,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":16,"yes":8},{"depth":null,"leaf":-0.121421516,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":0.073711507,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":-0.148049027,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":17,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":17,"yes":4},{"depth":null,"leaf":-0.151937172,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.0142573239,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":17,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":17,"yes":8},{"depth":null,"leaf":0.153471231,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":-0.0392971113,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.168022811,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":18,"yes":2},{"depth":null,"leaf":0.156131104,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":null,"leaf":-0.148197949,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":19,"yes":2},{"depth":null,"leaf":-0.134196311,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":19,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":19,"yes":6},{"depth":null,"leaf":0.160865128,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":19,"yes":8},{"depth":null,"leaf":-0.110056646,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":0.0594659112,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":-0.139969245,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":20,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":20,"yes":4},{"depth":null,"leaf":-0.145403519,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.0147723975,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"sepal width","split_condition":3.20000005,"tree_id":20,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"petal width","split_condition":1.79999995,"tree_id":20,"yes":8},{"depth":null,"leaf":0.0483957976,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.162800461,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":2,"leaf":null,"missing":10,"no":11,"nodeid":7,"parentid":3,"split":"petal length","split_condition":5.19999981,"tree_id":20,"yes":10},{"depth":null,"leaf":-0.0793080404,"missing":null,"no":null,"nodeid":10,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.112726398,"missing":null,"no":null,"nodeid":11,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":21,"yes":2},{"depth":null,"leaf":0.14705947,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":null,"leaf":-0.142660394,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":22,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":22,"yes":4},{"depth":null,"leaf":-0.12631698,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":22,"yes":6},{"depth":null,"leaf":0.151711732,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":22,"yes":8},{"depth":null,"leaf":-0.101206295,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":0.0569678135,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":-0.132955521,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":23,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":23,"yes":4},{"depth":null,"leaf":-0.1391913,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.0150168026,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":23,"yes":6},{"depth":null,"leaf":0.014580613,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":23,"yes":8},{"depth":null,"leaf":0.0168433767,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.154607058,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":24,"yes":2},{"depth":null,"leaf":0.139016181,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":null,"leaf":-0.13727048,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":25,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":25,"yes":4},{"depth":null,"leaf":-0.118402772,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.79999995,"tree_id":25,"yes":6},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":5,"split":"sepal length","split_condition":5.19999981,"tree_id":25,"yes":8},{"depth":null,"leaf":0.0103592547,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":0.152987525,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.0338534117,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.126058802,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":26,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":26,"yes":4},{"depth":null,"leaf":-0.137931168,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":26,"yes":6},{"depth":null,"leaf":0.116194524,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":-0.0252925735,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":0.148122758,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":27,"yes":2},{"depth":null,"leaf":0.131407082,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":null,"leaf":-0.131564274,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":28,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":28,"yes":4},{"depth":null,"leaf":-0.110398278,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":28,"yes":6},{"depth":null,"leaf":0.135915175,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal length","split_condition":6,"tree_id":28,"yes":8},{"depth":null,"leaf":0.01785478,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.0288929809,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.117059968,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":29,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":29,"yes":4},{"depth":null,"leaf":-0.131456167,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":29,"yes":6},{"depth":null,"leaf":0.108389735,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":-0.0236288365,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":0.138706177,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":29,"yes":null}]},{"name":"treeCalcs","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["x","y","depth","children"],"method":"tidy","separation":{"signal":"false"},"type":"tree"}]},{"name":"treeChildren","source":"treeCalcs","transform":[{"as":["childrenObjects"],"fields":["parentid"],"groupby":["parentid"],"ops":["values"],"type":"aggregate"},{"as":"childrenIds","expr":"pluck(datum.childrenObjects,'nodeid')","type":"formula"}]},{"name":"treeAncestors","source":"treeCalcs","transform":[{"as":"treeAncestors","expr":"treeAncestors('treeCalcs', datum.nodeid, 'root')","type":"formula"},{"fields":["treeAncestors"],"type":"flatten"},{"as":"allParents","expr":"datum.treeAncestors.parentid","type":"formula"}]},{"name":"treeChildrenAll","source":"treeAncestors","transform":[{"fields":["allParents","nodeid","name","parentid","x","y","depth","children"],"type":"project"},{"as":["allChildrenObjects","allChildrenCount","id"],"fields":["parentid","parentid","nodeid"],"groupby":["allParents"],"ops":["values","count","min"],"type":"aggregate"},{"as":"allChildrenIds","expr":"pluck(datum.allChildrenObjects,'nodeid')","type":"formula"}]},{"name":"treeClickStoreTemp","source":"treeAncestors","transform":[{"expr":"startingDepth != -1 ? datum.depth <= startingDepth : node != 0 && !isExpanded ? datum.parentid == node: node != 0 && isExpanded ? datum.allParents == node : false","type":"filter"},{"fields":["nodeid","parentid","x","y","depth","children"],"type":"project"},{"fields":["nodeid"],"groupby":["nodeid","parentid","x","y","depth","children"],"ops":["min"],"type":"aggregate"}]},{"name":"treeClickStorePerm","on":[{"insert":"data('treeClickStoreTemp')","trigger":"startingDepth >= 0"},{"insert":"!isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"},{"remove":"isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"}],"values":[]},{"name":"treeLayout","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid)","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["x","y","depth","children"],"method":"tidy","nodeSize":[{"signal":"nodeWidth + spaceBetweenNodes"},{"signal":"nodeHeight+ spaceBetweenLevels"}],"separation":{"signal":"false"},"type":"tree"},{"as":"y","expr":"1*(datum.y+(height/10))","type":"formula"},{"as":"x","expr":"1*(datum.x+(width/2))","type":"formula"},{"field":"x","signal":"x_extent","type":"extent"},{"field":"y","signal":"y_extent","type":"extent"},{"as":"xscaled","expr":"scale('xscale',datum.x)","type":"formula"},{"as":"parent","expr":"datum.parentid","type":"formula"}]},{"name":"fullTreeLayout","source":"treeLayout","transform":[{"fields":["nodeid"],"from":"treeChildren","key":"parentid","type":"lookup","values":["childrenObjects","childrenIds"]},{"fields":["nodeid"],"from":"treeChildrenAll","key":"allParents","type":"lookup","values":["allChildrenIds","allChildrenObjects"]},{"fields":["nodeid"],"from":"treeCalcs","key":"nodeid","type":"lookup","values":["children"]},{"as":"treeParent","expr":"reverse(pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid'))[1]","type":"formula"},{"as":"isLeaf","expr":"datum.leaf == null","type":"formula"}]},{"name":"splitNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && datum.isLeaf","type":"filter"}]},{"name":"leafNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && !datum.isLeaf","type":"filter"}]},{"name":"links","source":"treeLayout","transform":[{"type":"treelinks"},{"orient":"vertical","shape":"line","sourceX":{"expr":"scale('xscale', datum.source.x)"},"sourceY":{"expr":"scale('yscale', datum.source.y)"},"targetX":{"expr":"scale('xscale', datum.target.x)"},"targetY":{"expr":"scale('yscale', datum.target.y) - scaledNodeHeight"},"type":"linkpath"},{"expr":" indata('treeClickStorePerm', 'nodeid', datum.target.nodeid)","type":"filter"}]},{"name":"yesPaths","source":"links","transform":[{"expr":"datum.source.yes === datum.target.nodeid ","type":"filter"}]},{"name":"noPaths","source":"links","transform":[{"expr":"datum.source.yes !== datum.target.nodeid ","type":"filter"}]}],"height":400,"marks":[{"encode":{"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"update":{"path":{"field":"path"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"}}},"from":{"data":"yesPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"path":{"field":"path"},"stroke":{"value":"#f8f8f2"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"},"strokewidth":{"value":1}}},"from":{"data":"noPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#50fa7b"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"yes"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"yesPaths"},"type":"text"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#ff5555"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"no"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"noPaths"},"type":"text"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#ff79c6"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"splitNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"orange"},"font":{"value":"Helvetica Neue"},"fontSize":{"signal":"(20/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"bold"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"parent.split + ' <= ' + format(parent.split_condition, '.2f')"},"x":{"signal":"(scaledNodeWidth / 2)"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"},{"encode":{"update":{"align":{"value":"right"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"stroke":{"value":"#f8f8f2"},"strokewidth":{"value":1},"text":{"signal":"parent.children"},"x":{"signal":"item.mark.group.width - (9/ span(xdom))*width"},"y":{"signal":"item.mark.group.height/2"}}},"interactive":false,"type":"text"}],"name":"splitNode","type":"group"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#44475a"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#ff79c6"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"leafNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#f8f8f2"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"normal"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"'leaf = ' + format(parent.leaf, '.2f')"},"x":{"signal":"scaledNodeWidth / 2"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"}],"name":"leafNode","type":"group"}],"padding":30,"scales":[{"domain":{"signal":"xdom"},"name":"xscale","range":{"signal":"xrange"},"zero":false},{"domain":{"signal":"ydom"},"name":"yscale","range":{"signal":"yrange"},"zero":false}],"signals":[{"name":"selectedTree","value":0},{"name":"node","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.nodeid"}],"value":0},{"name":"nodeHighlight","on":[{"events":[{"markname":"splitNode","type":"mouseover"},{"markname":"leafNode","type":"mouseover"}],"update":"pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid')"},{"events":{"type":"mouseout"},"update":"[0]"}],"value":"[0]"},{"name":"isExpanded","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.children > 0 && indata('treeClickStorePerm', 'nodeid', datum.childrenIds[0]) ? true : false"}],"value":0},{"name":"xrange","update":"[0, width]"},{"name":"yrange","update":"[0, height]"},{"name":"down","on":[{"events":"mousedown","update":"xy()"}],"value":null},{"name":"xcur","on":[{"events":"mousedown","update":"slice(xdom)"}],"value":null},{"name":"ycur","on":[{"events":"mousedown","update":"slice(ydom)"}],"value":null},{"name":"delta","on":[{"events":[{"between":[{"type":"mousedown"},{"source":"window","type":"mouseup"}],"consume":true,"source":"window","type":"mousemove"}],"update":"down ? [down[0]-x(), down[1]-y()] : [0,0]"}],"value":[0,0]},{"name":"anchor","on":[{"events":"wheel","update":"[invert('xscale', x()), invert('yscale', y())]"}],"value":[0,0]},{"name":"xext","update":"[0,width]"},{"name":"yext","update":"[0,height]"},{"name":"zoom","on":[{"events":"wheel!","force":true,"update":"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}],"value":1},{"name":"xdom","on":[{"events":{"signal":"delta"},"update":"[xcur[0] + span(xcur) * delta[0] / width, xcur[1] + span(xcur) * delta[0] / width]"},{"events":{"signal":"zoom"},"update":"[anchor[0] + (xdom[0] - anchor[0]) * zoom, anchor[0] + (xdom[1] - anchor[0]) * zoom]"}],"update":"[x_extent[0] - nodeWidth/ 2, x_extent[1] + nodeWidth / 2]"},{"name":"ydom","on":[{"events":{"signal":"delta"},"update":"[ycur[0] + span(ycur) * delta[1] / height, ycur[1] + span(ycur) * delta[1] / height]"},{"events":{"signal":"zoom"},"update":"[anchor[1] + (ydom[0] - anchor[1]) * zoom, anchor[1] + (ydom[1] - anchor[1]) * zoom]"}],"update":"[y_extent[0] - nodeHeight, y_extent[1] + nodeHeight/3]"},{"name":"scaledNodeWidth","update":"(nodeWidth/ span(xdom))*width"},{"name":"scaledNodeHeight","update":"abs(nodeHeight/ span(ydom))*height"},{"name":"scaledLimit","update":"(20/ span(xdom))*width"},{"name":"spaceBetweenLevels","value":20},{"name":"spaceBetweenNodes","value":160},{"name":"nodeWidth","value":250},{"name":"nodeHeight","value":45},{"name":"startingDepth","on":[{"events":{"throttle":0,"type":"timer"},"update":"-1"}],"value":3}],"width":600}

Styles

There are a set of provided pre-configured settings for the top-level API that you may optionally use. You can refer to the EXGBoost.Plottings.Styles docs to see a gallery of each style in action. You can specify a style with the :style option in EXGBoost.plot_tree/2.

You can still specify custom settings along with using a style. Most styles only specify a subset of the total possible settings, but you are free to specify any other allowed keys and they will be merged with the style. Any options passed explicitly to the option does take precedence over the style options.

For example, let's look at the :solarized_dark style:

EXGBoost.Plotting.solarized_dark() |> Keyword.take([:background, :height]) |> IO.inspect()
EXGBoost.plot_tree(booster, style: :solarized_dark)
[background: "#002b36"]
{"$schema":"https://vega.github.io/schema/vega/v5.json","autosize":"fit","background":"#002b36","data":[{"name":"tree","values":[{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":0,"yes":2},{"depth":null,"leaf":0.425454557,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":null,"leaf":-0.218918934,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":1,"yes":2},{"depth":null,"leaf":-0.212727293,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":1,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":1,"yes":6},{"depth":null,"leaf":0.410982668,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":1,"yes":8},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-0.211034521,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":2,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":4},{"depth":null,"leaf":-0.218530372,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":2,"yes":6},{"depth":null,"leaf":0.0719999969,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":8},{"depth":null,"leaf":0.128571421,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":0.422068983,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":3,"yes":2},{"depth":null,"leaf":0.292982191,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":null,"leaf":-0.195790753,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":4,"yes":2},{"depth":null,"leaf":-0.18925412,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":4,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":4,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":4,"yes":10},{"depth":null,"leaf":0.110490814,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":0.295589149,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.0065466417,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":4,"yes":8},{"depth":null,"leaf":-0.00258299569,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.187741965,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":5,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":5,"yes":4},{"depth":null,"leaf":-0.195117101,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.00513018994,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":5,"yes":6},{"depth":null,"leaf":0.0662105083,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.283106089,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":6,"yes":2},{"depth":null,"leaf":0.234668195,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":null,"leaf":-0.18040958,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":7,"yes":2},{"depth":null,"leaf":-0.173018426,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":7,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":7,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":7,"yes":10},{"depth":null,"leaf":0.0843105838,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":0.236887291,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.0104054213,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":7,"yes":8},{"depth":null,"leaf":0.0072258329,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.171714455,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":8,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":4},{"depth":null,"leaf":-0.179455951,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.0102903834,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":8,"yes":6},{"depth":null,"leaf":0.0586014725,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":8},{"depth":null,"leaf":0.068535842,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.2342868,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":9,"yes":2},{"depth":null,"leaf":0.202173784,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":null,"leaf":-0.169466257,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":10,"yes":2},{"depth":null,"leaf":-0.160806924,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.60000002,"tree_id":10,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":10,"yes":6},{"depth":null,"leaf":0.203813776,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.046239242,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":5.0999999,"tree_id":10,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":10,"yes":10},{"depth":null,"leaf":-0.145340025,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.123540193,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":-0.160442933,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":11,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":11,"yes":4},{"depth":null,"leaf":-0.168171152,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.0149572417,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":11,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":11,"yes":8},{"depth":null,"leaf":0.195176765,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":-0.0395982973,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.204244092,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":12,"yes":2},{"depth":null,"leaf":0.181544691,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":null,"leaf":-0.161027163,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":13,"yes":2},{"depth":null,"leaf":-0.150903225,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":13,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":13,"yes":6},{"depth":null,"leaf":0.18685849,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":13,"yes":8},{"depth":null,"leaf":-0.13117227,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":0.077316612,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":-0.15599905,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":14,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":14,"yes":4},{"depth":null,"leaf":-0.159298271,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.0134122102,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":14,"yes":6},{"depth":null,"leaf":0.0381595641,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":14,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":7,"split":"petal width","split_condition":2,"tree_id":14,"yes":10},{"depth":null,"leaf":-0.00389169785,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.101416349,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.186925322,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":15,"yes":2},{"depth":null,"leaf":0.16711998,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":null,"leaf":-0.154198557,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":16,"yes":2},{"depth":null,"leaf":-0.142255381,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":16,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":16,"yes":6},{"depth":null,"leaf":0.172067791,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":16,"yes":8},{"depth":null,"leaf":-0.121421516,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":0.073711507,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":-0.148049027,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":17,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":17,"yes":4},{"depth":null,"leaf":-0.151937172,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.0142573239,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":17,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":17,"yes":8},{"depth":null,"leaf":0.153471231,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":-0.0392971113,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.168022811,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":18,"yes":2},{"depth":null,"leaf":0.156131104,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":null,"leaf":-0.148197949,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":19,"yes":2},{"depth":null,"leaf":-0.134196311,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":19,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":19,"yes":6},{"depth":null,"leaf":0.160865128,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":19,"yes":8},{"depth":null,"leaf":-0.110056646,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":0.0594659112,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":-0.139969245,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":20,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":20,"yes":4},{"depth":null,"leaf":-0.145403519,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.0147723975,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"sepal width","split_condition":3.20000005,"tree_id":20,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"petal width","split_condition":1.79999995,"tree_id":20,"yes":8},{"depth":null,"leaf":0.0483957976,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.162800461,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":2,"leaf":null,"missing":10,"no":11,"nodeid":7,"parentid":3,"split":"petal length","split_condition":5.19999981,"tree_id":20,"yes":10},{"depth":null,"leaf":-0.0793080404,"missing":null,"no":null,"nodeid":10,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.112726398,"missing":null,"no":null,"nodeid":11,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":21,"yes":2},{"depth":null,"leaf":0.14705947,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":null,"leaf":-0.142660394,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":22,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":22,"yes":4},{"depth":null,"leaf":-0.12631698,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":22,"yes":6},{"depth":null,"leaf":0.151711732,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":22,"yes":8},{"depth":null,"leaf":-0.101206295,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":0.0569678135,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":-0.132955521,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":23,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":23,"yes":4},{"depth":null,"leaf":-0.1391913,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.0150168026,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":23,"yes":6},{"depth":null,"leaf":0.014580613,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":23,"yes":8},{"depth":null,"leaf":0.0168433767,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.154607058,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":24,"yes":2},{"depth":null,"leaf":0.139016181,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":null,"leaf":-0.13727048,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":25,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":25,"yes":4},{"depth":null,"leaf":-0.118402772,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.79999995,"tree_id":25,"yes":6},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":5,"split":"sepal length","split_condition":5.19999981,"tree_id":25,"yes":8},{"depth":null,"leaf":0.0103592547,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":0.152987525,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.0338534117,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.126058802,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":26,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":26,"yes":4},{"depth":null,"leaf":-0.137931168,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":26,"yes":6},{"depth":null,"leaf":0.116194524,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":-0.0252925735,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":0.148122758,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":27,"yes":2},{"depth":null,"leaf":0.131407082,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":null,"leaf":-0.131564274,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":28,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":28,"yes":4},{"depth":null,"leaf":-0.110398278,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":28,"yes":6},{"depth":null,"leaf":0.135915175,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal length","split_condition":6,"tree_id":28,"yes":8},{"depth":null,"leaf":0.01785478,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.0288929809,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.117059968,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":29,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":29,"yes":4},{"depth":null,"leaf":-0.131456167,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":29,"yes":6},{"depth":null,"leaf":0.108389735,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":-0.0236288365,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":0.138706177,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":29,"yes":null}]},{"name":"treeCalcs","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["x","y","depth","children"],"method":"tidy","separation":{"signal":"false"},"type":"tree"}]},{"name":"treeChildren","source":"treeCalcs","transform":[{"as":["childrenObjects"],"fields":["parentid"],"groupby":["parentid"],"ops":["values"],"type":"aggregate"},{"as":"childrenIds","expr":"pluck(datum.childrenObjects,'nodeid')","type":"formula"}]},{"name":"treeAncestors","source":"treeCalcs","transform":[{"as":"treeAncestors","expr":"treeAncestors('treeCalcs', datum.nodeid, 'root')","type":"formula"},{"fields":["treeAncestors"],"type":"flatten"},{"as":"allParents","expr":"datum.treeAncestors.parentid","type":"formula"}]},{"name":"treeChildrenAll","source":"treeAncestors","transform":[{"fields":["allParents","nodeid","name","parentid","x","y","depth","children"],"type":"project"},{"as":["allChildrenObjects","allChildrenCount","id"],"fields":["parentid","parentid","nodeid"],"groupby":["allParents"],"ops":["values","count","min"],"type":"aggregate"},{"as":"allChildrenIds","expr":"pluck(datum.allChildrenObjects,'nodeid')","type":"formula"}]},{"name":"treeClickStoreTemp","source":"treeAncestors","transform":[{"expr":"startingDepth != -1 ? datum.depth <= startingDepth : node != 0 && !isExpanded ? datum.parentid == node: node != 0 && isExpanded ? datum.allParents == node : false","type":"filter"},{"fields":["nodeid","parentid","x","y","depth","children"],"type":"project"},{"fields":["nodeid"],"groupby":["nodeid","parentid","x","y","depth","children"],"ops":["min"],"type":"aggregate"}]},{"name":"treeClickStorePerm","on":[{"insert":"data('treeClickStoreTemp')","trigger":"startingDepth >= 0"},{"insert":"!isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"},{"remove":"isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"}],"values":[]},{"name":"treeLayout","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid)","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["x","y","depth","children"],"method":"tidy","nodeSize":[{"signal":"nodeWidth + spaceBetweenNodes"},{"signal":"nodeHeight+ spaceBetweenLevels"}],"separation":{"signal":"false"},"type":"tree"},{"as":"y","expr":"1*(datum.y+(height/10))","type":"formula"},{"as":"x","expr":"1*(datum.x+(width/2))","type":"formula"},{"field":"x","signal":"x_extent","type":"extent"},{"field":"y","signal":"y_extent","type":"extent"},{"as":"xscaled","expr":"scale('xscale',datum.x)","type":"formula"},{"as":"parent","expr":"datum.parentid","type":"formula"}]},{"name":"fullTreeLayout","source":"treeLayout","transform":[{"fields":["nodeid"],"from":"treeChildren","key":"parentid","type":"lookup","values":["childrenObjects","childrenIds"]},{"fields":["nodeid"],"from":"treeChildrenAll","key":"allParents","type":"lookup","values":["allChildrenIds","allChildrenObjects"]},{"fields":["nodeid"],"from":"treeCalcs","key":"nodeid","type":"lookup","values":["children"]},{"as":"treeParent","expr":"reverse(pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid'))[1]","type":"formula"},{"as":"isLeaf","expr":"datum.leaf == null","type":"formula"}]},{"name":"splitNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && datum.isLeaf","type":"filter"}]},{"name":"leafNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && !datum.isLeaf","type":"filter"}]},{"name":"links","source":"treeLayout","transform":[{"type":"treelinks"},{"orient":"vertical","shape":"line","sourceX":{"expr":"scale('xscale', datum.source.x)"},"sourceY":{"expr":"scale('yscale', datum.source.y)"},"targetX":{"expr":"scale('xscale', datum.target.x)"},"targetY":{"expr":"scale('yscale', datum.target.y) - scaledNodeHeight"},"type":"linkpath"},{"expr":" indata('treeClickStorePerm', 'nodeid', datum.target.nodeid)","type":"filter"}]},{"name":"yesPaths","source":"links","transform":[{"expr":"datum.source.yes === datum.target.nodeid ","type":"filter"}]},{"name":"noPaths","source":"links","transform":[{"expr":"datum.source.yes !== datum.target.nodeid ","type":"filter"}]}],"height":400,"marks":[{"encode":{"stroke":{"value":"#657b83"},"strokewidth":{"value":1},"update":{"path":{"field":"path"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"}}},"from":{"data":"yesPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"path":{"field":"path"},"stroke":{"value":"#657b83"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"},"strokewidth":{"value":1}}},"from":{"data":"noPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#859900"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"yes"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"yesPaths"},"type":"text"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#dc322f"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"no"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"noPaths"},"type":"text"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#586e75"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#657b83"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"splitNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#839496"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"bold"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"parent.split + ' <= ' + format(parent.split_condition, '.2f')"},"x":{"signal":"(scaledNodeWidth / 2)"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"},{"encode":{"update":{"align":{"value":"right"},"baseline":{"value":"middle"},"fill":{"value":"#657b83"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"stroke":{"value":"#657b83"},"strokewidth":{"value":1},"text":{"signal":"parent.children"},"x":{"signal":"item.mark.group.width - (9/ span(xdom))*width"},"y":{"signal":"item.mark.group.height/2"}}},"interactive":false,"type":"text"}],"name":"splitNode","type":"group"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#073642"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#586e75"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"leafNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#839496"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"normal"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"'leaf = ' + format(parent.leaf, '.2f')"},"x":{"signal":"scaledNodeWidth / 2"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"}],"name":"leafNode","type":"group"}],"padding":30,"scales":[{"domain":{"signal":"xdom"},"name":"xscale","range":{"signal":"xrange"},"zero":false},{"domain":{"signal":"ydom"},"name":"yscale","range":{"signal":"yrange"},"zero":false}],"signals":[{"name":"selectedTree","value":0},{"name":"node","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.nodeid"}],"value":0},{"name":"nodeHighlight","on":[{"events":[{"markname":"splitNode","type":"mouseover"},{"markname":"leafNode","type":"mouseover"}],"update":"pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid')"},{"events":{"type":"mouseout"},"update":"[0]"}],"value":"[0]"},{"name":"isExpanded","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.children > 0 && indata('treeClickStorePerm', 'nodeid', datum.childrenIds[0]) ? true : false"}],"value":0},{"name":"xrange","update":"[0, width]"},{"name":"yrange","update":"[0, height]"},{"name":"down","on":[{"events":"mousedown","update":"xy()"}],"value":null},{"name":"xcur","on":[{"events":"mousedown","update":"slice(xdom)"}],"value":null},{"name":"ycur","on":[{"events":"mousedown","update":"slice(ydom)"}],"value":null},{"name":"delta","on":[{"events":[{"between":[{"type":"mousedown"},{"source":"window","type":"mouseup"}],"consume":true,"source":"window","type":"mousemove"}],"update":"down ? [down[0]-x(), down[1]-y()] : [0,0]"}],"value":[0,0]},{"name":"anchor","on":[{"events":"wheel","update":"[invert('xscale', x()), invert('yscale', y())]"}],"value":[0,0]},{"name":"xext","update":"[0,width]"},{"name":"yext","update":"[0,height]"},{"name":"zoom","on":[{"events":"wheel!","force":true,"update":"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}],"value":1},{"name":"xdom","on":[{"events":{"signal":"delta"},"update":"[xcur[0] + span(xcur) * delta[0] / width, xcur[1] + span(xcur) * delta[0] / width]"},{"events":{"signal":"zoom"},"update":"[anchor[0] + (xdom[0] - anchor[0]) * zoom, anchor[0] + (xdom[1] - anchor[0]) * zoom]"}],"update":"[x_extent[0] - nodeWidth/ 2, x_extent[1] + nodeWidth / 2]"},{"name":"ydom","on":[{"events":{"signal":"delta"},"update":"[ycur[0] + span(ycur) * delta[1] / height, ycur[1] + span(ycur) * delta[1] / height]"},{"events":{"signal":"zoom"},"update":"[anchor[1] + (ydom[0] - anchor[1]) * zoom, anchor[1] + (ydom[1] - anchor[1]) * zoom]"}],"update":"[y_extent[0] - nodeHeight, y_extent[1] + nodeHeight/3]"},{"name":"scaledNodeWidth","update":"(nodeWidth/ span(xdom))*width"},{"name":"scaledNodeHeight","update":"abs(nodeHeight/ span(ydom))*height"},{"name":"scaledLimit","update":"(20/ span(xdom))*width"},{"name":"spaceBetweenLevels","value":100},{"name":"spaceBetweenNodes","value":10},{"name":"nodeWidth","value":100},{"name":"nodeHeight","value":45},{"name":"startingDepth","on":[{"events":{"throttle":0,"type":"timer"},"update":"-1"}],"value":3}],"width":600}

You can see that it defines a background color of #002b36 but does not restrict what the height must be.

EXGBoost.plot_tree(booster, style: :solarized_dark, background: "white", height: 200)
{"$schema":"https://vega.github.io/schema/vega/v5.json","autosize":"fit","background":"white","data":[{"name":"tree","values":[{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":0,"yes":2},{"depth":null,"leaf":0.425454557,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":null,"leaf":-0.218918934,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":1,"yes":2},{"depth":null,"leaf":-0.212727293,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":1,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":1,"yes":6},{"depth":null,"leaf":0.410982668,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":1,"yes":8},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-0.211034521,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":2,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":4},{"depth":null,"leaf":-0.218530372,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":2,"yes":6},{"depth":null,"leaf":0.0719999969,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":8},{"depth":null,"leaf":0.128571421,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":0.422068983,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":3,"yes":2},{"depth":null,"leaf":0.292982191,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":null,"leaf":-0.195790753,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":4,"yes":2},{"depth":null,"leaf":-0.18925412,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":4,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":4,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":4,"yes":10},{"depth":null,"leaf":0.110490814,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":0.295589149,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.0065466417,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":4,"yes":8},{"depth":null,"leaf":-0.00258299569,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.187741965,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":5,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":5,"yes":4},{"depth":null,"leaf":-0.195117101,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.00513018994,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":5,"yes":6},{"depth":null,"leaf":0.0662105083,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.283106089,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":6,"yes":2},{"depth":null,"leaf":0.234668195,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":null,"leaf":-0.18040958,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":7,"yes":2},{"depth":null,"leaf":-0.173018426,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":7,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":7,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":7,"yes":10},{"depth":null,"leaf":0.0843105838,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":0.236887291,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.0104054213,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":7,"yes":8},{"depth":null,"leaf":0.0072258329,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.171714455,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":8,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":4},{"depth":null,"leaf":-0.179455951,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.0102903834,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":8,"yes":6},{"depth":null,"leaf":0.0586014725,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":8},{"depth":null,"leaf":0.068535842,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.2342868,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":9,"yes":2},{"depth":null,"leaf":0.202173784,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":null,"leaf":-0.169466257,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":10,"yes":2},{"depth":null,"leaf":-0.160806924,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.60000002,"tree_id":10,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":10,"yes":6},{"depth":null,"leaf":0.203813776,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.046239242,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":5.0999999,"tree_id":10,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":10,"yes":10},{"depth":null,"leaf":-0.145340025,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.123540193,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":-0.160442933,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":11,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":11,"yes":4},{"depth":null,"leaf":-0.168171152,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.0149572417,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":11,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":11,"yes":8},{"depth":null,"leaf":0.195176765,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":-0.0395982973,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.204244092,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":12,"yes":2},{"depth":null,"leaf":0.181544691,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":null,"leaf":-0.161027163,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":13,"yes":2},{"depth":null,"leaf":-0.150903225,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":13,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":13,"yes":6},{"depth":null,"leaf":0.18685849,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":13,"yes":8},{"depth":null,"leaf":-0.13117227,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":0.077316612,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":-0.15599905,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":14,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":14,"yes":4},{"depth":null,"leaf":-0.159298271,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.0134122102,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":14,"yes":6},{"depth":null,"leaf":0.0381595641,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":14,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":7,"split":"petal width","split_condition":2,"tree_id":14,"yes":10},{"depth":null,"leaf":-0.00389169785,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.101416349,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.186925322,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":15,"yes":2},{"depth":null,"leaf":0.16711998,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":null,"leaf":-0.154198557,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":16,"yes":2},{"depth":null,"leaf":-0.142255381,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":16,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":16,"yes":6},{"depth":null,"leaf":0.172067791,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":16,"yes":8},{"depth":null,"leaf":-0.121421516,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":0.073711507,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":-0.148049027,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":17,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":17,"yes":4},{"depth":null,"leaf":-0.151937172,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.0142573239,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":17,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":17,"yes":8},{"depth":null,"leaf":0.153471231,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":-0.0392971113,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.168022811,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":18,"yes":2},{"depth":null,"leaf":0.156131104,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":null,"leaf":-0.148197949,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":19,"yes":2},{"depth":null,"leaf":-0.134196311,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":19,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":19,"yes":6},{"depth":null,"leaf":0.160865128,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":19,"yes":8},{"depth":null,"leaf":-0.110056646,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":0.0594659112,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":-0.139969245,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":20,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":20,"yes":4},{"depth":null,"leaf":-0.145403519,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.0147723975,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"sepal width","split_condition":3.20000005,"tree_id":20,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"petal width","split_condition":1.79999995,"tree_id":20,"yes":8},{"depth":null,"leaf":0.0483957976,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.162800461,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":2,"leaf":null,"missing":10,"no":11,"nodeid":7,"parentid":3,"split":"petal length","split_condition":5.19999981,"tree_id":20,"yes":10},{"depth":null,"leaf":-0.0793080404,"missing":null,"no":null,"nodeid":10,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.112726398,"missing":null,"no":null,"nodeid":11,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":21,"yes":2},{"depth":null,"leaf":0.14705947,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":null,"leaf":-0.142660394,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":22,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":22,"yes":4},{"depth":null,"leaf":-0.12631698,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":22,"yes":6},{"depth":null,"leaf":0.151711732,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":22,"yes":8},{"depth":null,"leaf":-0.101206295,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":0.0569678135,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":-0.132955521,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":23,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":23,"yes":4},{"depth":null,"leaf":-0.1391913,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.0150168026,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":23,"yes":6},{"depth":null,"leaf":0.014580613,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":23,"yes":8},{"depth":null,"leaf":0.0168433767,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.154607058,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":24,"yes":2},{"depth":null,"leaf":0.139016181,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":null,"leaf":-0.13727048,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":25,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":25,"yes":4},{"depth":null,"leaf":-0.118402772,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.79999995,"tree_id":25,"yes":6},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":5,"split":"sepal length","split_condition":5.19999981,"tree_id":25,"yes":8},{"depth":null,"leaf":0.0103592547,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":0.152987525,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.0338534117,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.126058802,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":26,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":26,"yes":4},{"depth":null,"leaf":-0.137931168,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":26,"yes":6},{"depth":null,"leaf":0.116194524,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":-0.0252925735,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":0.148122758,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":27,"yes":2},{"depth":null,"leaf":0.131407082,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":null,"leaf":-0.131564274,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":28,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":28,"yes":4},{"depth":null,"leaf":-0.110398278,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":28,"yes":6},{"depth":null,"leaf":0.135915175,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal length","split_condition":6,"tree_id":28,"yes":8},{"depth":null,"leaf":0.01785478,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.0288929809,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.117059968,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":29,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":29,"yes":4},{"depth":null,"leaf":-0.131456167,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":29,"yes":6},{"depth":null,"leaf":0.108389735,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":-0.0236288365,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":0.138706177,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":29,"yes":null}]},{"name":"treeCalcs","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["x","y","depth","children"],"method":"tidy","separation":{"signal":"false"},"type":"tree"}]},{"name":"treeChildren","source":"treeCalcs","transform":[{"as":["childrenObjects"],"fields":["parentid"],"groupby":["parentid"],"ops":["values"],"type":"aggregate"},{"as":"childrenIds","expr":"pluck(datum.childrenObjects,'nodeid')","type":"formula"}]},{"name":"treeAncestors","source":"treeCalcs","transform":[{"as":"treeAncestors","expr":"treeAncestors('treeCalcs', datum.nodeid, 'root')","type":"formula"},{"fields":["treeAncestors"],"type":"flatten"},{"as":"allParents","expr":"datum.treeAncestors.parentid","type":"formula"}]},{"name":"treeChildrenAll","source":"treeAncestors","transform":[{"fields":["allParents","nodeid","name","parentid","x","y","depth","children"],"type":"project"},{"as":["allChildrenObjects","allChildrenCount","id"],"fields":["parentid","parentid","nodeid"],"groupby":["allParents"],"ops":["values","count","min"],"type":"aggregate"},{"as":"allChildrenIds","expr":"pluck(datum.allChildrenObjects,'nodeid')","type":"formula"}]},{"name":"treeClickStoreTemp","source":"treeAncestors","transform":[{"expr":"startingDepth != -1 ? datum.depth <= startingDepth : node != 0 && !isExpanded ? datum.parentid == node: node != 0 && isExpanded ? datum.allParents == node : false","type":"filter"},{"fields":["nodeid","parentid","x","y","depth","children"],"type":"project"},{"fields":["nodeid"],"groupby":["nodeid","parentid","x","y","depth","children"],"ops":["min"],"type":"aggregate"}]},{"name":"treeClickStorePerm","on":[{"insert":"data('treeClickStoreTemp')","trigger":"startingDepth >= 0"},{"insert":"!isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"},{"remove":"isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"}],"values":[]},{"name":"treeLayout","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid)","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["x","y","depth","children"],"method":"tidy","nodeSize":[{"signal":"nodeWidth + spaceBetweenNodes"},{"signal":"nodeHeight+ spaceBetweenLevels"}],"separation":{"signal":"false"},"type":"tree"},{"as":"y","expr":"1*(datum.y+(height/10))","type":"formula"},{"as":"x","expr":"1*(datum.x+(width/2))","type":"formula"},{"field":"x","signal":"x_extent","type":"extent"},{"field":"y","signal":"y_extent","type":"extent"},{"as":"xscaled","expr":"scale('xscale',datum.x)","type":"formula"},{"as":"parent","expr":"datum.parentid","type":"formula"}]},{"name":"fullTreeLayout","source":"treeLayout","transform":[{"fields":["nodeid"],"from":"treeChildren","key":"parentid","type":"lookup","values":["childrenObjects","childrenIds"]},{"fields":["nodeid"],"from":"treeChildrenAll","key":"allParents","type":"lookup","values":["allChildrenIds","allChildrenObjects"]},{"fields":["nodeid"],"from":"treeCalcs","key":"nodeid","type":"lookup","values":["children"]},{"as":"treeParent","expr":"reverse(pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid'))[1]","type":"formula"},{"as":"isLeaf","expr":"datum.leaf == null","type":"formula"}]},{"name":"splitNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && datum.isLeaf","type":"filter"}]},{"name":"leafNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && !datum.isLeaf","type":"filter"}]},{"name":"links","source":"treeLayout","transform":[{"type":"treelinks"},{"orient":"vertical","shape":"line","sourceX":{"expr":"scale('xscale', datum.source.x)"},"sourceY":{"expr":"scale('yscale', datum.source.y)"},"targetX":{"expr":"scale('xscale', datum.target.x)"},"targetY":{"expr":"scale('yscale', datum.target.y) - scaledNodeHeight"},"type":"linkpath"},{"expr":" indata('treeClickStorePerm', 'nodeid', datum.target.nodeid)","type":"filter"}]},{"name":"yesPaths","source":"links","transform":[{"expr":"datum.source.yes === datum.target.nodeid ","type":"filter"}]},{"name":"noPaths","source":"links","transform":[{"expr":"datum.source.yes !== datum.target.nodeid ","type":"filter"}]}],"height":200,"marks":[{"encode":{"stroke":{"value":"#657b83"},"strokewidth":{"value":1},"update":{"path":{"field":"path"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"}}},"from":{"data":"yesPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"path":{"field":"path"},"stroke":{"value":"#657b83"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"},"strokewidth":{"value":1}}},"from":{"data":"noPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#859900"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"yes"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"yesPaths"},"type":"text"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#dc322f"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"no"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"noPaths"},"type":"text"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#586e75"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#657b83"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"splitNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#839496"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"bold"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"parent.split + ' <= ' + format(parent.split_condition, '.2f')"},"x":{"signal":"(scaledNodeWidth / 2)"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"},{"encode":{"update":{"align":{"value":"right"},"baseline":{"value":"middle"},"fill":{"value":"#657b83"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"stroke":{"value":"#657b83"},"strokewidth":{"value":1},"text":{"signal":"parent.children"},"x":{"signal":"item.mark.group.width - (9/ span(xdom))*width"},"y":{"signal":"item.mark.group.height/2"}}},"interactive":false,"type":"text"}],"name":"splitNode","type":"group"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#073642"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#586e75"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"leafNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#839496"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"normal"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"'leaf = ' + format(parent.leaf, '.2f')"},"x":{"signal":"scaledNodeWidth / 2"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"}],"name":"leafNode","type":"group"}],"padding":30,"scales":[{"domain":{"signal":"xdom"},"name":"xscale","range":{"signal":"xrange"},"zero":false},{"domain":{"signal":"ydom"},"name":"yscale","range":{"signal":"yrange"},"zero":false}],"signals":[{"name":"selectedTree","value":0},{"name":"node","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.nodeid"}],"value":0},{"name":"nodeHighlight","on":[{"events":[{"markname":"splitNode","type":"mouseover"},{"markname":"leafNode","type":"mouseover"}],"update":"pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid')"},{"events":{"type":"mouseout"},"update":"[0]"}],"value":"[0]"},{"name":"isExpanded","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.children > 0 && indata('treeClickStorePerm', 'nodeid', datum.childrenIds[0]) ? true : false"}],"value":0},{"name":"xrange","update":"[0, width]"},{"name":"yrange","update":"[0, height]"},{"name":"down","on":[{"events":"mousedown","update":"xy()"}],"value":null},{"name":"xcur","on":[{"events":"mousedown","update":"slice(xdom)"}],"value":null},{"name":"ycur","on":[{"events":"mousedown","update":"slice(ydom)"}],"value":null},{"name":"delta","on":[{"events":[{"between":[{"type":"mousedown"},{"source":"window","type":"mouseup"}],"consume":true,"source":"window","type":"mousemove"}],"update":"down ? [down[0]-x(), down[1]-y()] : [0,0]"}],"value":[0,0]},{"name":"anchor","on":[{"events":"wheel","update":"[invert('xscale', x()), invert('yscale', y())]"}],"value":[0,0]},{"name":"xext","update":"[0,width]"},{"name":"yext","update":"[0,height]"},{"name":"zoom","on":[{"events":"wheel!","force":true,"update":"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}],"value":1},{"name":"xdom","on":[{"events":{"signal":"delta"},"update":"[xcur[0] + span(xcur) * delta[0] / width, xcur[1] + span(xcur) * delta[0] / width]"},{"events":{"signal":"zoom"},"update":"[anchor[0] + (xdom[0] - anchor[0]) * zoom, anchor[0] + (xdom[1] - anchor[0]) * zoom]"}],"update":"[x_extent[0] - nodeWidth/ 2, x_extent[1] + nodeWidth / 2]"},{"name":"ydom","on":[{"events":{"signal":"delta"},"update":"[ycur[0] + span(ycur) * delta[1] / height, ycur[1] + span(ycur) * delta[1] / height]"},{"events":{"signal":"zoom"},"update":"[anchor[1] + (ydom[0] - anchor[1]) * zoom, anchor[1] + (ydom[1] - anchor[1]) * zoom]"}],"update":"[y_extent[0] - nodeHeight, y_extent[1] + nodeHeight/3]"},{"name":"scaledNodeWidth","update":"(nodeWidth/ span(xdom))*width"},{"name":"scaledNodeHeight","update":"abs(nodeHeight/ span(ydom))*height"},{"name":"scaledLimit","update":"(20/ span(xdom))*width"},{"name":"spaceBetweenLevels","value":100},{"name":"spaceBetweenNodes","value":10},{"name":"nodeWidth","value":100},{"name":"nodeHeight","value":45},{"name":"startingDepth","on":[{"events":{"throttle":0,"type":"timer"},"update":"-1"}],"value":3}],"width":600}

We specified both :background and :height here, and the background specified in the option supercedes the one from the style.

You can also always get the style specification as a Keyword which can be passed to EXGBoost.plot_tree/2 manually, making any needed changes yourself, like so:

custom_style = EXGBoost.Plotting.solarized_dark() |> Keyword.put(:background, "white")
EXGBoost.plot_tree(booster, style: custom_style)
{"$schema":"https://vega.github.io/schema/vega/v5.json","autosize":"fit","background":"white","data":[{"name":"tree","values":[{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":0,"yes":2},{"depth":null,"leaf":0.425454557,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":null,"leaf":-0.218918934,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":0,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":1,"yes":2},{"depth":null,"leaf":-0.212727293,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":1,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":1,"yes":6},{"depth":null,"leaf":0.410982668,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":1,"yes":8},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":null,"leaf":-0.211034521,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":1,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":2,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":4},{"depth":null,"leaf":-0.218530372,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":-7.66345476e-9,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":2,"yes":6},{"depth":null,"leaf":0.0719999969,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":2,"yes":8},{"depth":null,"leaf":0.128571421,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":null,"leaf":0.422068983,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":2,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":3,"yes":2},{"depth":null,"leaf":0.292982191,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":null,"leaf":-0.195790753,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":3,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":4,"yes":2},{"depth":null,"leaf":-0.18925412,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":4,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":4,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":4,"yes":10},{"depth":null,"leaf":0.110490814,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":0.295589149,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.0065466417,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":4,"yes":8},{"depth":null,"leaf":-0.00258299569,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":null,"leaf":-0.187741965,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":4,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":5,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":5,"yes":4},{"depth":null,"leaf":-0.195117101,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.00513018994,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":5,"yes":6},{"depth":null,"leaf":0.0662105083,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":null,"leaf":0.283106089,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":5,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":6,"yes":2},{"depth":null,"leaf":0.234668195,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":null,"leaf":-0.18040958,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":6,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":7,"yes":2},{"depth":null,"leaf":-0.173018426,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":7,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":5,"tree_id":7,"yes":6},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":6,"parentid":4,"split":"sepal length","split_condition":5.0999999,"tree_id":7,"yes":10},{"depth":null,"leaf":0.0843105838,"missing":null,"no":null,"nodeid":10,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":0.236887291,"missing":null,"no":null,"nodeid":11,"parentid":6,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.0104054213,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":7,"yes":8},{"depth":null,"leaf":0.0072258329,"missing":null,"no":null,"nodeid":8,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":null,"leaf":-0.171714455,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":7,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":8,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":4},{"depth":null,"leaf":-0.179455951,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.0102903834,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":8,"yes":6},{"depth":null,"leaf":0.0586014725,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":8,"yes":8},{"depth":null,"leaf":0.068535842,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":null,"leaf":0.2342868,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":8,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":9,"yes":2},{"depth":null,"leaf":0.202173784,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":null,"leaf":-0.169466257,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":9,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":10,"yes":2},{"depth":null,"leaf":-0.160806924,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.60000002,"tree_id":10,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal length","split_condition":4.9000001,"tree_id":10,"yes":6},{"depth":null,"leaf":0.203813776,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.046239242,"missing":null,"no":null,"nodeid":7,"parentid":4,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":5,"parentid":3,"split":"petal length","split_condition":5.0999999,"tree_id":10,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":10,"yes":10},{"depth":null,"leaf":-0.145340025,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":0.123540193,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":null,"leaf":-0.160442933,"missing":null,"no":null,"nodeid":9,"parentid":5,"split":null,"split_condition":null,"tree_id":10,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":11,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":11,"yes":4},{"depth":null,"leaf":-0.168171152,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.0149572417,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":11,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":11,"yes":8},{"depth":null,"leaf":0.195176765,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":-0.0395982973,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":null,"leaf":0.204244092,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":11,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":12,"yes":2},{"depth":null,"leaf":0.181544691,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":null,"leaf":-0.161027163,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":12,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":13,"yes":2},{"depth":null,"leaf":-0.150903225,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":13,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":13,"yes":6},{"depth":null,"leaf":0.18685849,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":13,"yes":8},{"depth":null,"leaf":-0.13117227,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":0.077316612,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":null,"leaf":-0.15599905,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":13,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":14,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":14,"yes":4},{"depth":null,"leaf":-0.159298271,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.0134122102,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":14,"yes":6},{"depth":null,"leaf":0.0381595641,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":14,"yes":8},{"depth":3,"leaf":null,"missing":10,"no":11,"nodeid":8,"parentid":7,"split":"petal width","split_condition":2,"tree_id":14,"yes":10},{"depth":null,"leaf":-0.00389169785,"missing":null,"no":null,"nodeid":10,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.101416349,"missing":null,"no":null,"nodeid":11,"parentid":8,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":null,"leaf":0.186925322,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":14,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":15,"yes":2},{"depth":null,"leaf":0.16711998,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":null,"leaf":-0.154198557,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":15,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":16,"yes":2},{"depth":null,"leaf":-0.142255381,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":16,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":16,"yes":6},{"depth":null,"leaf":0.172067791,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":16,"yes":8},{"depth":null,"leaf":-0.121421516,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":0.073711507,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":null,"leaf":-0.148049027,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":16,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":17,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":17,"yes":4},{"depth":null,"leaf":-0.151937172,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.0142573239,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":17,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"sepal width","split_condition":2.9000001,"tree_id":17,"yes":8},{"depth":null,"leaf":0.153471231,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":-0.0392971113,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":null,"leaf":0.168022811,"missing":null,"no":null,"nodeid":7,"parentid":3,"split":null,"split_condition":null,"tree_id":17,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":18,"yes":2},{"depth":null,"leaf":0.156131104,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":null,"leaf":-0.148197949,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":18,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":19,"yes":2},{"depth":null,"leaf":-0.134196311,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":3,"parentid":1,"split":"petal length","split_condition":5.0999999,"tree_id":19,"yes":4},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":4,"parentid":3,"split":"petal width","split_condition":1.70000005,"tree_id":19,"yes":6},{"depth":null,"leaf":0.160865128,"missing":null,"no":null,"nodeid":6,"parentid":4,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":4,"split":"sepal width","split_condition":2.9000001,"tree_id":19,"yes":8},{"depth":null,"leaf":-0.110056646,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":0.0594659112,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":null,"leaf":-0.139969245,"missing":null,"no":null,"nodeid":5,"parentid":3,"split":null,"split_condition":null,"tree_id":19,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":20,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":20,"yes":4},{"depth":null,"leaf":-0.145403519,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.0147723975,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"sepal width","split_condition":3.20000005,"tree_id":20,"yes":6},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":3,"split":"petal width","split_condition":1.79999995,"tree_id":20,"yes":8},{"depth":null,"leaf":0.0483957976,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.162800461,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":2,"leaf":null,"missing":10,"no":11,"nodeid":7,"parentid":3,"split":"petal length","split_condition":5.19999981,"tree_id":20,"yes":10},{"depth":null,"leaf":-0.0793080404,"missing":null,"no":null,"nodeid":10,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":null,"leaf":0.112726398,"missing":null,"no":null,"nodeid":11,"parentid":7,"split":null,"split_condition":null,"tree_id":20,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":21,"yes":2},{"depth":null,"leaf":0.14705947,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":null,"leaf":-0.142660394,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":21,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":22,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":22,"yes":4},{"depth":null,"leaf":-0.12631698,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":22,"yes":6},{"depth":null,"leaf":0.151711732,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal width","split_condition":2.9000001,"tree_id":22,"yes":8},{"depth":null,"leaf":-0.101206295,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":0.0569678135,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":null,"leaf":-0.132955521,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":22,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal width","split_condition":1.60000002,"tree_id":23,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":4.9000001,"tree_id":23,"yes":4},{"depth":null,"leaf":-0.1391913,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.0150168026,"missing":null,"no":null,"nodeid":5,"parentid":2,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":1,"leaf":null,"missing":6,"no":7,"nodeid":3,"parentid":1,"split":"petal width","split_condition":1.79999995,"tree_id":23,"yes":6},{"depth":null,"leaf":0.014580613,"missing":null,"no":null,"nodeid":6,"parentid":3,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":2,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":3,"split":"sepal length","split_condition":6,"tree_id":23,"yes":8},{"depth":null,"leaf":0.0168433767,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":null,"leaf":0.154607058,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":23,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":24,"yes":2},{"depth":null,"leaf":0.139016181,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":null,"leaf":-0.13727048,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":24,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":25,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":25,"yes":4},{"depth":null,"leaf":-0.118402772,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.79999995,"tree_id":25,"yes":6},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":6,"parentid":5,"split":"sepal length","split_condition":5.19999981,"tree_id":25,"yes":8},{"depth":null,"leaf":0.0103592547,"missing":null,"no":null,"nodeid":8,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":0.152987525,"missing":null,"no":null,"nodeid":9,"parentid":6,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.0338534117,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":null,"leaf":-0.126058802,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":25,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":26,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":26,"yes":4},{"depth":null,"leaf":-0.137931168,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":26,"yes":6},{"depth":null,"leaf":0.116194524,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":-0.0252925735,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":null,"leaf":0.148122758,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":26,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":3,"tree_id":27,"yes":2},{"depth":null,"leaf":0.131407082,"missing":null,"no":null,"nodeid":2,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":null,"leaf":-0.131564274,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":27,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":28,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal length","split_condition":3,"tree_id":28,"yes":4},{"depth":null,"leaf":-0.110398278,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"petal width","split_condition":1.70000005,"tree_id":28,"yes":6},{"depth":null,"leaf":0.135915175,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":3,"leaf":null,"missing":8,"no":9,"nodeid":7,"parentid":5,"split":"sepal length","split_condition":6,"tree_id":28,"yes":8},{"depth":null,"leaf":0.01785478,"missing":null,"no":null,"nodeid":8,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.0288929809,"missing":null,"no":null,"nodeid":9,"parentid":7,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":null,"leaf":-0.117059968,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":28,"yes":null},{"depth":0,"leaf":null,"missing":2,"no":3,"nodeid":1,"parentid":null,"split":"petal length","split_condition":5.0999999,"tree_id":29,"yes":2},{"depth":1,"leaf":null,"missing":4,"no":5,"nodeid":2,"parentid":1,"split":"petal width","split_condition":1.70000005,"tree_id":29,"yes":4},{"depth":null,"leaf":-0.131456167,"missing":null,"no":null,"nodeid":4,"parentid":2,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":2,"leaf":null,"missing":6,"no":7,"nodeid":5,"parentid":2,"split":"sepal width","split_condition":2.9000001,"tree_id":29,"yes":6},{"depth":null,"leaf":0.108389735,"missing":null,"no":null,"nodeid":6,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":-0.0236288365,"missing":null,"no":null,"nodeid":7,"parentid":5,"split":null,"split_condition":null,"tree_id":29,"yes":null},{"depth":null,"leaf":0.138706177,"missing":null,"no":null,"nodeid":3,"parentid":1,"split":null,"split_condition":null,"tree_id":29,"yes":null}]},{"name":"treeCalcs","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["x","y","depth","children"],"method":"tidy","separation":{"signal":"false"},"type":"tree"}]},{"name":"treeChildren","source":"treeCalcs","transform":[{"as":["childrenObjects"],"fields":["parentid"],"groupby":["parentid"],"ops":["values"],"type":"aggregate"},{"as":"childrenIds","expr":"pluck(datum.childrenObjects,'nodeid')","type":"formula"}]},{"name":"treeAncestors","source":"treeCalcs","transform":[{"as":"treeAncestors","expr":"treeAncestors('treeCalcs', datum.nodeid, 'root')","type":"formula"},{"fields":["treeAncestors"],"type":"flatten"},{"as":"allParents","expr":"datum.treeAncestors.parentid","type":"formula"}]},{"name":"treeChildrenAll","source":"treeAncestors","transform":[{"fields":["allParents","nodeid","name","parentid","x","y","depth","children"],"type":"project"},{"as":["allChildrenObjects","allChildrenCount","id"],"fields":["parentid","parentid","nodeid"],"groupby":["allParents"],"ops":["values","count","min"],"type":"aggregate"},{"as":"allChildrenIds","expr":"pluck(datum.allChildrenObjects,'nodeid')","type":"formula"}]},{"name":"treeClickStoreTemp","source":"treeAncestors","transform":[{"expr":"startingDepth != -1 ? datum.depth <= startingDepth : node != 0 && !isExpanded ? datum.parentid == node: node != 0 && isExpanded ? datum.allParents == node : false","type":"filter"},{"fields":["nodeid","parentid","x","y","depth","children"],"type":"project"},{"fields":["nodeid"],"groupby":["nodeid","parentid","x","y","depth","children"],"ops":["min"],"type":"aggregate"}]},{"name":"treeClickStorePerm","on":[{"insert":"data('treeClickStoreTemp')","trigger":"startingDepth >= 0"},{"insert":"!isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"},{"remove":"isExpanded ? data('treeClickStoreTemp'): false","trigger":"node"}],"values":[]},{"name":"treeLayout","source":"tree","transform":[{"expr":"datum.tree_id === selectedTree","type":"filter"},{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid)","type":"filter"},{"key":"nodeid","parentKey":"parentid","type":"stratify"},{"as":["x","y","depth","children"],"method":"tidy","nodeSize":[{"signal":"nodeWidth + spaceBetweenNodes"},{"signal":"nodeHeight+ spaceBetweenLevels"}],"separation":{"signal":"false"},"type":"tree"},{"as":"y","expr":"1*(datum.y+(height/10))","type":"formula"},{"as":"x","expr":"1*(datum.x+(width/2))","type":"formula"},{"field":"x","signal":"x_extent","type":"extent"},{"field":"y","signal":"y_extent","type":"extent"},{"as":"xscaled","expr":"scale('xscale',datum.x)","type":"formula"},{"as":"parent","expr":"datum.parentid","type":"formula"}]},{"name":"fullTreeLayout","source":"treeLayout","transform":[{"fields":["nodeid"],"from":"treeChildren","key":"parentid","type":"lookup","values":["childrenObjects","childrenIds"]},{"fields":["nodeid"],"from":"treeChildrenAll","key":"allParents","type":"lookup","values":["allChildrenIds","allChildrenObjects"]},{"fields":["nodeid"],"from":"treeCalcs","key":"nodeid","type":"lookup","values":["children"]},{"as":"treeParent","expr":"reverse(pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid'))[1]","type":"formula"},{"as":"isLeaf","expr":"datum.leaf == null","type":"formula"}]},{"name":"splitNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && datum.isLeaf","type":"filter"}]},{"name":"leafNodes","source":"fullTreeLayout","transform":[{"expr":"indata('treeClickStorePerm', 'nodeid', datum.nodeid) && !datum.isLeaf","type":"filter"}]},{"name":"links","source":"treeLayout","transform":[{"type":"treelinks"},{"orient":"vertical","shape":"line","sourceX":{"expr":"scale('xscale', datum.source.x)"},"sourceY":{"expr":"scale('yscale', datum.source.y)"},"targetX":{"expr":"scale('xscale', datum.target.x)"},"targetY":{"expr":"scale('yscale', datum.target.y) - scaledNodeHeight"},"type":"linkpath"},{"expr":" indata('treeClickStorePerm', 'nodeid', datum.target.nodeid)","type":"filter"}]},{"name":"yesPaths","source":"links","transform":[{"expr":"datum.source.yes === datum.target.nodeid ","type":"filter"}]},{"name":"noPaths","source":"links","transform":[{"expr":"datum.source.yes !== datum.target.nodeid ","type":"filter"}]}],"height":400,"marks":[{"encode":{"stroke":{"value":"#657b83"},"strokewidth":{"value":1},"update":{"path":{"field":"path"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"}}},"from":{"data":"yesPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"path":{"field":"path"},"stroke":{"value":"#657b83"},"strokeWidth":{"signal":"indexof(nodeHighlight, datum.target.nodeid)> -1? 2:1"},"strokewidth":{"value":1}}},"from":{"data":"noPaths"},"interactive":false,"type":"path"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#859900"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"yes"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"yesPaths"},"type":"text"},{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#dc322f"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"text":{"value":"no"},"x":{"signal":"(scale('xscale', datum.source.x-nodeWidth/4) + scale('xscale', datum.target.x)) / 2"},"y":{"signal":"(scale('yscale', datum.source.y) + scale('yscale', datum.target.y)) / 2 - (scaledNodeHeight/2)"}}},"from":{"data":"noPaths"},"type":"text"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#586e75"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#657b83"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"splitNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#839496"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"bold"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"parent.split + ' <= ' + format(parent.split_condition, '.2f')"},"x":{"signal":"(scaledNodeWidth / 2)"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"},{"encode":{"update":{"align":{"value":"right"},"baseline":{"value":"middle"},"fill":{"value":"#657b83"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"stroke":{"value":"#657b83"},"strokewidth":{"value":1},"text":{"signal":"parent.children"},"x":{"signal":"item.mark.group.width - (9/ span(xdom))*width"},"y":{"signal":"item.mark.group.height/2"}}},"interactive":false,"type":"text"}],"name":"splitNode","type":"group"},{"clip":false,"encode":{"update":{"cornerRadius":{"value":2},"cursor":{"signal":"datum.children > 0 ? 'pointer' : '' "},"fill":{"value":"#073642"},"height":{"signal":"scaledNodeHeight"},"opacity":{"value":1},"stroke":{"value":"#586e75"},"strokewidth":{"value":1},"tooltip":{"signal":""},"width":{"signal":"scaledNodeWidth"},"x":{"signal":"datum.xscaled - (scaledNodeWidth / 2)"},"yc":{"signal":"scale('yscale',datum.y) - (scaledNodeHeight/2)"}}},"from":{"data":"leafNodes"},"marks":[{"encode":{"update":{"align":{"value":"center"},"baseline":{"value":"middle"},"fill":{"value":"#839496"},"font":{"value":"Calibri"},"fontSize":{"signal":"(13/ span(xdom))*width"},"fontsize":{"value":12},"fontstyle":{"value":"normal"},"fontweight":{"value":"normal"},"limit":{"signal":"scaledNodeWidth-scaledLimit"},"text":{"signal":"'leaf = ' + format(parent.leaf, '.2f')"},"x":{"signal":"scaledNodeWidth / 2"},"y":{"signal":"scaledNodeHeight / 2"}}},"interactive":false,"name":"title","type":"text"}],"name":"leafNode","type":"group"}],"padding":30,"scales":[{"domain":{"signal":"xdom"},"name":"xscale","range":{"signal":"xrange"},"zero":false},{"domain":{"signal":"ydom"},"name":"yscale","range":{"signal":"yrange"},"zero":false}],"signals":[{"name":"selectedTree","value":0},{"name":"node","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.nodeid"}],"value":0},{"name":"nodeHighlight","on":[{"events":[{"markname":"splitNode","type":"mouseover"},{"markname":"leafNode","type":"mouseover"}],"update":"pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid')"},{"events":{"type":"mouseout"},"update":"[0]"}],"value":"[0]"},{"name":"isExpanded","on":[{"events":{"markname":"splitNode","type":"click"},"update":"datum.children > 0 && indata('treeClickStorePerm', 'nodeid', datum.childrenIds[0]) ? true : false"}],"value":0},{"name":"xrange","update":"[0, width]"},{"name":"yrange","update":"[0, height]"},{"name":"down","on":[{"events":"mousedown","update":"xy()"}],"value":null},{"name":"xcur","on":[{"events":"mousedown","update":"slice(xdom)"}],"value":null},{"name":"ycur","on":[{"events":"mousedown","update":"slice(ydom)"}],"value":null},{"name":"delta","on":[{"events":[{"between":[{"type":"mousedown"},{"source":"window","type":"mouseup"}],"consume":true,"source":"window","type":"mousemove"}],"update":"down ? [down[0]-x(), down[1]-y()] : [0,0]"}],"value":[0,0]},{"name":"anchor","on":[{"events":"wheel","update":"[invert('xscale', x()), invert('yscale', y())]"}],"value":[0,0]},{"name":"xext","update":"[0,width]"},{"name":"yext","update":"[0,height]"},{"name":"zoom","on":[{"events":"wheel!","force":true,"update":"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}],"value":1},{"name":"xdom","on":[{"events":{"signal":"delta"},"update":"[xcur[0] + span(xcur) * delta[0] / width, xcur[1] + span(xcur) * delta[0] / width]"},{"events":{"signal":"zoom"},"update":"[anchor[0] + (xdom[0] - anchor[0]) * zoom, anchor[0] + (xdom[1] - anchor[0]) * zoom]"}],"update":"[x_extent[0] - nodeWidth/ 2, x_extent[1] + nodeWidth / 2]"},{"name":"ydom","on":[{"events":{"signal":"delta"},"update":"[ycur[0] + span(ycur) * delta[1] / height, ycur[1] + span(ycur) * delta[1] / height]"},{"events":{"signal":"zoom"},"update":"[anchor[1] + (ydom[0] - anchor[1]) * zoom, anchor[1] + (ydom[1] - anchor[1]) * zoom]"}],"update":"[y_extent[0] - nodeHeight, y_extent[1] + nodeHeight/3]"},{"name":"scaledNodeWidth","update":"(nodeWidth/ span(xdom))*width"},{"name":"scaledNodeHeight","update":"abs(nodeHeight/ span(ydom))*height"},{"name":"scaledLimit","update":"(20/ span(xdom))*width"},{"name":"spaceBetweenLevels","value":100},{"name":"spaceBetweenNodes","value":10},{"name":"nodeWidth","value":100},{"name":"nodeHeight","value":45},{"name":"startingDepth","on":[{"events":{"throttle":0,"type":"timer"},"update":"-1"}],"value":3}],"width":600}

You can also programatically check which styles are available:

EXGBoost.Plotting.get_styles()
[
  horizon_light: [
    background: "#FDF0ED",
    leaves: [
      text: [fill: "#1A2026", fontSize: 12, fontStyle: "normal", fontWeight: "normal"],
      rect: [fill: "#F7E3D3", stroke: "#F43E5C", strokeWidth: 1]
    ],
    splits: [
      text: [fill: "#1A2026", fontSize: 12, fontStyle: "normal", fontWeight: "bold"],
      rect: [fill: "#F43E5C", stroke: "#1A2026", strokeWidth: 1],
      children: [fill: "#1A2026", stroke: "#1A2026", strokeWidth: 1]
    ],
    yes: [text: [fill: "#48B685"], path: [stroke: "#1A2026", strokeWidth: 1]],
    no: [text: [fill: "#F43E5C"], path: [stroke: "#1A2026", strokeWidth: 1]]
  ],
  horizon_dark: [
    background: "#1C1E26",
    leaves: [
      text: [fill: "#E3E6EE", fontSize: 12, fontStyle: "normal", fontWeight: "normal"],
      rect: [fill: "#232530", stroke: "#F43E5C", strokeWidth: 1]
    ],
    splits: [
      text: [fill: "#E3E6EE", fontSize: 12, fontStyle: "normal", fontWeight: "bold"],
      rect: [fill: "#F43E5C", stroke: "#E3E6EE", strokeWidth: 1],
      children: [fill: "#E3E6EE", stroke: "#E3E6EE", strokeWidth: 1]
    ],
    yes: [text: [fill: "#48B685"], path: [stroke: "#E3E6EE", strokeWidth: 1]],
    no: [text: [fill: "#F43E5C"], path: [stroke: "#E3E6EE", strokeWidth: 1]]
  ],
  gruvbox: [
    background: "#282828",
    leaves: [
      text: [fill: "#ebdbb2", fontSize: 12, fontStyle: "normal", fontWeight: "normal"],
      rect: [fill: "#3c3836", stroke: "#b8bb26", strokeWidth: 1]
    ],
    splits: [
      text: [fill: "#ebdbb2", fontSize: 12, fontStyle: "normal", fontWeight: "bold"],
      rect: [fill: "#b8bb26", stroke: "#ebdbb2", strokeWidth: 1],
      children: [fill: "#ebdbb2", stroke: "#ebdbb2", strokeWidth: 1]
    ],
    yes: [text: [fill: "#b8bb26"], path: [stroke: "#ebdbb2", strokeWidth: 1]],
    no: [text: [fill: "#fb4934"], path: [stroke: "#ebdbb2", strokeWidth: 1]]
  ],
  one_dark: [
    background: "#282c34",
    leaves: [
      text: [fill: "#abb2bf", fontSize: 12, fontStyle: "normal", fontWeight: "normal"],
      rect: [fill: "#3b4048", stroke: "#98c379", strokeWidth: 1]
    ],
    splits: [
      text: [fill: "#abb2bf", fontSize: 12, fontStyle: "normal", fontWeight: "bold"],
      rect: [fill: "#98c379", stroke: "#abb2bf", strokeWidth: 1],
      children: [fill: "#abb2bf", stroke: "#abb2bf", strokeWidth: 1]
    ],
    yes: [text: [fill: "#98c379"], path: [stroke: "#abb2bf", strokeWidth: 1]],
    no: [text: [fill: "#e06c75"], path: [stroke: "#abb2bf", strokeWidth: 1]]
  ],
  material: [
    background: "#263238",
    leaves: [
      text: [fill: "#eceff1", fontSize: 12, fontStyle: "normal", fontWeight: "normal"],
      rect: [fill: "#37474f", stroke: "#80cbc4", strokeWidth: 1]
    ],
    splits: [
      text: [fill: "#eceff1", fontSize: 12, fontStyle: "normal", fontWeight: "bold"],
      rect: [fill: "#80cbc4", stroke: "#eceff1", strokeWidth: 1],
      children: [fill: "#eceff1", stroke: "#eceff1", strokeWidth: 1]
    ],
    yes: [text: [fill: "#c5e1a5"], path: [stroke: "#eceff1", strokeWidth: 1]],
    no: [text: [fill: "#ef9a9a"], path: [stroke: "#eceff1", strokeWidth: 1]]
  ],
  nord: [
    background: "#2e3440",
    leaves: [
      text: [fill: "#d8dee9", fontSize: 12, fontStyle: "normal", fontWeight: "normal"],
      rect: [fill: "#3b4252", stroke: "#88c0d0", strokeWidth: 1]
    ],
    splits: [
      text: [fill: "#d8dee9", fontSize: 12, fontStyle: "normal", fontWeight: "bold"],
      rect: [fill: "#88c0d0", stroke: "#d8dee9", strokeWidth: 1],
      children: [fill: "#d8dee9", stroke: "#d8dee9", strokeWidth: 1]
    ],
    yes: [text: [fill: "#a3be8c"], path: [stroke: "#d8dee9", strokeWidth: 1]],
    no: [text: [fill: "#bf616a"], path: [stroke: "#d8dee9", strokeWidth: 1]]
  ],
  dracula: [
    background: "#282a36",
    leaves: [
      text: [fill: "#f8f8f2", fontSize: 12, fontStyle: "normal", fontWeight: "normal"],
      rect: [fill: "#44475a", stroke: "#ff79c6", strokeWidth: 1]
    ],
    splits: [
      text: [fill: "#f8f8f2", fontSize: 12, fontStyle: "normal", fontWeight: "bold"],
      rect: [fill: "#ff79c6", stroke: "#f8f8f2", strokeWidth: 1],
      children: [fill: "#f8f8f2", stroke: "#f8f8f2", strokeWidth: 1]
    ],
    yes: [text: [fill: "#50fa7b"], path: [stroke: "#f8f8f2", strokeWidth: 1]],
    no: [text: [fill: "#ff5555"], path: [stroke: "#f8f8f2", strokeWidth: 1]]
  ],
  monokai: [
    background: "#272822",
    leaves: [
      text: [fill: "#f8f8f2", fontSize: 12, fontStyle: "normal", fontWeight: "normal"],
      rect: [fill: "#3e3d32", stroke: "#66d9ef", strokeWidth: 1]
    ],
    splits: [
      text: [fill: "#f8f8f2", fontSize: 12, fontStyle: "normal", fontWeight: "bold"],
      rect: [fill: "#66d9ef", stroke: "#f8f8f2", strokeWidth: 1],
      children: [fill: "#f8f8f2", stroke: "#f8f8f2", strokeWidth: 1]
    ],
    yes: [text: [fill: "#a6e22e"], path: [stroke: "#f8f8f2", strokeWidth: 1]],
    no: [text: [fill: "#f92672"], path: [stroke: "#f8f8f2", strokeWidth: 1]]
  ],
  light: [
    background: "#f0f0f0",
    padding: 10,
    leaves: [
      text: [fill: "#000", fontSize: 12, fontStyle: "normal", fontWeight: "normal"],
      rect: [fill: "#ddd", stroke: "#000", strokeWidth: 1]
    ],
    splits: [
      text: [fill: "#000", fontSize: 12, fontStyle: "normal", fontWeight: "bold"],
      rect: [fill: "#bbb", stroke: "#000", strokeWidth: 1]
    ]
  ],
  high_contrast: [
    background: "#000",
    padding: 10,
    leaves: [
      text: [fill: "#fff", fontSize: 12, fontStyle: "normal", fontWeight: "normal"],
      rect: [fill: "#333", stroke: "#fff", strokeWidth: 1]
    ],
    splits: [
      text: [fill: "#fff", fontSize: 12, fontStyle: "normal", fontWeight: "bold"],
      rect: [fill: "#666", stroke: "#fff", strokeWidth: 1]
    ]
  ],
  dark: [
    background: "#333",
    padding: 10,
    leaves: [
      text: [fill: "#fff", fontSize: 12, fontStyle: "normal", fontWeight: "normal"],
      rect: [fill: "#666", stroke: "#fff", strokeWidth: 1]
    ],
    splits: [
      text: [fill: "#fff", fontSize: 12, fontStyle: "normal", fontWeight: "bold"],
      rect: [fill: "#444", stroke: "#fff", strokeWidth: 1],
      children: [fill: "#fff", stroke: "#fff", strokeWidth: 1]
    ]
  ],
  playful_dark: [
    background: "#333",
    padding: 10,
    leaves: [
      text: [fill: "#fff", font_size: 12, font_style: "italic", font_weight: "bold"],
      rect: [fill: "#e91e63", stroke: "#fff", stroke_width: 1, radius: 5]
    ],
    splits: [
      text: [fill: "#fff", font_size: 12, font_style: "normal", font_weight: "bold"],
      rect: [fill: "#8bc34a", stroke: "#fff", stroke_width: 1, radius: 10]
    ],
    yes: [text: [fill: "#4caf50"], path: [stroke: "#4caf50", stroke_width: 2]],
    no: [text: [fill: "#f44336"], path: [stroke: "#f44336", stroke_width: 2]]
  ],
  playful_light: [
    background: "#f0f0f0",
    padding: 10,
    leaves: [
      text: [fill: "#000", font_size: 12, font_style: "italic", font_weight: "bold"],
      rect: [fill: "#e91e63", stroke: "#000", stroke_width: 1, radius: 5]
    ],
    splits: [
      text: [fill: "#000", font_size: 12, font_style: "normal", font_weight: "bold"],
      children: [fill: "#000", font_size: 12, font_style: "normal", font_weight: "bold"],
      rect: [fill: "#8bc34a", stroke: "#000", stroke_width: 1, radius: 10]
    ],
    yes: [path: [stroke: "#4caf50", stroke_width: 2]],
    no: [path: [stroke: "#f44336", stroke_width: 2]]
  ],
  solarized_dark: [
    background: "#002b36",
    leaves: [
      text: [fill: "#839496", fontSize: 12, fontStyle: "normal", fontWeight: "normal"],
      rect: [fill: "#073642", stroke: "#586e75", strokeWidth: 1]
    ],
    splits: [
      text: [fill: "#839496", fontSize: 12, fontStyle: "normal", fontWeight: "bold"],
      rect: [fill: "#586e75", stroke: "#657b83", strokeWidth: 1],
      children: [fill: "#657b83", stroke: "#657b83", strokeWidth: 1]
    ],
    yes: [text: [fill: "#859900"], path: [stroke: "#657b83", strokeWidth: 1]],
    no: [text: [fill: "#dc322f"], path: [stroke: "#657b83", strokeWidth: 1]]
  ],
  solarized_light: [
    background: "#fdf6e3",
    leaves: [
      text: [fill: "#586e75", fontSize: 12, fontStyle: "normal", fontWeight: "normal"],
      rect: [fill: "#eee8d5", stroke: "#93a1a1", strokeWidth: 1]
    ],
    splits: [
      text: [fill: "#586e75", fontSize: 12, fontStyle: "normal", fontWeight: "bold"],
      rect: [fill: "#93a1a1", stroke: "#657b83", strokeWidth: 1],
      children: [fill: "#657b83", stroke: "#657b83", strokeWidth: 1]
    ],
    yes: [text: [fill: "#859900"], path: [stroke: "#657b83", strokeWidth: 1]],
    no: [text: [fill: "#dc322f"], path: [stroke: "#657b83", strokeWidth: 1]]
  ]
]

Configuration

You can also set defaults for the top-level API using an Application configuration for EXGBoost under the :plotting key. Since the defaults are collected from your configuration file at compile-time, anything you set during runtime, even if you set it to the Application environment, will not be registered as defaults.

For example, if you just want to change the default pre-configured style you can do:

Mix.install([
  {:exgboost, path: Path.join(__DIR__, ".."), env: :dev},
],
  config: 
  [
    exgboost: [
      plotting: [
          style: :solarized_dark,
        ]]
      ],
  lockfile: :exgboost)

You can also make one-off changes to any of the settings with this method. In effect, this turns into a default custom style. Just make sure to set style: nil to ensure that the style option doesn't supercede any of your settings. Here's an example of that:

  default_style = 
  [
    style: nil,
    background: "#3f3f3f",
    leaves: [
      # Foreground
      text: [fill: "#dcdccc", font_size: 12, font_style: "normal", font_weight: "normal"],
      # Comment
      rect: [fill: "#7f9f7f", stroke: "#7f9f7f"]
    ],
    splits: [
      # Foreground
      text: [fill: "#dcdccc", font_size: 12, font_style: "normal", font_weight: "bold"],
      # Comment
      rect: [fill: "#7f9f7f", stroke: "#7f9f7f"],
      # Selection
      children: [fill: "#2b2b2b", stroke: "#2b2b2b"]
    ],
    yes: [
      # Green
      text: [fill: "#7f9f7f"],
      # Selection
      path: [stroke: "#2b2b2b"]
    ],
    no: [
      # Red
      text: [fill: "#cc9393"],
      # Selection
      path: [stroke: "#2b2b2b"]
    ]
  ]

Mix.install([
  {:exgboost, path: Path.join(__DIR__, ".."), env: :dev},
],
config: 
  [
    exgboost: [
      plotting: default_style,
    ]
  ]
)

NOTE: When you specify a parameter in the configuration, it is merged with the defaults which is different from runtime behavior.

At any point, you can check what your default settings are by using EXGBoost.Plotting.get_defaults/0

EXGBoost.Plotting.get_defaults()
[
  depth: nil,
  index: 0,
  validate: true,
  no: [
    path: [],
    text: [align: :center, baseline: :middle, font_size: 13, font: "Calibri", text: "no"]
  ],
  yes: [
    path: [],
    text: [align: :center, baseline: :middle, font_size: 13, font: "Calibri", text: "yes"]
  ],
  space_between: [nodes: 10, levels: 100],
  node_height: 45,
  node_width: 100,
  splits: [
    text: [align: :center, baseline: :middle, font_size: 13, font: "Calibri"],
    rect: [corner_radius: 2, opacity: 1],
    children: [align: :right, baseline: :middle, font: "Calibri", font_size: 13]
  ],
  leaves: [
    text: [align: :center, baseline: :middle, font_size: 13, font: "Calibri"],
    rect: [corner_radius: 2, opacity: 1]
  ],
  padding: 30,
  width: 600,
  height: 400,
  background: "#f5f5f5",
  autosize: "fit",
  rankdir: :tb,
  style: :dracula
]

Low-Level API

If you find yourself needing more granular control over your plots, you can reach towards the EXGBoost.Plotting module. This module houses the EXGBoost.Plotting.plot/2 function, which is what is used under the hood from the EXGBoost.plot_tree/2 top-level API. This module also has the get_data_spec/2 function, as well as the to_tabular/1 function, both of which can be used to specify your own Vega specification. Lastly, the module also houses all of the pre-configured styles, which are 0-arity functions which output the Keywords containing their respective style's options that can be passed to the plotting APIs.

Let's briefly go over the to_tabular/1 and get_data_spec/2 functions:

The to_tabular/1 function is used to convert a Booster, which is formatted as a tree structure, to a tabular format which can be ingested specifically by the Vega Stratify transform. It returns a list of "nodes", which are just Maps with info about each node in the tree.

EXGBoost.Plotting.to_tabular(booster) |> hd
%{
  "depth" => 0,
  "leaf" => nil,
  "missing" => 2,
  "no" => 3,
  "nodeid" => 1,
  "parentid" => nil,
  "split" => "petal length",
  "split_condition" => 3,
  "tree_id" => 0,
  "yes" => 2
}

You can use this function if you want to have complete control over the visualization, and just want a bit of a head start with respect to data transformation for converting the Booster into a more digestible format.

The get_data_source/2 function is used if you want to use the provided Vega data specification. This is for those who want to only focus on implementing your own Vega Marks, and want to leverage the data transformation pipeline that powers the top-level API.

The data transformation used is the following pipeline:

to_tabular/1 -> Filter (by tree index) -> Stratify -> Tree

EXGBoost.Plotting.get_data_spec(booster, rankdir: :bt)
%{
  "$schema" => "https://vega.github.io/schema/vega/v5.json",
  "data" => [
    %{
      "name" => "tree",
      "values" => [
        %{
          "depth" => 0,
          "leaf" => nil,
          "missing" => 2,
          "no" => 3,
          "nodeid" => 1,
          "parentid" => nil,
          "split" => "petal length",
          "split_condition" => 3,
          "tree_id" => 0,
          "yes" => 2
        },
        %{
          "depth" => nil,
          "leaf" => 0.425454557,
          "missing" => nil,
          "no" => nil,
          "nodeid" => 2,
          "parentid" => 1,
          "split" => nil,
          "split_condition" => nil,
          "tree_id" => 0,
          "yes" => nil
        },
        %{
          "depth" => nil,
          "leaf" => -0.218918934,
          "missing" => nil,
          "no" => nil,
          "nodeid" => 3,
          "parentid" => 1,
          "split" => nil,
          "split_condition" => nil,
          "tree_id" => 0,
          "yes" => nil
        },
        %{
          "depth" => 0,
          "leaf" => nil,
          "missing" => 2,
          "no" => 3,
          "nodeid" => 1,
          "parentid" => nil,
          "split" => "petal length",
          "split_condition" => 3,
          "tree_id" => 1,
          "yes" => 2
        },
        %{
          "depth" => nil,
          "leaf" => -0.212727293,
          "missing" => nil,
          "no" => nil,
          "nodeid" => 2,
          "parentid" => 1,
          "split" => nil,
          "split_condition" => nil,
          "tree_id" => 1,
          "yes" => nil
        },
        %{
          "depth" => 1,
          "leaf" => nil,
          "missing" => 4,
          "no" => 5,
          "nodeid" => 3,
          "parentid" => 1,
          "split" => "petal width",
          "split_condition" => 1.79999995,
          "tree_id" => 1,
          "yes" => 4
        },
        %{
          "depth" => 2,
          "leaf" => nil,
          "missing" => 6,
          "no" => 7,
          "nodeid" => 4,
          "parentid" => 3,
          "split" => "petal length",
          "split_condition" => 5,
          "tree_id" => 1,
          "yes" => 6
        },
        %{
          "depth" => nil,
          "leaf" => 0.410982668,
          "missing" => nil,
          "no" => nil,
          "nodeid" => 6,
          "parentid" => 4,
          "split" => nil,
          "split_condition" => nil,
          "tree_id" => 1,
          "yes" => nil
        },
        %{
          "depth" => nil,
          "leaf" => -7.66345476e-9,
          "missing" => nil,
          "no" => nil,
          "nodeid" => 7,
          "parentid" => 4,
          "split" => nil,
          "split_condition" => nil,
          "tree_id" => 1,
          "yes" => nil
        },
        %{
          "depth" => 2,
          "leaf" => nil,
          "missing" => 8,
          "no" => 9,
          "nodeid" => 5,
          "parentid" => 3,
          "split" => "petal length",
          "split_condition" => 4.9000001,
          "tree_id" => 1,
          "yes" => 8
        },
        %{
          "depth" => nil,
          "leaf" => -7.66345476e-9,
          "missing" => nil,
          "no" => nil,
          "nodeid" => 8,
          "parentid" => 5,
          "split" => nil,
          "split_condition" => nil,
          "tree_id" => 1,
          "yes" => nil
        },
        %{
          "depth" => nil,
          "leaf" => -0.211034521,
          "missing" => nil,
          "no" => nil,
          "nodeid" => 9,
          "parentid" => 5,
          "split" => nil,
          "split_condition" => nil,
          "tree_id" => 1,
          "yes" => nil
        },
        %{
          "depth" => 0,
          "leaf" => nil,
          "missing" => 2,
          "no" => 3,
          "nodeid" => 1,
          "parentid" => nil,
          "split" => "petal width",
          "split_condition" => 1.60000002,
          "tree_id" => 2,
          "yes" => 2
        },
        %{
          "depth" => 1,
          "leaf" => nil,
          "missing" => 4,
          "no" => 5,
          "nodeid" => 2,
          "parentid" => 1,
          "split" => "petal length",
          "split_condition" => 4.9000001,
          "tree_id" => 2,
          "yes" => 4
        },
        %{
          "depth" => nil,
          "leaf" => -0.218530372,
          "missing" => nil,
          "no" => nil,
          "nodeid" => 4,
          "parentid" => 2,
          "split" => nil,
          "split_condition" => nil,
          "tree_id" => 2,
          "yes" => nil
        },
        %{
          "depth" => nil,
          "leaf" => -7.66345476e-9,
          "missing" => nil,
          "no" => nil,
          "nodeid" => 5,
          "parentid" => 2,
          "split" => nil,
          "split_condition" => nil,
          "tree_id" => 2,
          "yes" => nil
        },
        %{
          "depth" => 1,
          "leaf" => nil,
          "missing" => 6,
          "no" => 7,
          "nodeid" => 3,
          "parentid" => 1,
          "split" => "petal width",
          "split_condition" => 1.79999995,
          "tree_id" => 2,
          "yes" => 6
        },
        %{
          "depth" => nil,
          "leaf" => 0.0719999969,
          "missing" => nil,
          "no" => nil,
          "nodeid" => 6,
          "parentid" => 3,
          "split" => nil,
          "split_condition" => nil,
          "tree_id" => 2,
          "yes" => nil
        },
        %{
          "depth" => 2,
          "leaf" => nil,
          "missing" => 8,
          "no" => 9,
          "nodeid" => 7,
          "parentid" => 3,
          "split" => "petal length",
          "split_condition" => 4.9000001,
          "tree_id" => 2,
          "yes" => 8
        },
        %{
          "depth" => nil,
          "leaf" => 0.128571421,
          "missing" => nil,
          "no" => nil,
          "nodeid" => 8,
          "parentid" => 7,
          "split" => nil,
          "split_condition" => nil,
          "tree_id" => 2,
          "yes" => nil
        },
        %{
          "depth" => nil,
          "leaf" => 0.422068983,
          "missing" => nil,
          "no" => nil,
          "nodeid" => 9,
          "parentid" => 7,
          "split" => nil,
          "split_condition" => nil,
          "tree_id" => 2,
          "yes" => nil
        },
        %{
          "depth" => 0,
          "leaf" => nil,
          "missing" => 2,
          "no" => 3,
          "nodeid" => 1,
          "parentid" => nil,
          "split" => "petal length",
          "split_condition" => 3,
          "tree_id" => 3,
          "yes" => 2
        },
        %{
          "depth" => nil,
          "leaf" => 0.292982191,
          "missing" => nil,
          "no" => nil,
          "nodeid" => 2,
          "parentid" => 1,
          "split" => nil,
          "split_condition" => nil,
          "tree_id" => 3,
          "yes" => nil
        },
        %{
          "depth" => nil,
          "leaf" => -0.195790753,
          "missing" => nil,
          "no" => nil,
          "nodeid" => 3,
          "parentid" => 1,
          "split" => nil,
          "split_condition" => nil,
          "tree_id" => 3,
          "yes" => nil
        },
        %{
          "depth" => 0,
          "leaf" => nil,
          "missing" => 2,
          "no" => 3,
          "nodeid" => 1,
          "parentid" => nil,
          "split" => "petal length",
          "split_condition" => 3,
          "tree_id" => 4,
          "yes" => 2
        },
        %{
          "depth" => nil,
          "leaf" => -0.18925412,
          "missing" => nil,
          "no" => nil,
          "nodeid" => 2,
          "parentid" => 1,
          "split" => nil,
          "split_condition" => nil,
          "tree_id" => 4,
          "yes" => nil
        },
        %{
          "depth" => 1,
          "leaf" => nil,
          "missing" => 4,
          "no" => 5,
          "nodeid" => 3,
          "parentid" => 1,
          "split" => "petal width",
          "split_condition" => 1.79999995,
          "tree_id" => 4,
          "yes" => 4
        },
        %{
          "depth" => 2,
          "leaf" => nil,
          "missing" => 6,
          "no" => 7,
          "nodeid" => 4,
          "parentid" => 3,
          "split" => "petal length",
          "split_condition" => 5,
          "tree_id" => 4,
          "yes" => 6
        },
        %{
          "depth" => 3,
          "leaf" => nil,
          "missing" => 10,
          "no" => 11,
          "nodeid" => 6,
          "parentid" => 4,
          "split" => "sepal length",
          "split_condition" => 5.0999999,
          "tree_id" => 4,
          "yes" => 10
        },
        %{
          "depth" => nil,
          "leaf" => 0.110490814,
          "missing" => nil,
          "no" => nil,
          "nodeid" => 10,
          "parentid" => 6,
          "split" => nil,
          "split_condition" => nil,
          "tree_id" => 4,
          "yes" => nil
        },
        %{
          "depth" => nil,
          "leaf" => 0.295589149,
          "missing" => nil,
          "no" => nil,
          "nodeid" => 11,
          "parentid" => 6,
          "split" => nil,
          "split_condition" => nil,
          "tree_id" => 4,
          "yes" => nil
        },
        %{
          "depth" => nil,
          "leaf" => -0.0065466417,
          "missing" => nil,
          "no" => nil,
          "nodeid" => 7,
          "parentid" => 4,
          "split" => nil,
          "split_condition" => nil,
          "tree_id" => 4,
          "yes" => nil
        },
        %{
          "depth" => 2,
          "leaf" => nil,
          "missing" => 8,
          "no" => 9,
          "nodeid" => 5,
          "parentid" => 3,
          "split" => "petal length",
          "split_condition" => 4.9000001,
          "tree_id" => 4,
          "yes" => 8
        },
        %{
          "depth" => nil,
          "leaf" => -0.00258299569,
          "missing" => nil,
          "no" => nil,
          "nodeid" => 8,
          "parentid" => 5,
          "split" => nil,
          "split_condition" => nil,
          "tree_id" => 4,
          "yes" => nil
        },
        %{
          "depth" => nil,
          "leaf" => -0.187741965,
          "missing" => nil,
          "no" => nil,
          "nodeid" => 9,
          "parentid" => 5,
          "split" => nil,
          "split_condition" => nil,
          "tree_id" => 4,
          "yes" => nil
        },
        %{
          "depth" => 0,
          "leaf" => nil,
          "missing" => 2,
          "no" => 3,
          "nodeid" => 1,
          "parentid" => nil,
          "split" => "petal width",
          "split_condition" => 1.60000002,
          "tree_id" => 5,
          ...
        },
        %{
          "depth" => 1,
          "leaf" => nil,
          "missing" => 4,
          "no" => 5,
          "nodeid" => 2,
          "parentid" => 1,
          "split" => "petal length",
          "split_condition" => 4.9000001,
          ...
        },
        %{
          "depth" => nil,
          "leaf" => -0.195117101,
          "missing" => nil,
          "no" => nil,
          "nodeid" => 4,
          "parentid" => 2,
          "split" => nil,
          ...
        },
        %{
          "depth" => nil,
          "leaf" => 0.00513018994,
          "missing" => nil,
          "no" => nil,
          "nodeid" => 5,
          "parentid" => 2,
          ...
        },
        %{"depth" => 1, "leaf" => nil, "missing" => 6, "no" => 7, "nodeid" => 3, ...},
        %{"depth" => nil, "leaf" => 0.0662105083, "missing" => nil, "no" => nil, ...},
        %{"depth" => nil, "leaf" => 0.283106089, "missing" => nil, ...},
        %{"depth" => 0, "leaf" => nil, ...},
        %{"depth" => nil, ...},
        %{...},
        ...
      ]
    },
    %{
      "name" => "treeCalcs",
      "source" => "tree",
      "transform" => [
        %{"expr" => "datum.tree_id === selectedTree", "type" => "filter"},
        %{"key" => "nodeid", "parentKey" => "parentid", "type" => "stratify"},
        %{
          "as" => ["x", "y", "depth", "children"],
          "method" => "tidy",
          "separation" => %{"signal" => "false"},
          "type" => "tree"
        }
      ]
    },
    %{
      "name" => "treeChildren",
      "source" => "treeCalcs",
      "transform" => [
        %{
          "as" => ["childrenObjects"],
          "fields" => ["parentid"],
          "groupby" => ["parentid"],
          "ops" => ["values"],
          "type" => "aggregate"
        },
        %{
          "as" => "childrenIds",
          "expr" => "pluck(datum.childrenObjects,'nodeid')",
          "type" => "formula"
        }
      ]
    },
    %{
      "name" => "treeAncestors",
      "source" => "treeCalcs",
      "transform" => [
        %{
          "as" => "treeAncestors",
          "expr" => "treeAncestors('treeCalcs', datum.nodeid, 'root')",
          "type" => "formula"
        },
        %{"fields" => ["treeAncestors"], "type" => "flatten"},
        %{"as" => "allParents", "expr" => "datum.treeAncestors.parentid", "type" => "formula"}
      ]
    },
    %{
      "name" => "treeChildrenAll",
      "source" => "treeAncestors",
      "transform" => [
        %{
          "fields" => ["allParents", "nodeid", "name", "parentid", "x", "y", "depth", "children"],
          "type" => "project"
        },
        %{
          "as" => ["allChildrenObjects", "allChildrenCount", "id"],
          "fields" => ["parentid", "parentid", "nodeid"],
          "groupby" => ["allParents"],
          "ops" => ["values", "count", "min"],
          "type" => "aggregate"
        },
        %{
          "as" => "allChildrenIds",
          "expr" => "pluck(datum.allChildrenObjects,'nodeid')",
          "type" => "formula"
        }
      ]
    },
    %{
      "name" => "treeClickStoreTemp",
      "source" => "treeAncestors",
      "transform" => [
        %{
          "expr" => "startingDepth != -1 ? datum.depth <= startingDepth : node != 0 && !isExpanded ? datum.parentid == node: node != 0 && isExpanded ? datum.allParents == node : false",
          "type" => "filter"
        },
        %{"fields" => ["nodeid", "parentid", "x", "y", "depth", "children"], "type" => "project"},
        %{
          "fields" => ["nodeid"],
          "groupby" => ["nodeid", "parentid", "x", "y", "depth", "children"],
          "ops" => ["min"],
          "type" => "aggregate"
        }
      ]
    },
    %{
      "name" => "treeClickStorePerm",
      "on" => [
        %{"insert" => "data('treeClickStoreTemp')", "trigger" => "startingDepth >= 0"},
        %{"insert" => "!isExpanded ? data('treeClickStoreTemp'): false", "trigger" => "node"},
        %{"remove" => "isExpanded ? data('treeClickStoreTemp'): false", "trigger" => "node"}
      ],
      "values" => []
    },
    %{
      "name" => "treeLayout",
      "source" => "tree",
      "transform" => [
        %{"expr" => "datum.tree_id === selectedTree", "type" => "filter"},
        %{"expr" => "indata('treeClickStorePerm', 'nodeid', datum.nodeid)", "type" => "filter"},
        %{"key" => "nodeid", "parentKey" => "parentid", "type" => "stratify"},
        %{
          "as" => ["x", "y", "depth", "children"],
          "method" => "tidy",
          "nodeSize" => [
            %{"signal" => "nodeWidth + spaceBetweenNodes"},
            %{"signal" => "nodeHeight+ spaceBetweenLevels"}
          ],
          "separation" => %{"signal" => "false"},
          "type" => "tree"
        },
        %{"as" => "y", "expr" => "-1*(datum.y+(height/10))", "type" => "formula"},
        %{"as" => "x", "expr" => "1*(datum.x+(width/2))", "type" => "formula"},
        %{"field" => "x", "signal" => "x_extent", "type" => "extent"},
        %{"field" => "y", "signal" => "y_extent", "type" => "extent"},
        %{"as" => "xscaled", "expr" => "scale('xscale',datum.x)", "type" => "formula"},
        %{"as" => "parent", "expr" => "datum.parentid", "type" => "formula"}
      ]
    },
    %{
      "name" => "fullTreeLayout",
      "source" => "treeLayout",
      "transform" => [
        %{
          "fields" => ["nodeid"],
          "from" => "treeChildren",
          "key" => "parentid",
          "type" => "lookup",
          "values" => ["childrenObjects", "childrenIds"]
        },
        %{
          "fields" => ["nodeid"],
          "from" => "treeChildrenAll",
          "key" => "allParents",
          "type" => "lookup",
          "values" => ["allChildrenIds", "allChildrenObjects"]
        },
        %{
          "fields" => ["nodeid"],
          "from" => "treeCalcs",
          "key" => "nodeid",
          "type" => "lookup",
          "values" => ["children"]
        },
        %{
          "as" => "treeParent",
          "expr" => "reverse(pluck(treeAncestors('treeCalcs', datum.nodeid), 'nodeid'))[1]",
          "type" => "formula"
        },
        %{"as" => "isLeaf", "expr" => "datum.leaf == null", "type" => "formula"}
      ]
    },
    %{
      "name" => "splitNodes",
      "source" => "fullTreeLayout",
      "transform" => [
        %{
          "expr" => "indata('treeClickStorePerm', 'nodeid', datum.nodeid) && datum.isLeaf",
          "type" => "filter"
        }
      ]
    },
    %{
      "name" => "leafNodes",
      "source" => "fullTreeLayout",
      "transform" => [
        %{
          "expr" => "indata('treeClickStorePerm', 'nodeid', datum.nodeid) && !datum.isLeaf",
          "type" => "filter"
        }
      ]
    },
    %{
      "name" => "links",
      "source" => "treeLayout",
      "transform" => [
        %{"type" => "treelinks"},
        %{
          "orient" => "vertical",
          "shape" => "line",
          "sourceX" => %{"expr" => "scale('xscale', datum.source.x)"},
          "sourceY" => %{"expr" => "scale('yscale', datum.source.y)"},
          "targetX" => %{"expr" => "scale('xscale', datum.target.x)"},
          "targetY" => %{"expr" => "scale('yscale', datum.target.y) - scaledNodeHeight"},
          "type" => "linkpath"
        },
        %{
          "expr" => " indata('treeClickStorePerm', 'nodeid', datum.target.nodeid)",
          "type" => "filter"
        }
      ]
    },
    %{
      "name" => "yesPaths",
      "source" => "links",
      "transform" => [%{"expr" => "datum.source.yes === datum.target.nodeid ", "type" => "filter"}]
    },
    %{
      "name" => "noPaths",
      "source" => "links",
      "transform" => [%{"expr" => "datum.source.yes !== datum.target.nodeid ", "type" => "filter"}]
    }
  ]
}

The Vega fields which are not included with get_data_spec/2 and are included in plot/2 are:

You can make a completely valid plot using only the Data from get_data_specs/2 and adding the marks you need.

Comments