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

Andreas Mueller t3kcit at gmail.com
Fri Jul 8 17:00:42 EDT 2016

You would need to implement a custom splitter, I think.

On 07/04/2016 04:09 PM, luizfgoncalves at dcc.ufmg.br wrote:
> 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
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn

More information about the scikit-learn mailing list