Bullets do go through floors.
Anyway, there are three main responses:
1. Do nothing but observe - hope they steal stuff and leave.
2. Confront them from concealment - you probably don't have real cover in the house. Hope you win the gun fight if they resist.
- A subset is to make some noise and hope they leave without a direct confrontation.
3. Fight immediately:
a. Jump out and yell - I am a mall ninja and prepare to die
b. Ambush them as you are unobserved. In the dark, that does work well.
All have risks, I won't recommend 3a.