Software-Defined Networking (SDN) is gaining a lot of traction in wireless systems with several practical implementations and numerous proposals being made. Despite instigating a shift from monolithic network architectures towards more modulated operations, automated network management requires the ability to extract, utilise and improve knowledge over time. Beyond simply scrutinizing data, Machine Learning (ML) is evolving from a simple tool applied in networking to an active component in what is known as Knowledge-Defined Networking (KDN). This work discusses the inclusion of ML techniques in the specific case of Software-Defined Wireless Local Area Networks (SD-WLANs), paying particular attention to the frame length optimization problem. With this in mind, we propose an adaptive ML-based approach for frame size selection on a per-user basis by taking into account both specific channel conditions and global performance indicators. By relying on standard frame aggregation mechanisms, the model can be seamlessly embedded into any Enterprise SD-WLAN by obtaining the data needed from the control plane, and then returning the output back to this in order to efficiently adapt the frame size to the needs of each user. Our approach has been gauged by analysing a multitude of scenarios, with the results showing an average improvement of 18.36% in goodput over standard aggregation mechanisms.