With the increasing utilisation of machine-learning algorithms, autoscaling methods have the potential to provide more sophisticated control mechanisms for the cloud application operators over virtualized resources in terms of provisioning. This paper introduces machine learning-based autoscaling approach introducing several improvements including metric selection, proactivity, various enhancements of the neural network among others. Our enhanced machine learning models enables the autoscaler algorithm to react more quickly to sudden load changes, increase proactivity while using fewer resources and reducing Quality of Service (QoS) violations for cloud-based services. The comprehensive measurements indicate that QoS violations may reduce by up to 80%, while the level of resource utilization either remains constant or decreases slightly (by 3-4%) in certain applications. In cases where there was no reduction in QoS violations, the utilization of resources saw a significant decline, falling between 20-50%. The proposed changes have been analyzed and tested under various conditions, representing 3 distinct and common use cases in cloud environments. This developed process has been implemented on the science cloud of the Hungarian Research Network supporting the operation of the infrastucture that hosts over 300 scientific projects.