both are fine. depends on your objective, context and audience.
e.g.
playing in cover bands or tribute bands - note for note (or very similar) is expected
jams, open mics, etc - you're expected to improvise
pop/classical - you're expected to do it note for note (mostly)
rocks, and esp blues and jazz - you're expected to improvise
but those are generalisations. you should consider on case by case basis (what would the audience like to hear? what would be easier to perform for you, skill and instrument wise? etc etc etc).
i think no matter which way you choose to do it, make it sound good (which is subjective, but as good as you can), and most people would be happy.
personally when i listen to live music i enjoy hearing differences from the record. it excites me to see how others can do it a different way.