Statistics for Data Balancing and Hyper-parameter Optimization for Machine Learning Algorithms for Secure IoT Networks