Fiber-optic communication and networks play an important role in communications technology. According to the last few decades, in this area, research development is growing rapidly. Machine learning (ML) algorithms for optical communications (OC) are certainly a hot topic in the current generation. To overcome the current limitation and different issues of fiber-optic communication and network, a machine learning (ML) algorithm is essential for us. Machine learning techniques are proof that it has superiority in solving complex problems. Machine learning algorithms generally focused on the education field, business organization, and health sectors. Currently, many researchers work in the optical communications area by using machine learning algorithms techniques. A machine learning algorithm is an emerging technology because it helps in the optical communication field for a better quality of service (QoS). According, to the first time, this work reviews machine learning for optical communication literature from a machine learning viewpoint. Only fiber-optic communication and network experts work on machine learning for optical networks, and they are not ML algorithms experts. This paper uses machine learning algorithms for calculating the quality of transmission (QoT) of light paths in optical 1 Springer Nature 2021 L A T E X template Article Title networks link. For better quality of transmission (QoT) estimation tools, it can show the performance analysis of machine learning-based algorithms by using such as bit error rate (BER), optical signal to noise ratio (OSNR), quality factor (Q-factor), blocking probability, and signal to noise ratio (SNR) data. This paper presents a novel concept of quality of transmission (QoT) based on the machine learning algorithm.