I am trying to build a model that gives reddit_score = f('subreddit','comment')
This is basically an example that I can use for a working project.
My code is here .
My problem is that I see that canned evaluations like DNNLinearCombinedRegressor should have feature_columns that are part of the class FeatureColumn.
I have my vocab file and know that if I just limited the first word of the comment, I could just do something like
tf.feature_column.categorical_column_with_vocabulary_file(
key='comment',
vocabulary_file='{}/vocab.csv'.format(INPUT_DIR)
)
But if I go through, I will say the first 10 words from the comment, then I’m not sure how to go from a line, such as "this is a pre padded 10 word comment xyzpadxyz xyzpadxyz", to feature_column, so that I can build an attachment to go to a deepfunction in a wide and deep model.
It seems like it should be something really obvious or simple, but life cannot find for me any existing examples with this particular setting (finished wide and deep, api dataset and a combination of functions like subreddit and raw text function as a comment).
I even thought about doing a holistic search for vocals in such a way that the function commentthat I pass will be similar to [23,45,67,12,1,345,7,99,999,999], and then, maybe, I can get it through numeric_feature with the form, and then from there do something with it. But this is a little strange.