iml icon indicating copy to clipboard operation
iml copied to clipboard

Feature - request inclusion of raw results as well as aggregated summaries in returned object

Open py9mrg opened this issue 3 years ago • 1 comments

Please consider including the raw results as well as aggregated results in the value returned by methods such as FeatureImp$new - e.g. in lines 312 - 325 of FeatureImp.R:

      result <- result[, list(
        "importance" = median(importance_raw),
        "permutation.error" = median(permutation_error),
        "importance.05" = quantile(importance_raw, probs = 0.05),
        "importance.95" = quantile(importance_raw, probs = 0.95)
      ), by = list(feature)]
      result <- result[order(result$importance, decreasing = TRUE), ]
      # Removes the n column
      result <- result[, list(
        feature, importance.05, importance, importance.95,
        permutation.error
      )]
      private$finished <- TRUE
      self$results <- data.frame(result)

It would be nice to add importance_raw as a list element either in results or at some higher level of the returned object. That way it allows us to make our own aggregations so we can change the cut off %s, plot the whole distribution, use a different summary statistic (e.g. I note another issue #170 is asking for mean instead of median). And similarly for other methods that return aggregated summaries from some raw initial result.

py9mrg avatar Mar 22 '22 13:03 py9mrg

Thanks for contributing @py9mrg!

Note that this package is not actively developed right now. If you want to see such a change, then I suggest

  • you provide a complete reproducible example instead of a code excerpt
  • create a pull request which implements the proposed change in a first version

This will increase the chances getting it implemented, though there is no guarantee.

pat-s avatar Mar 22 '22 21:03 pat-s