This match is pretty fun, because it's one of the few times I can pretend Psi Magnet is cool.
A large part of this match will have you using CC to punish what the Ness is doing. Ness' specials are too laggy to really try a projectile war with Samus, so you can force an approach with a good mix of missiles and blasts, just be careful if the Ness is good at bat reflections. Also know that his ftilt will kill missiles. When he approaches, you can either try to meet him with a nair, dash, jab, or tilt, or just CC and retaliate. If he approaches with fair, CC is the way to go, otherwise you can get the first hit in without too much difficulty. Samus can even easily CC PK Fire. Just be careful about using bombs for mobility on the ground, because they can be used to create fire pillars.
As much as the uair is a pain to get through, there are more reasons not to stay above Ness. His utilt has great priority thanks to the invincible head frames, but that isn't the true reason. PK Thunder juggles are a pain in the butt around mid precentages. If he isn't too great with PK Thunder, just use bombs to dodge, or air dodge and fastfall if you're near the ground.
For Ness' EG game, you need to sweetspot or come in high enough to attack. PK Flash is an option Ness can try, since bomb jumps take a while, but it's fairly easy to see where it'll go. Ness also has the option of coming out there after you, so be sure to keep an eye out for incoming sparkles. If you can't manage to knock him away, DI up and you should be fine. Also, while this holds true against most foes, do not hang on the edge for too long, or your hands will get batted.
When Ness is offstage, you can go out and attack, though Samus isn't the swiftest in the air, so that's a dangerous option. Bombs were suggested for if the Ness aims PKT2 at you, and that's good advice. If you edgehog, though, the Ness will be wide open over the level for a ledgehopped nair or a ledgedash attack. Just be sure to watch for the Ness hitting the ledge and going straight up instead of onto the stage.
I'm sure I forgot something, but I'm hungry right now, so I hope this helps you beat him so you both can keep improving!