# An Introduction to Machine and Deep Learning Methods for Cloud Masking Applications
## 3 Machine Learning Methods  
### Machine Learning Algorithms  
Machine Learning (ML) has significantly advanced cloud masking, offering efficient and accurate identification of complex cloud patterns in vast datasets like satellite imagery and climate data [3; 39]. These ML models, unlike traditional programming, autonomously learn from data inputs and corresponding outputs, uncovering hidden correlations. This learning process enhances cloud masking precision and efficiency, reducing the need for extensive programming and deep expert knowledge. Key to the success of ML in cloud masking is the use of labelled data, vital for training models to discern between different cloud types and clear-sky regions. Labelled data allows for data training and validation, conferring the output model knowledge inference capabilities onto the application domain. On top of that, it aims to provide accurate predictions for new, unseen data, increasing cloud mask reliability across various settings. However, challenges persist in their application, as summarized in Section 6. ML methods usually apply to cloud detection as a single-pixel supervised classification problem, identifying classes like cloud, cloud-free, cloud shadow, land, or specific cloud types. Common algorithms include artificial neural networks (ANN) [40; 41; 42], Support Vector Machines (SVM) [43; 44; 45; 46], and Random Forest (RF) methods [47; 48], each capturing intricate relationships between input features and output labels. In the traditional ML algorithms, prior to analysis, satellite data can undergo preprocessing to extract pertinent spectral bands and indices, which are then used as input for these models. The final masks consist of pixel probabilities of belonging to predefined classes or labels corresponding to the categories. The features used are crucial for a successful classification, as well as the choice of a representative training data-set. Observed radiative variables inherited by thresholding approaches, spectral signatures (BTs, temperatures, derived indices as Normalized Difference Vegetation/Snow/Water indices), and cloud texture are some of the main characteristics to identify differences between the radiative properties of clear and cloudy skies [44]. As an example the 10 Sentinel-2 spectral bands are used to train the single-scene S2 cloudless method [49] with a pixel-based strategy, using gradient boosting decision tree. The final cloud probability map can be converted to a cloud mask by fixing a threshold. In [3], [PERSON] et al., deal extensively with the use of spectral, spatial, temporal, and multi-source features in cloud detection algorithms of various types, with a focus on cloud shadow detection. In [50], the authors use an SVM classifier to distinguish between cloud types and land surfaces proposing a method to detect and remove thick clouds, which constitute a significant portion of remote sensing data. Brightness intensity combined with gradient of texture features are the main characteristics used to detect samples to train the classifier. In [45], the SVM model was applied to high-resolution image data and this allowed the use of more defined texture features in addition to spectral characteristics. [PERSON] et al. [46] developed an SVM method to treat various cloudy combinations, and investigate on the effectiveness of the use of reduced amount of typical data to train the model. The adaptability of the method to multiple conditions was demonstrated with data from MODIS. [PERSON] et al. [51] introduced a semi-supervised SVM method that showed good performance when the reference data did not adequately describe the target classes. Random Forest algorithms have been applied to cloud identification by using different splitting criteria, such as entropy, Gini index, and classification error [52; 53]. [PERSON] et al. [54] applied decision trees and Bayesian models for a ready-to-use cloud detection algorithm using Sentinel-2 images.