I have certain tree structures. I am not an expert in machine learning.
As I would with take KNN, I would calculate distances via metric function and a new data point and the points from the training set. Okay, understood.
Now let's consider the data points aren't tuples but trees. How would one calculate the distances between two graphs.
For instance, I want the following
I have several stereotypical trees like:
| - <form class="xyz"> | - <input type="text"> - <button value="Click here">
between all these node, there could be arbitrary other nodes, the value of the button-node could be different, the type of the input node could be different, even the button-node could be a different node type, like
input, the form-node will be surrounded by arbitrary nodes.
How would one calculate such a distance between trees?