Learning your patterns