This function is a flexible implementation of multiple greedy heuristic algorithms,
particularly well adapted to the abn
framework.
It targets multi-random restarts heuristic algorithms.
The user can select the num.searches
and the maximum number of steps
within by max.steps
. The optimization algorithm within each search is
relatively rudimentary.
The function searchHeuristic
is different from the
searchHillClimber
in the sense that this function is fully
written in R, whereas the searchHillClimber
is written in C
and thus expected to be faster. The function searchHillClimber
at each hill-climbing step consider every information from the pre-computed
scores cache while the function searchHeuristic
performs a local
stepwise optimization. This function chooses a structural move (or edge move)
and compute the score's change. On this point, it is closer to the MCMCMC
algorithm from Madigan and York (1995) and Giudici and Castelo (2003)
with a single edge move.
If the user select random
, then a random valid DAG is selected.
The routine used favourise low density structure.
The function implements three algorithm selected with the
parameter algo
: hc
, tabu
or sa
.
If algo=hc
:
The Hill-climber algorithm (hc
) is a single move algorithm.
At each Hill-climbing step within a search an arc is attempted to be added.
The new score is computed and compared to the previous network's score.
If algo=tabu
:
The same algorithm is as with hc
is used, but a list of banned moves
is computed. The parameter tabu.memory
controls the length of the tabu
list. The idea is that the classical Hill-climber algorithm is inefficient
when it should cross low probability regions to unblock from a local maximum
and reaching a higher score peak. By forcing the algorithm to choose some not
already used moves, this will force the algorithm to escape the local maximum.
If algo=sa
:
This variant of the heuristic search algorithm is based on simulated annealing
described by Metropolis et al. (1953).
Some accepted moves could result in a decrease of the network score.
The acceptance rate can be monitored with the parameter temperature
.