# From Labels to Graph: what machine learning approaches to use?

Imagine a world where we have places (e.g., cities, restaurants, national parks, etc.) but no roads connecting them.

Our objective is to build roads connecting any two places while going through some given places. For instance, connect Seattle to San Francisco and make sure the connection goes through restaurants X and Y and goes through the Red Wood national park. Note, there is not necessarily one possible road, hence multiple options as output are also acceptable.

We have some roads as examples to train the system. For instance, we have a road from Washington DC to Boston that goes through Baltimore.

So, the input to a machine learning system will be a list of strings (e.g., city names and places to go through) and the expected output is a tree/graph that connects the given points.

(Note, this cannot be a graph traversing problem, as a path the connects the points does not exist.)

I want a machine learning model that can produce/generate a novel graph in the output given a set of labels.

Any thoughts on what ML machine learning methods I can use and where to start?

## Update 1

Note that I have neither of the following:

1. A graph of route(s) from Seatle to San Francisco;
2. A larger graph that contains a route from Seatle to San Francisco.

Instead, I have graphs for routes from Los Angles to Texas (with stops for eating and seeing landscape), from Milan to Rome, and etc.

Therefore, I think this is not a graph searching problem.

## Update 2

I take that the initial question was not clear, so I reworded it.

• It sounds a little like a Markov Decision Process. I'd imagine that any way that you frame the problem, it will be a graph searching algorithm that solves it rather than any machine learning. Oct 21, 2020 at 6:01
• This will need to generate novel graphs. Oct 21, 2020 at 21:15
• I think this is a graph problem, where the initial graph is a fully connected graph since potentially every road can be built. The question is how you should determine the weights of the edges, based on interconnecting the maximum of cities in the most efficient way. Dec 13, 2020 at 21:20
• @Erwan in my application, I do not have a "complete" prior knowledge of the edges as some nodes cannot be connected to each other. Therefore, I'm not sure if first building a fully connected network and then traversing and weighting the edges would be feasible/appropriate for my application. Jan 20, 2021 at 5:59