What's the best approach for machine learning on deeply hierarchical JSON/XML/DOM documents (not counting text nodes)?
Say I want to recognize and generate documents similar to a training set of around 4000 documents, and assume that I can have test data with "bad" documents which I don't have yet. I have boiled my feature vector down to (
child id or
location of child in parent). However, the step beyond that is my question. Do I start doing one-hot encodings of types and ids, or do I use embeddings?
If parents and children are the axes of my matrix, what do I use for the values in the matrix? I don't have ratings, all I have is child ID/Value and child location. Is that what I use in the matrix to do embeddings? (Sorry for the very general question, I'm just getting started on machine learning.)
Also, can I do nested embeddings? Say I want to embed words in my child values. Also, If I use one-hot encodings or embeddings, can I use types and ids which are not valid? (Probably not, I would guess.)
So I'll really only be testing the structural soundness of my data. What I want to do is generate structurally beautiful data (my documents are of a visual nature and relationships between typed data is important). If someone has already done this, and has a paper or open source software, please let me know.