I wish they would stop comparing gun violence deaths and just use deaths from violence.
I'm pretty sure I'd rather be shot to death than hacked to death by a machete anyway. The implement (if there is any) doesn't matter as much as the result.
All this mostly depends on how timely your reaction is to whatever's happening. Once you're a fair distance away, say the 21 foot metric of the Tueller Drill, against a bad marksman you probably have a pretty good chance; the average distance of gun fights as of some years ago was 7 feet.
for fair comparison you need to analyze most common scenario, which is multiple victims/targets vs single killer. it's going be day/night difference between dealing with a guy with a machete in his hand and a gunman...
I'm pretty sure the most common scenario is 1 on 1, or 1 on a few you're not willing to abandon, like SO or family, or multiple assailants, a small criminal "gang", on 1 or a few. The lone nutcase assault is very rare in comparison to normal crime.
If it's a few on your side you're not willing to abandon, it's entirely another matter and beyond the scope of our discussion.
If there's only one target, yourself, then if the one or more assailants are already within "critical distance" I personally don't think the difference between edged weapons and guns is "night and day", but I agree it's still quite big.
I'm pretty sure I'd rather be shot to death than hacked to death by a machete anyway. The implement (if there is any) doesn't matter as much as the result.