  This paper investigates the problem of regression model generation. A model
is a superposition of primitive functions. The model structure is described by
a weighted colored graph. Each graph vertex corresponds to some primitive
function. An edge assigns a superposition of two functions. The weight of an
edge equals the probability of superposition. To generate an optimal model one
has to reconstruct its structure from its graph adjacency matrix. The proposed
algorithm reconstructs the~minimum spanning tree from the~weighted colored
graph. This paper presents a novel solution based on the prize-collecting
Steiner tree algorithm. This algorithm is compared with its alternatives.
