Surrogate programming by aggregation