-4

How do I get the corresponding feature importance of every variable in a GBT Classifier model in pyspark

Alper t. Turker
  • 34,230
  • 9
  • 83
  • 115

1 Answers1

3

From spark 2.0+ (here) You have the attribute:

model.featureImportances

This will give a sparse vector of feature importance for each column/ attribute

Community
  • 1
  • 1
pratiklodha
  • 1,095
  • 12
  • 20