The mobile edge learning (MEL) system is an emerging intelligent system, which can collect the data generated by the Internet of things devices (IoTDs) and perform machine learning algorithms on the edge computing platform. However, due to the limited transmit power of IoTDs and the severe propagation loss, maximizing F-measure in MEL systems is a challenging task, which is a meaningful performance metric in machine learning algorithms. In order to address the dilemma, an unmanned aerial vehicle (UAV)-enabled wireless powered MEL system is proposed in this paper. In this system, the UAV provides energy for all IoTDs and collects the data from busy IoTDs for machine learning. The busy IoTDs transmit their respective data to the UAV through a direct and an indirect transmission process. In the latter one, the busy IoTDs utilize their neighboring free IoTDs that have no data to forward data. An F-measure maximization problem based on this system is investigated by jointly optimizing the minimum sample size among all classes, the transmit power of IoTDs, and the UAV's trajectory and velocity. Since the formulated problem is non-convex and intractable to solve, we propose two effective algorithms, one is based on successive convex approximation (SCA) and the other is based on alternating optimization (AO). And the computational complexity of the latter is lower than the former. Simulation results show that the SCA-based algorithm is superior to the AO-based algorithm and other baselines. The results also reveal that the proposed algorithms can converge within several iterations.