As
@canary mentions, look for triggers. Aggression, shouting and screaming can often be caused by something as simple as a need to go to the toilet, or being too late and being wet/soiled, or just being tired. It can be caused by sheer frustration at not being able to express that they are in discomfort or in pain, or that they are unable to do something they want to do/say what they want to say.
Do not confront them, try to speak calmly and softly in short, easy to understand language, never shout. If you ask a question, make it one that can be answered yes or no. Sometimes distraction such as soothing music, tea and something sweet can help. Dementia can be very frightening, both for the person with the dementia and the carer/s. Show compassion, never argue, step back if the person is very angry or trying to scratch/punch (I have sometimes actually put my hands up slightly in a conciliatory gesture). Remember that it is not their fault.