forester: an R package for automated constructing of tree-based models Package’s history What’s the forester? AutoML and forester pipelines Why tree-based models? Package structure and user interface


On this blog, we’d prefer to introduce you to the brand latest, reorganised and restructured version of the forester R package.

Responsible ML readers might already be accustomed to the package’s name and possibly wonder why we’re describing it again. The previous version of the forester was introduced about 1.5 years before (the authors: Anna Kozak, Szymon Szmajdziński, Thien Hoang Ly) and was followed by two blogs: ‘forester: An AutoML R package for Tree-based Models’, and ‘Guide through jungle of models! What’s more in regards to the forester R package?’. Unfortunately, due to other responsibilities and latest opportunities, the authors weren’t able to take care of the package, which result in the purpose where reanimation of the tool was needed. A latest scientific team (Anna Kozak, Hubert Ruczyński, Adrianna Grudzień, Patryk Słowakiewicz) overtook the project and created it from scratch, learning from its predecessors’ mistakes.

The forester is an AutoML tool in R forand Itwraps up all machine learning processes right into a single train() function, which incorporates:

  1. rendering a transient ,
  2. the initial dataset enough for models to be trained,
  3. (decision tree, random forest, xgboost, catboost, lightgbmwith default parameters, random search and Bayesian optimisation,
  4. evaluating them and providing a .

Nevertheless, that’s not every part that the forester has to supply. Via additional functions, the user can easily explain created models with the usage of DALEX or generate one in all the predefined .

The packages fundamental goal is to take care of the user interface so simple as possible, so everyone can profit from its possibilities. It’s specifically designed for:

  1. to coach their first models and begin their modelling profession.
  2. to simply add ML solutions and evaluation for his or her thesis.
  3. to simply conduct dataset evaluation, create baseline models, and quickly explore latest tasks they’re facing.

So as to fully understand what the forester package offers we want to offer a transient knowledge in regards to the machine learning (ML) and automatic machine learning (AutoML) pipelines.

The classical ML pipeline starts with two pre-modelling steps that are task identification and data collection. They’re undoubtedly essential, nonetheless, we’ll give attention to the steps highlighted in green color, because they’re the guts of the entire process.

In the course of the stage, data scientists give attention to proper data preparation, in order that the models will be later trained. Typical actions performed listed here are missing values imputation, data encoding or the removal of static columns. The process consists of more advanced methods and its goal is to pick crucial columns from the dataset for the model training. It includes for instance the removal of highly correlated columns, or selection via lasso or ridge methods for regression tasks. Probably the most time-consuming step is . At this point, the information scientist has to pick the model engines and tune loads of hyperparameters manually in an effort to achieve one of the best results. In the long run, comes the which incorporates evaluating the models by different metrics and comparing them to 1 one other to decide on one of the best one.

As one can see, model training is an iterative process that consists of highly repetitive steps, and finally ends up being incredibly time-consuming. The very best approach to fight that’s to make use of an AutoML tool. As shown below, such solutions automate the ML pipeline, so data scientists can cope with more essential matters.

Some users is perhaps surprised that every one models used contained in the package are from a tree-based family and wonder if there are any particular reasons for doing so. There definitely are and essentially the most outstanding ones are:

  1. Tree-based models are extremely popular amongst winners in Kaggle competitions, which shows their .
  2. They’re superior to deep learning neural networks, because of a .
  3. Bagging and boosting ensembles .
  4. Tree-based models are for users without an ML background and have already established good opinions amongst doctors.

For further reading and more in-depth evaluation of the tree-based models’ performance we recommend a paper by Leo Grisztajn ‘Why do tree-based models still outperform deep learning on tabular data?’. The visualisations below come from the aforementioned publication.

The graph presented below briefly summarises the processes within the fundamental train() function and it adds details about additional features of the package. The function creates an explainable artificial intelligence (XAI) explainer from DALEX package. The function lets the user save final object, and the creates an robotically generated report from the training process. One may also use a function, which can also be present within the preprocessing step.

In the following blog post we’ll describe all forester features intimately and we’ll underline what makes the package special amongst other AutoML solutions in R.

In the event you are excited about other posts about explainable, fair and responsible ML, follow #ResponsibleML on Medium.
So as to see more R related content visit


What are your thoughts on this topic?
Let us know in the comments below.


0 0 votes
Article Rating
1 Comment
Newest Most Voted
Inline Feedbacks
View all comments

Share this article

Recent posts

Would love your thoughts, please comment.x