A Structural Approach to Infer recurrent Relations in Data