The Restricted access window (RAW) method, which is part of the IEEE 802.11ah standard for the Internet of Things (IoT), reduces the effect of collisions on the network while increasing the overall performance of the network. However, in multi-rate IoT networks based on IEEE 802.11ah, performance anomaly degrades the network performance. The Machine Learning based Performance anomaly avoidance with cluster-based grouping (MLPA-CBG) scheme proposed in this article is intended to address this issue. The proposed scheme makes use of the self-organizing map neural network for the purpose of categorizing devices as per bit rate. Then, each group is assigned a time slot that allows them to access the channels. CBG outperforms the default uniform grouping scheme in terms of throughput, delay and energy consumption.