CRAN release 0.2.0
New major features
-
average_loss(): This new function calculates the average loss of a model for a given dataset, optionally grouped by a discrete vector. It supports the most important loss functions (squared error, Poisson deviance, Gamma deviance, Log loss, multivariate Log loss, absolute error, classification error), and allows for case weights. Custom losses can be passed as vector/matrix valued functions of signature
f(obs, pred)
.
Note that such a custom function needs to return per-row losses, not their average. -
perm_importance(): H-statistics are often calculated for important features only. To support this workflow, we have added permutation importance regarding the most important loss functions. Multivariate losses can be studied individually or collapsed over dimensions. The importance of feature groups can be studied as well. Note that the API of
perm_importance()
is different from the experimentalpd_importance()
, which is calculated from a "hstats" object.
Major changes in defaults
hstats()
now uses the default feature vectorv = colnames(X)
, simplifying the API in most cases. The typical call is nowhstats(object, X = Feature data)
.h2_overall()
,h2_pairwise()
,h2_threeway()
,pd_importance()
by default do not plot results anymore. Setplot = TRUE
to do so.
Minor changes
summary.hstats()
now returns an object of class "summary_hstats" with its ownprint()
method. Like this, one can usesu <- summary()
without printing to the console.- The output of
summary.hstats()
is printed slightly more compact. plot.hstats()
has recieved arotate_x = FALSE
argument for rotating x labels by 45 degrees.plot.hstats()
andsummary.hstats()
have received explicit argumentsnormalize
,squared
,sort
,eps
instead of passing them via...
.plot.hstats()
now passes...
togeom_bar()
.- Slight speed-up of
hstats()
in the one-dimensional case.
Bug fixes
- Probabilistic {mlr3} classifiers did not work out-of-the box. This has been fixed.