Publications by Michael Mayer

shapviz goes H2O

11.07.2022

In a recent post, I introduced the initial version of the “shapviz” package. Its motto: do one thing, but do it well: visualize SHAP values. The initial community feedback was very positive, and a couple of things have been improved in version 0.2.0. Here the main changes: “shapviz” now works with tree-based models of the h2o package in R...

2952 sym R (906 sym/1 pcs) 10 img

Illustrating The Central Limit Theorem

07.01.2021

Lost in Translation between R and Python 1 This is the first article in our series “Lost in Translation between R and Python”. The aim of this series is to provide high-quality R and Python 3 code to achieve some non-trivial tasks. If you are to learn R, check out the R tab below. Similarly, if you are to learn Python, the Python tab will be ...

2543 sym R (1086 sym/2 pcs) 4 img

Covid-19 Deaths per Mio

26.01.2021

Lost in Translation between R and Python 2 Hello again! This is the next article in our series “Lost in Translation between R and Python”. The aim of this series is to provide high-quality R and Python 3 code to achieve some non-trivial tasks. If you are to learn R, check out the R tab below. Similarly, if you are to learn Python, the Python ...

1685 sym R (1386 sym/2 pcs) 2 img

A Beautiful Regression Formula

14.03.2021

Lost in Translation between R and Python 4 Hello statistics aficionados This is the next article in our series “Lost in Translation between R and Python”. The aim of this series is to provide high-quality R and Python 3 code to achieve some non-trivial tasks. If you are to learn R, check out the R tab below. Similarly, if you are to learn Pyt...

2488 sym R (1595 sym/4 pcs)

A Curious Fact on the Diamonds Dataset

16.04.2021

Lost in Translation between R and Python 5 Hello regression world This is the next article in our series “Lost in Translation between R and Python”. The aim of this series is to provide high-quality R and Python 3 code to achieve some non-trivial tasks. If you are to learn R, check out the R tab below. Similarly, if you are to learn Python, t...

5339 sym R (2925 sym/4 pcs) 8 img

Strong random forests with XGBoost

21.05.2021

Lost in Translation between R and Python 6 Hello random forest friends This is the next article in our series “Lost in Translation between R and Python”. The aim of this series is to provide high-quality R and Python 3 code to achieve some non-trivial tasks. If you are to learn R, check out the R tab below. Similarly, if you are to learn Pyth...

7868 sym R (3334 sym/4 pcs) 2 img

SHAP Analysis in 9 Lines

23.06.2021

Hello ML world Recently, together with Yang Liu, we have been investing some time to extend the R package SHAPforxgboost. This package is designed to make beautiful SHAP plots for XGBoost models, using the native treeshap implementation shipped with XGBoost. Some of the new features of SHAPforxgboost Added support for LightGBM models, using the...

6140 sym R (3280 sym/6 pcs) 18 img

Random Forests with Monotonic Constraints

13.11.2021

Lost in Translation between R and Python 7 Hello random forest friends This is the next article in our series “Lost in Translation between R and Python”. The aim of this series is to provide high-quality R and Python 3 code to achieve some non-trivial tasks. If you are to learn R, check out the R tab below. Similarly, if you are to learn Pyth...

6141 sym R (4501 sym/4 pcs) 6 img

X-Mas Tree with 10 Lines of R Code

20.12.2021

Besides the many negative aspects of going through a pandemic, there are also certain positive ones like having time to write short blog posts like this. This one picks up a topic that was intensively discussed a couple of years ago on Wolfram’s page: Namely that the damped sine wave f(t) = t sin(t) can be used to draw a Christmas tree. Throw...

1107 sym R (519 sym/1 pcs) 2 img

Avoid loops in R! Really?

19.02.2022

It must have been around the year 2000, when I wrote my first snipped of SPLUS/R code. One thing I’ve learned back then: Loops are slow. Replace them with vectorized calculations orif vectorization is not possible, use sapply() et al. Since then, the R core team and the community has invested tons of time to improve R and also to make it faster...

2923 sym R (1693 sym/2 pcs) 8 img