The learning phase is like a new hire's first week. Results swing not because the work is poor but because the patterns are not yet known.
In the developer docs, the ad set field learning_stage_info reports this state. It describes whether the ranking and delivery system is still learning for the ad set, and notes that delivery performance may be unstable while it is. Reading the field tells you whether an ad set is currently in learning.
No official figures for how many results or days it takes to leave learning appear in the developer documentation, so none are given here. Check the source of any number you find elsewhere.
In practice, avoid drawing conclusions from unit costs seen during learning. Editing budget, audience and creative in many small steps makes it hard to tell which change moved the result, so batch your changes and then wait.
When to use
Before judging results, check learning_stage_info to see whether the ad set is still learning.