effective_xgboost_book icon indicating copy to clipboard operation
effective_xgboost_book copied to clipboard

Violin Plot p.98

Open FutureGoose opened this issue 1 year ago • 0 comments

The violinplot function in seaborn doesn't need a kind parameter because it's already clear what kind of plot you want—a violin plot. You may have confused this with the catplot or factorplot functions, which do require a kind parameter because those functions can generate different kinds of plots.

The corrected line should simply remove the kind argument:

sns.violinplot(x='max_depth', y='loss', data=hyper2hr, ax=ax)

Please note: To replicate the color-coded output as shown in the example from the book, you will need to incorporate color distinctions, which can be achieved by utilizing the 'hue' parameter in your code.

FutureGoose avatar Nov 06 '23 19:11 FutureGoose