randomForestExplainer icon indicating copy to clipboard operation
randomForestExplainer copied to clipboard

`explain_forest` errors, doesn't produce HTML document

Open bedwards-mango opened this issue 3 years ago • 0 comments

Firstly, thank you for this package.

I've discovered a couple of issues.

Using the example from the docs as a reprex:

forest <- randomForest::randomForest(Species ~ ., data = iris, localImp = TRUE)
explain_forest(forest, interactions = TRUE)

For me this produces the error Error in file(con, "w") : cannot open the connection. I'm using randomForestExplainer_0.10.1. Six images are produced in Your_forest_explained_files/figure-html but not an HTML file.

Additionally, when setting the path parameter:

  • The function error if the given path doesn't exist
  • The path must be absolute, or an error is produced. Would relative paths be possible?
  • In the case that the given directory does exist, and is provided via an absolute path, the function doesn't use that path - it instead creates another directory in the parent directory with the same name as the provided directory with _files appended to the end.

Any resolve to these issues would be greatly appreciated.

bedwards-mango avatar Jul 06 '22 08:07 bedwards-mango