[scikit-learn] Create a "Feature_Weight" Parameter at RandomForestRegressor

luizfgoncalves at dcc.ufmg.br luizfgoncalves at dcc.ufmg.br
Mon Jul 4 16:09:20 EDT 2016


I would like to give different weights to the features in the feature set
for the split task of Random Forest. Right now, only the MSE metric is
used to select the best split, and I want to do something like feature[i]
= MSI[i] * feature_weight[i]. This way, I'll be able to give more
importance to the features I already know that are better.

In my mind, this change would be called on the fit function, something
like this: def fit(self, X, y, sample_weight, feature_weight):
And the feature_weight would be a vector with customized weights for all
features present in the dataset.

What is the best way to do that? I'm having a really hard time figuring
out how to do this changes on the code.
Thanks a lot for your attention.

Luiz Felipe



More information about the scikit-learn mailing list