Urine marking has nothing to do with housetraining, nor is your dog seeking revenge on you for something you have done.
There is a difference between urine marking, and not going out enough so he had to pee on your floor. If you see a puddle, your dog needed to pee. If that’s the case, you may want to re-visit your dog walking schedule, or make sure he is not drinking too much water, as that could signal a medical issue.
View Stop Cat Spraying video on YouTube