Jun-25-2018, 09:06 AM
Hi Everyone,
I am running a model and then I output the most import features with this code.
array([0.05771354, 0.05546155, 0.00769528, 0.03085979, 0.01987578,
0.05596404, 0.08724213, 0.04514583, 0.03068226, 0.03416644,
0.033704 , 0.03123091, 0.04680151, 0.04481024, 0.04322517,
0.04328215, 0.04302698, 0.04359057, 0.04307562, 0.04042718,
0.03971901, 0.03909929, 0.04083307, 0.04236768])
Is there anyway I can get python to print the column names as well so i know what variable has what weighting?
Thanks
Scott
I am running a model and then I output the most import features with this code.
feature_importances = grid_search.best_estimator_.feature_importances_ feature_importancesIt gives me an array like this:
array([0.05771354, 0.05546155, 0.00769528, 0.03085979, 0.01987578,
0.05596404, 0.08724213, 0.04514583, 0.03068226, 0.03416644,
0.033704 , 0.03123091, 0.04680151, 0.04481024, 0.04322517,
0.04328215, 0.04302698, 0.04359057, 0.04307562, 0.04042718,
0.03971901, 0.03909929, 0.04083307, 0.04236768])
Is there anyway I can get python to print the column names as well so i know what variable has what weighting?
Thanks
Scott