You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running a transform from an untrained RandomTreesEmbedding class, the failure message isn't helpful:
return self.one_hot_encoder_.transform(self.apply(X))
AttributeError: 'RandomTreesEmbedding' object has no attribute 'one_hot_encoder_'
This is because the method RandomTreesEmbedding.transform doesn't check for the existence of the fit before performing the transform. Since forest.py imports check_is_fitted, I think this can be solved by changing the method to add the line check_is_fitted(self, 'one_hot_encoder_') just before the return statement (the only line of code in the transform method).
I can do this and put in a pull request, if you like.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
sklearn: 0.20.0
When running a transform from an untrained RandomTreesEmbedding class, the failure message isn't helpful:
This is because the method RandomTreesEmbedding.transform doesn't check for the existence of the fit before performing the transform. Since forest.py imports check_is_fitted, I think this can be solved by changing the method to add the line
check_is_fitted(self, 'one_hot_encoder_')
just before the return statement (the only line of code in the transform method).I can do this and put in a pull request, if you like.
The text was updated successfully, but these errors were encountered: