Patterns mining