Explain the Beam search graph mining algorithm with suitable example.
Beam search graph mining algorithm
A beam search is a heuristic search technique that combines elements of breadth-first and best-first searches. Like a breadth-first search, the beam search maintains a list of nodes that represent a frontier in the search space. Whereas the breadth-first adds all neighbors to the list, the beam search orders the neighboring nodes according to some heuristic and only keeps the n (or k or 3) best, where is the beam size. This can significantly reduce the processing and storage requirements for the search. Some applications are speech recognition, vision, planning, machine learning, graph mining and so on.
Beam Search Algorithm
1.Let beam width = n.
2 Create two empty lists: OPEN and CLOSED.
3. Start from the initial node (say N) and put it in the 'ordered' OPEN list.
4. Repeat steps 5 to 9 until the GOAL node is reached.
5. If the OPEN list is empty, then EXIT the loop returning 'False'.
6. Select the first/top node (N) in the OPEN list and move it to the CLOSED list. Also capture the information of the parent node.
7. If N is a GOAL node, then move the node to the CLOSED list and exit the loop returning 'True'. The solution can be found by backtracking the path.
8. Else if, expand node N to generate the 'immediate' next nodes linked to node N and add all those to the OPEN list then sort all elements of an OPEN list by heuristic function.
9. Nodes to be expanded should not be greater than beam width 1. Prune and update the OPEN list by keeping the best n successors.
Comments
Post a Comment