Specifying Mining Algorithms with Iterative User-defined Aggregates: A Case Study