Is there a supported way to get list of features used by a H2O model during its training?

Viewed 1608

This is my situation. I have over 400 features, many of which are probably useless and often zero. I would like to be able to:

  • train an model with a subset of those features
  • query that model for the features actually used to build that model
  • build a H2OFrame containing just those features (I get a sparse list of non-zero values for each row I want to predict.)
  • pass this newly constructed frame to H2OModel.predict() to get a prediction

I am pretty sure what found is unsupported but works for now (v 3.13.0.341). Is there a more robust/supported way of doing this?

model._model_json['output']['names']

The response variable appears to be the last item in this list.

In a similar vein, it would be nice to have a supported way of finding out which H2O version that the model was built under. I cannot find the version number in the json.

1 Answers
Related