There's a reason your pet can suddenly appear to change it's behaviour when being stroked or petted - but it's not a sign of aggression ...
Of course, if your cat doesn’t grace you with their presence, try not to be offended – cats are individuals and there are plenty of other ways they can show their affection!