Finding temporal patterns — A set-based approach