uhm... since you can go 18 points in one tree and 12 in another, the choice is based on the last 2 tiers.
Now, from your comment it seems (i may be wrong about this) that you think that the 7% penetration of the ferocity tree is much better than the flat penetration from the cunning tree.
However, if we are talking about magic damage (since rarely people stacks a lot of magic res), the flat pen works better than what you would think.
The enemy needs to have 47/51/56/60/64/69/73/77/81/86/90/94/99/103/107/111/116/120 mag res at lvls 1-18 for the % pen to be better than the flat one.
Once you buy Void Staff it's 72/79/87/94/101/108/115/122/129/137/144/151/158/165/172/179/185 at lvls 1-18
Many enemies in mid lane will have only 30-42 mag res (depending on runes) for most of the match. If they buy abyssal scepter, they gain another 50 mag res, getting to 80-92. However, i think that at the time they get it, their level will be high enough to let the flat penetration still be better or more or less equal to the % one. And with more levels, the advantage of flat penetration gets bigger unless they buy even more mag res. Some melee champions that are played mid will have their base mag res increase with their levels. If they also build abyssal (or maybe maw, if they are AD), than there could be a part of the game where the % penetration mastery is slightly better than the flat one.
Late game when you have void flat penetration is still better in most cases, because it's not very common for champions to get more than 185 mag res.
Also, the flat penetration is both magical and physical, which means that, even if only by a little bit, it helps with AA poking early game, especially against melees.
That said, the difference is not that big, actually, so it depends more on what keystone mastery you want to get.