It depends entirely on how the situation unfolds. If my kids are home and there isn't time to asses what is going on then they are probably getting shot dead without warning, because I'm not leaving their safety to the whims of some unknown idiot invading our house. Even barring that I doubt I'd hide and wait for police (live in the middle of nowhere, it would take the cops probably the better part of an hour at least to even find me.) for the same reason; I'm just not a fan of leaving mine and my loved one's safety in the hands of some unknown, possibly unstable intruder.
As long as my kids aren't home or they didn't get the drop on me I'd try to do the Joe Biden thing and fire two warning shots into the air (with a mossberg 500 defender, 8 - 2 = 6 shots left if the intruder isn't just a fly-by-night house thief and decides to take advantage of my warning shots to get me while I'm defenseless.) in the hopes they'd bugger off because most people doing things like that lose their nerve the instant they realize their intended victim is armed, and besides that I feel pretty bad just killing deer and rabbits for meat and really don't want more human life on my conscience on top of that if I can help it.
To the people saying they'd kill indiscriminately I'd advise you rethink that stance if possible, sometimes idiots escalate the situation and it becomes necessary, and you can get yourself ready by thinking of what a piece of trash the assailant is/you perceive them to be but that will not last forever. Once you end a life, whether justified or not, you'll have to face the emotional burdens of how human your target really was, whether your personally willing to entertain those thoughts or not. It somehow stops mattering so much how much of a monster a man was to you in the final moments before you found it necessary to end his life when you're standing at a pre-trial over your actions and all you can hear is a miserable shell of a mother sobbing and grieving over the loss of her beloved son. You can be acquitted and public opinion can all but declare you a hero, but no amount of justification can take away the emptiness you feel after you see the impact your actions have caused other decent, good people who have struggled and invested more than half their lives to trying to help bring the man you saw as a beast back into the human fold, and knowing that you were an instrument invalidating that entire struggle. It isn't worth it, except for the defense of your own loved ones lives death isn't the answer to anything, it's just an ending.