Machine-Learning Approach for Design of Nanomagnetic-Based Antennas