Be patient. I still have accidents at 5 months old and I got my puppy at either 8 or 9 weeks and she was paper trained by the breeder. I hated the paper training and switched her to an indoor potty system. She still tends to go where she is not supposed to for me when she is upset with me about something. She is getting much better. But I am constantly on alert for her to have an accident in the home. Also I am gone 9 hours for work 5 days a week and my puppy has adjusted just fine and is not traumatized or unsocialized.
I can take my puppy outside or go inside. I mostly trained her for inside pottying and I get really excited when she goes outside but she loves to sniff around and try to eat leaves, rocks, grass etc. eventually she will go but it can be a long wait so she mostly goes indoor. I have a Ugodog Potty (two of them) LOVE THEM. One I leave in her excercise pen where she sleeps at night and stays during the day, the other is out in the room we have confined her in. (This would be the living room with my husband and I.) I had to get creative to keep her in the living room with us with baby gates and chairs etc. It turned out the best thing for us is to put her 2nd Ugodog Potty in a doggie play pen that we also used to block her in with us. That way she just runs in the playpen and does her business on the potty. You will get used to knowing or sensing when they have to go. I seem to know the signs and either put her in her excercise pen or the play pen where the potty's are until she goes. You have to wait them out sometimes. But I would rather she not pee or poo on the carpets.
I just now gave her more freedom friday night. She now has the entire downstairs with the exception of the stairs down to the front door and the stairs to the upper levels. But only when we are home with her. So she can run from the kitchen through the dining room into the living room but that is after I first get home and make sure she potty's so I confine her until she goes. She seems to go to her playpen which I no longer block from other rooms and she will go potty in that on her indoor potty. She has the occasional accident though. I think its normal since she is still a baby. But she is MUCH better.
You will just have to watch your Yorkie like a hawk and you will get used to their behaviors which will tell you your puppy has to go potty. I just know she does #1 and #2 when I first get up with her so she does NOT go out of the kitchen until her business is done. Then she goes #2 once during the day while I am at work and then she goes again a 3rd time at 7-7:30pm. She pees way more though but its normally every 2-3 hours, can be more if she drinks more. As soon as she gets up or you come home from work she will need to go. Then its around 2 to 3 hours for me when my puppy pees. You will start to learn their potty times.
I had to keep telling myself and my hubby to be patient she is a baby still and kept to a strict routine. I praise her everytime she does #1 or #2 on her indoor potty's and give a treat every time. My hubby and I make a HUGE deal with her when she goes potty where she is supposed too.

She loves the extra attention. lol