Note
Go to the end to download the full example code or to run this example in your browser via Binder
sul1 permutation
from ai4water import Model
from sul1_utils import get_fitted_model, sul1_data
********** Removing Examples with nan in labels **********
***** Training *****
input_x shape: (374, 6)
target shape: (374, 1)
model = get_fitted_model(Model)
x, y, input_features, output_features = sul1_data()
********** Removing Examples with nan in labels **********
***** Training *****
input_x shape: (374, 6)
target shape: (374, 1)
pimp = model.permutation_importance(x=x,
y=y,
n_repeats=100,
scoring="r2",
plot_type="boxplot")

pimp.plot_1d_pimp("bar_chart")

<AxesSubplot: title={'center': 'Base Score 0.153'}, xlabel='$R^{2}$'>
pimp = model.permutation_importance(x=x,
y=y,
n_repeats=100,
scoring="nse",
plot_type="boxplot")

pimp.plot_1d_pimp("bar_chart")

<AxesSubplot: title={'center': 'Base Score 0.083'}, xlabel='NSE'>
pimp = model.permutation_importance(x=x,
y=y,
n_repeats=100,
scoring="rmsle",
plot_type="boxplot")

Total running time of the script: ( 0 minutes 5.548 seconds)