Generally speaking, my first squad is based on who has pre-existing skills. I like to get that first squad trained up and ready to roll as soon as possible. I also don't use danger rooms typically -- I see them as an exploit. Gender doesn't really matter, because the first squad isn't really for fighting, it's for building skills. I usually go for six members in this initial squad.
Once a dwarf reaches legendary skills, I branch them off as leader of their own training squad and fill it with recruits. These recruits are chosen based on relative uselessness to pure functions for the fort - males only, because baby tantrums are a thing. Stats are usually not considered either, mostly because I can't usually be bothered to micromanage to that level. With regard to female commanders, they're kept in circulation as trainers and not used in direct combat. These training squads are used for recruits until they reach a reasonable skill level, and thus promoted from recruits to soldiers. Soldiers are then placed on active duty squads, which cycle between training and patrol. I like to have six squads of six.
That's my protocol for melee. Ranged draw from the same recruit pool, but are in smaller squads of 3. Like melee, I draw six permanent squads, which brings my total number of professional soldiers to 54 members plus a training staff of six. Once my fortress has a large enough population, I also cycle my haulers through a training regiment. One third trains for one third of the year, while the other two-thirds do their jobs. They're the reserves. I like to do this more for the physical stat training than for the combat effectiveness, but having a reserve of soldiers of about 20-30 dwarves is nice.
That is, of course, for regular forts. More military oriented forts will have larger numbers and different training cycles.