A large dog (on a lease) is better than most other ideas because it's a deterrent.  The bad guy does not know you have a knife/gun, but they have a pretty good idea they don't want to mess with a big working dog. That's not to say the dog will actually perform if it's untrained and you are attacked, but the deterrent part is a big deal.