New answers tagged

0

Quoting from here: Converting a binary variable into a one-hot encoded one is redundant and may lead to troubles that are needless and unsolicited. Although correlated features may not always worsen your model, yet they will not always improve it either.


1

In fact, there are some works related to using regularization on decision tree splitting. For example, in [1], the author proposes a cost function to penalize redundant features, and thus get a more succinct feature set. The experimental results reveal that it can effectively get a more concise feature subset without loss of accuracy. [1]. Deng H, Runger G. ...


1

There's a number of things you can try but none are guaranteed to work. Here's a short list of ideas: There's an entire field called hyper-parameter optimization that you could explore for tweaking the parameters of your forest. Probably the easiest (and reasonably effective) method is a random search. Give some ranges to each parameter and randomly vary ...


1

No, this is probably not a good idea. The concept behind a RFR is to average a lot of "bad" predictions in order to get a good one. This does not necessarily entail that the individual predictions are realistic. This is something that you would need to construct a valid uncertainty range. For example, If you have many bad predictions that are too ...


0

I got a similar problem using the package randomForest for a binary classification. In my case, executing predict() on the same rf and the same validation set consisting of a single record I got different predictions, sometimes 0 and sometimes 1. I discovered that such issue is present when both output classes have the same probability, predict(..., type=&...


1

Your function BinariserDF is probably the problem. Since you're using it in a FunctionTransformer, it gets called separately for the training and test folds in the cross-validation, so the number of dummy variables may be different, and the model scoring fails. Instead, use SimpleImputer and ColumnTransformer with OneHotEncoder. (The encoding is also ...


0

Since a while back one can use SHAP to exlain scikit-learn Isolation Forest models. Example code and output in this answer.


Top 50 recent answers are included