Effectiveness of Machine Learning in Assessing QoT Impairments of Photonics Integrated Circuits to Reduce System Margin