Please dont shout at her shes only a baby and doesnt know any better
Think of her as a todler whos potty training ... with the best will in the world they forget, get excited have an accident once in a while !

If you know someones coming give her the chance to go out first.
If she does have an accident take her straight out as quickly as poss and let her finish.
Watch for signs she wants to go, and try get her in a routine of when she goes will help too.
Good luck
Jules xxx