random-forest-importances icon indicating copy to clipboard operation
random-forest-importances copied to clipboard

An error occurred when the test file was run

Open LilWei-DU opened this issue 1 year ago • 1 comments

I got an error running "permutation-importances-classifier", “forest” seems to be updated to “_forest” in sklearn. I changed "from sklearn.ensemble.forest import _generate_unsampled_indices" to "from sklearn.ensemble._forest import _generate_unsampled_indices" and it worked fine.

In the same code, "unsampled_indices = _generate_unsampled_indices(tree.random_state, n_samples)" shows missing "TypeError: _generate_unsampled_indices() missing 1 required positional argument: 'n_samples_bootstrap'" when running. The function of _generate_unsampled_indices is defined as: "def _generate_unsampled_indices(random_state, n_samples, n_samples_bootstrap):".

LilWei-DU avatar Sep 05 '22 08:09 LilWei-DU