I have a masters in counseling and I am a nurse who has been the charge nurse of a 30 bed inpatient psychiatric unit. I have seen A LOT of senseless violence. The majority of the time if you observe a person their are tell tail signs- clenched fist and/ or jaw, fixated eyes, heightened arousal- etc.
In my opinion, to tell if someone is going to attack you, you can check the pain, urge burning if his or her eyes. There is also the sixth sense that can make you have a hint when someone is going to attack you. However, sometimes it may be very difficult to tell.