1
votes

I want to predict tags using an H2o deep learning model, and I can't interpret my H2o deep learning output.

That's my model parameters of the H2o deep learning model.

dl_model = deeplearning.H2ODeepLearningEstimator(hidden =[200,200],
                                    epochs  = 10,
                                    missing_values_handling= 'MeanImputation',
                                    activation = "Tanh", 
                            )

I pass the word2vec vectors of Blog Content which names as Content.vecs and Y is also word2vec of Tags.

Train the model

dl_model.train(x= Content_vecs.names,
               y= 'Y',
               training_frame   = data_split[0],
               validation_frame = data_split[1]
               )

and the output is

**predict
-0.700515
-0.700515
-0.700515
-0.700515
-0.700515
-0.700515
-0.700515
-0.700515
-0.700515
-0.700515**

In Original Data Predictor variable is Content and response variable is tags. I passing Word2vec vectors of Contents as x and Tags as y of in deep learning Figure. I want to predict single or multiple tag using H2o deep learning and word2vec

1
Can you post a few rows of what your original target column looks like, and define for us what each of the values in that target column mean? It'd be helpful to understand what you are trying to predict, and make sure you are only passing one target value per record. Thanks!Lauren
@Lauren it's updatedSanjay Kumar
thanks! so in your image what does -.84471 mean and what does -.420157? Please also make sure that if you want this to be a multi-class classification problem that you specify distribution="multinomial" otherwise the algo will assume, given a numeric target that you are trying to do a regression problem.Lauren
@Lauren -84471 is the word2vec value of response (tags) variable or Can i pass the tag data as text data ?Sanjay Kumar
Deep learning return predict one vector . How i can check that what value or tag he predicted for that content ?Sanjay Kumar

1 Answers

1
votes

First make sure that you specify distribution="multinomial". If you don't have too many tags, then you can just use the original tag as a response level. Otherwise if you leave numeric value levels, you will need to have some mapping that you can use to see what values correspond to your original tags.

here is also an example of how to use word2vec with an H2O algo, to give you a sense of what your target should look like: https://github.com/h2oai/h2o-3/blob/master/h2o-py/demos/word2vec_craigslistjobtitles.ipynb as well as a tutorial for deep learning: https://github.com/h2oai/h2o-tutorials/tree/master/tutorials/deeplearning