# Comparison of Machine Learning Algorithms Used for Skin Cancer Diagnosis
## 1 Introduction  
Melanoma is a fast-spreading and deadly form of skin cancer that often affects patients and accounts for the majority of deaths due to this type of disease [1]. Cancer lesions usually develop gradually, but it is very easy to overlook and ignore them in the case of a lack of basic knowledge. This is due to the fact that skin lesions may have different origins [2]. Most people often have so-called pigmented lesions, which most often have a symmetrical, flat shape, regular features, and uniform color, and their occurrence is genetically determined. In children, birthmarks tend to enlarge as the child matures. By the age of 35, the skin lesions should stabilize, and their shape and number should no longer change, so any change at this age should be a warning sign, as melanoma is known to affect young and middle-aged people as opposed to other solid tumors, mainly affecting the elderly [3]. Not every new skin lesion in adulthood must be considered a sign of cancer, but each should undergo dermatological diagnostics in order to exclude the risk of skin cancer. The detection of malignant tumor lesions at the earliest possible stage of their development allows for quick treatment initiation and full recovery. The first stage of diagnosis is a dermoscopic examination, which is a non-invasive technique, consisting of the observation of the skin lesion in terms of its structure and color at about 10-20 times magnification [4]. Another variant of the examination is video dermoscopy, which allows for recording the image of skin lesions, archiving, and then comparing the changes at specific time intervals. Automatic diagnosis of skin cancer gives a chance to obtain diagnosis faster and start treatment or to classify the lesion as benign, and make a decision not to remove it,which is a minimally invasive procedure, but unpleasant and potentially dangerous. The subject of automatic or semi-automatic diagnosis of diseases, including cancer, is often touched upon in scientific works, e.g., automatic detection of benign and malignant breast tumors [5; 6]. Automatic diagnostics based on mathematical algorithms are also used in other branches of medicine, e.g., to detect pulse wave delay [7] classify sleep state by analyzing the electroencephalogram (EEG) data [8], or classify mental state by analyzing feature pool extracted from EEG recordings [9]. Artificial intelligence algorithms are used more and more often to automatically diagnose diseases, including machine learning algorithms which have already proved their effectiveness in solving many problems based on the classification, such as gender recognition based on face photos [10], several-stage biometric identification [11], detection of objects in real-time [12] or spam filtering [13]. Machine learning-based systems are also used in medical and pharmaceutical applications, such as medicine recognition for medicine vending machines [14] or the classification of digital gait measurements in diagnostic applications [15]. This study shows two approaches to solving the problem of automatic melanoma diagnosis. Due to some limitations such as worse performance and scalability [16], classical (not-deep) machine learning algorithms are not commonly used for digital image classification. However, very often machine learning algorithms achieve better results by using smaller datasets, while their architectures are less complicated and demand less computational power and memory (lower numbers of parameters). Deep neural networks demand high-end graphics processing units (GPUs) for efficient calculations performed in a reasonable amount of time. It generates big costs and makes it harder to implement solutions based on neural networks on end-user devices (e.g., mobile phones). Chapter 4 compares the algorithms in terms of both efficiency and performance. The main contributions of this work are as follows:  
1. Machine learning algorithms were analyzed in terms of their use in solving the problem of classification of cancer lesions based on image data. 2.