Feasibility of Transfer Learning: A Mathematical Framework