AI EMPOWERED DIAGNOSIS OF PEMPHIGUS: A MACHINE LEARNING APPROACH FOR AUTOMATED SKIN LESION DETECTION

. Pemphigus is a skin disease that can cause a serious damage to human skin. Pemphigus can result in other issues including painful patches and infected blisters, which can result in sepsis, weight loss, and starvation, all of which can be life-threatening, tooth decay and gum disease. Early prediction of Pemphigus may save us from fatal disease. Machine learning has the potential to offer a highly efficient approach for decision-making and precise forecasting. The healthcare sector is experiencing remarkable advancements through the utilization of machine learning techniques. Therefore, to identify Pemphigus using images, we suggested machine learning-based techniques. This proposed system uses a large dataset collected from various web sources to detect Pemphigus. Augmentation has been applied on our dataset using techniques such as zoom, flip, brightness, distortion, magnitude, height, width to enhance the breadth and variety of the dataset and improve model’s performance. Five popular machine learning algorithms has been employed to train and evaluate model, these are K-Nearest Neighbor (referred to as KNN), Decision Tree (DT), Logistic Regression (LR), Random Forest (RF), and Convolutional Neural Network (CNN). Our outcome indicate that the CNN based model outperformed the other algorithms by achieving accuracy of 93% whereas LR, KNN, RF and DT achieved accuracies of 78%, 70%, 85% and 75% respectively.


Introduction
Normal and healthy skins are like a blessing to human as it works like a shield for human body.Yet the world is covered by many skin diseases.Nowadays, millions of people worldwide suffer from dermatological conditions every year, which constitute a serious threat to health.In our research, our main focus is on Pemphigus.Pemphigus is a rare autoimmune disorder characterized by the immune system's erroneous targeting of healthy skin and mucous membrane cells, causing painful blisters and sores.Immune system mistakenly targeting the proteins that hold skin cells together is the root cause of it, leading to the separation of skin layers and the formation of blisters.Pemphigus can affect anyone.The age range between 40 and 60 can frequently be the one most prone to its effects [15].According to epidemiological research conducted in several European countries, pemphigus appears to be more uncommon at higher latitudes than in lower latitudes [18].Pemphigus encompasses various subtypes, such as pemphigus foliaceus, pemphigus vegetans, and pemphigus vulgaris, which differ in their severity, location of blistering, and associated symptoms.Pemphigus has an elusive exact cause.According to research, both environmental and genetic factors may affect how you are diagnosed.Rarely, the condition can be brought on by specific drugs prescribed to treat certain illnesses.According to some research, certain HLA genes, which are immune system-building genes, predispose you to developing particular kinds of the disease.Treatment typically involves immunosuppressive medications to control the autoimmune response and promote healing of the skin and mucous membranes.Pemphigus can be a severe and lethal condition, especially if left untreated.Traditional diagnosis of pemphigus relies on evaluating the patient's clinical symptoms, performing a histopathological examination, and conducting direct immunofluorescence testing.In most cases people are not aware of stages of bare diseases or its type.Certain dermatological conditions may remain asymptomatic for an extended period, enabling the diseases to progress and disseminate unnoticed.Dermatologists can have trouble correctly identifying skin conditions, necessitating pricey laboratory testing to determine the specific type and stage of the problem.Advancements in medical technology utilizing photonics and lasers have facilitated rapid and precise diagnosis of skin diseases.Nevertheless, the expense associated with such diagnostic methods remains a significant barrier, making them unaffordable for many individuals [7].Consequently, we propose utilizing image processing techniques for skin disease diagnosis.Basically, our primary aim is to detect the Pemphigus.The machine learning techniques is used to perform this task.Computers may learn from large datasets using machine learning, a type of artificial intelligence (AI), which makes use of algorithms and statistical models, empowering them to make predictions and informed decisions without the need for explicit programming for every potential scenario.

Literature review
As of today, no papers have been published on detecting pemphigus using machine learning based approach.Various skin diseases are the focus of the majority of reviewed papers.
The article authored by Jainesh Rathod and colleagues, introduces an image-based machine learning system that automatically detects skin disorders [11].The suggested method uses softmax as the classifier in a convolutional neural network (CNN) architecture.The authors have also developed a web application based on this model.According to their evaluation results, the proposed method achieved an accuracy of approximately 70%.In the scholarly article authored by R. Sumithra, M. Suhilb, D. S. Guruc et al. [13], in this paper, the authors propose an innovative methodology for skin disease segmentation and classification, employing two distinct machine learning algorithms: k-Nearest Neighbors (k-NN) and Support Vector Machines (SVM) to achieve this task [13].The results of the experiments are promising, with F-measures of 34% and 46.71% achieved by SVM and k-NN classifiers, respectively.Additionally, the fusion of k-NN and SVM classifiers achieved an even higher F-measure of 61%.
The scientific article discusses research that looked at 98 pemphigus vulgaris patients' long-term results after receiving oral treatment in north-west Italy [1].In this study, the authors employed a Logistic Regression (LR) algorithm to analyse the data, which resulted in an accuracy rate of 84.21%.
An approach for grouping skin images utilizing navigation (navi) for categorization is suggested in the research paper written by Polap D. et al. [10].The authors outline a smart home system that analyzes occupants' skin health using integrated sensors and artificial intelligence methods.The proposed method incorporates the Scale-Invariant Feature Transform (SIFT) technique to detect crucial regions in the images.Subsequently, the classification and segmentation tasks are accomplished using the Support Vector Machine (SVM) and Convolutional Neural Network (CNN) algorithms, resulting in accuracy and precision rates of 82% and 84% respectively.
According to a study by Tanzina Afroz Rimi et al. [12], the CNN model was proposed to identify numerous skin conditions.The objective of this research was to develop a prototype for a neural network-based system capable of identifying skin disorders.The authors selected the convolutional neural network (CNN) as their preferred neural network for the task.The accuracy attained was approximately 73%.
The scholarly paper by Dr. T. Kameswara Rao, P. Chamanthi, N. Tharun Kumar, R. Lakshmi Amulya, and M. Uday Sagar et al. [6] uses Convolutional Neural Networks (CNN) and an ensemble model that includes the Inception, DenseNet, and VGG16, architectures to present a unique method for skin disease identification.The accurate detection of a variety of skin disorders, including basal cell carcinoma, actinic keratoses, melanoma, vascular lesions, benign keratoses, dermatofibromas, and melanocytic nevi is the primary goal of the proposed system The results of the study show that the accuracy of the CNN model is between 71% and 75%.The VGG16, DenseNet, and Inception architectures achieve accuracy rates of 80.3%, 82.3%, and 80.4%, respectively.The ensemble model, which combines all three architectures, achieves the highest accuracy of 83% to 85%.This research provides a promising avenue for further development of intelligent skin disease detection systems that can improve patient care and diagnosis.
The scientific article authored by Shuchi Bhadula, Sachin Sharma, Piyush Juyal, Chitransh Kulshresth et al. [2] provides an extensive review of the use of machine learning algorithms for precise identification and classification of various skin disorders.To determine the exact type of skin diseases, the scientists investigated five different algorithms, including "Kernel SVM", "Logistic Regression", "Random Forest", "CNN" and "Naive Bayes".The studies were run on a large dataset of skin image data, and the results showed that Random Forest, Logistic Regression, and Naive Bayes all performed better than Logistic Regression in terms of accuracy (49%, 73.36% and 73.76%, respectively) [2].Insights from this study investigating the viability and effectiveness of machine learning algorithms for skin disease diagnosis might be used to create future healthcare systems that are more advanced and intelligent.A comprehensive summary is shown in table 1.

Machine learning
Machine learning is used in a wide range of fields, including the creation of autonomous cars as well as activities like speech and image recognition, natural language processing, and predictive analytics.Three primary categories of machine learning algorithms exist [9]: Supervised: in the machine learning paradigm known as "supervised machine learning", a computer program learns from labeled data to make predictions or judgments based on incoming data.Making a model that can predict output values for unknown inputs with accuracy is the goal.Classification and regression are the two primary categories for supervised learning algorithms.These algorithms find applications in diverse fields, including image classification, speech recognition, and medical diagnosis.
Unsupervised: unsupervised machine learning involves training a computer program on an unlabeled dataset to uncover patterns or relationships within the data without prior knowledge of expected outcomes.The primary goal is to discover hidden structures or groupings within the data.Clustering and dimensionality reduction are the two basic forms of unsupervised learning methods.These algorithms find application in diverse domains, including fault detection, market segmentation, and image compression, among others.
Reinforced: through a system of incentives and penalties, the machine learning technique called reinforcement learning teaches a computer program to make judgments.The objective is to maximize the total reward accumulated over time.This method involves teaching an agent to act in a given environment, getting feedback in the form of incentives or punishments, and then changing its behavior in response.Reinforcement learning finds application in diverse domains, such as game playing, robotics, and autonomous vehicles, among other areas.

Problem identification
Upon reviewing the aforementioned reference papers, it appears that none of them have focused specifically on pemphigus, a potentially life-threatening autoimmune skin disease.On the contrary, studies have investigated a range of different dermatological conditions, including but not limited to benign keratosis, melanoma, actinic keratoses, bullae, vascular lesions, squamous cell carcinoma, shingles, seborrheic keratosis, basal cell carcinoma, Stevens-Johnson syndrome (SJS), dermatofibroma, acne, lichen planus, eczema, melanocytic nevi, and common skin infections.Different machine learning algorithms have been applied in these studies, such as Convolutional Neural Networks (CNN), Support Vector Machines (SVM), Random Forest, K-nearest Neighbor (KNN), Naive Bayes, Logistic Regression, VGG-16, DenseNet, and Inception, to accomplish skin disease detection and classification with varying degrees of accuracy.However, the absence of research on pemphigus indicates a gap in the current knowledge, highlighting the need for further studies to develop effective diagnostic and treatment approaches for this rare and complex skin condition.

Our proposed work
The aim of our work is to detect Pemphigus using traditional system model.We applied five well-known machine learning strategies, namely Logistic regression (LR), K-nearest neighbor (KNN), Random Forest (RF), Decision tree (DT), and Convolutional Neural Network (CNN).
With the help of the Sklearn libraries, Pandas, Matplotlib, and other required libraries, the suggested work has been put into practice.The data were gathered from web sources [14, 16,17,19,20] and incorporated in our own dataset.The dataset consists of true and false data of pemphigus.

Data collection
In any kind of research dataset is must needed.Because, a dataset can be considered as a primary part of any research work.But, for our work we couldn't get any readymade dataset from any particular online sources like Kaggle, Google Colab etc. So, the dataset we used in our research consists of approximately 600 data gathered from various online sources.This dataset is entirely made by ourselves.

Data organize
We considered these 600 data to be our initial dataset.The initial dataset is divided into two subsets: one of them are Pemphigus Vulgaris image collections where there are approximately 158 images are here.And the second one is the collection of 442 images that we named others.This subset contains a lot more different kinds of images of skin diseases and normal skin.

Data augmentation
As our initial dataset got failed to provide a good accuracy in our implementation, we have to augment this initial dataset to generate an adequate number of images to get a high accuracy.This portion contains about 3500 images.This augmented dataset is a combination of two subsets.One is Pemphigus and another is others.Both of these subsets contain 1367 and 2133 images respectively.

Data preprocessing
We needed to solve a few issues that come up when importing the data in order to get a high performance of pemphigus vulgaris identification and prediction.such as image size and colour contrast [3].Before uploading them to the server for processing, the image resizer program in Python automatically resizes every image.Therefore, the primary goal of this stage is to eliminate background noises from photographs of pemphigus vulgaris and other images.

Dataset splitting
The technique of splitting a dataset into distinct subsets is known as data splitting in machine learning.This procedure is generally used for training and testing machine learning models.Data splitting is used to check the model's performance on new data to prevent overfitting.The dataset is often separated into three subsets: test, validation, and training.The validation set is used to fine-tune the hyperparameters of the model, whereas the training set is used to develop the model.Lastly, to evaluate the model's performance on new, unseen data that was not used during its development, we utilized a test set.In this method, we partitioned the dataset, allocating 60% for the training set, 20% for the validation set, and the remaining 20% for the test set.

Methodology
Our research is mainly based on only one stage of Pemphigus Vulgaris prediction.The conventional Pemphigus Vulgaris disease prediction system was previously presented without incorporating a hyper parameter tuning method for the Machine Learning algorithms.The corresponding block diagram is illustrated in figure 5.

Model generation
During this phase, machine learning algorithms are employed to train various classification models using the training dataset.Individual samples are categorized based on these created models after the model development.In this particular scenario, a conventional approach utilizes five machine learning algorithms, namely LR, KNN, RF, DT, and CNN classifiers, to construct the models.Subsequently, the test set is classified using five models, and their performance is evaluated.Notably, the traditional system does not incorporate any hyper parameter tuning methodology and relies on default parameter settings for generating these five classification models [5].

Machine learning algorithms
In the model generation process, Logistic regression (LR), K-nearest neighbor (KNN), Random Forest (RF), Decision tree (DT), and Convolutional Neural Network (CNN) classifiers are used as machine learning algorithms.In our Pemphigus Vulgaris prediction system these five machine learning algorithms are used.Because they outperform other machine learning algorithms.
Logistic regression is a supervised ML technique that classifies observations based on independent variables.The logistic function is utilized in this context to compute the probability of an observation being classified into a specific class.
The non-parametric machine learning technique K-nearest neighbor (KNN) is used for both classification and regression problems.To determine the result of a specific observation, K nearest neighbors are chosen from the training set.
An ensemble of decision trees is used in the supervised machine learning method known as random forest to do both classification and regression problems.It mitigates overfitting by combining multiple decision trees and employing subsets of input variables and training data.
A simple supervised machine learning technique called a decision tree is utilized for both classification and regression problems.It divides data into subsets during training and builds a tree model to predict new observations' class or numerical value based on input attributes.
Convolutional Neural Networks (CNNs) are used for computer vision tasks such as object identification and recognition.They mimic the operation of the human visual cortex and consist of convolutional, pooling, and fully linked layers.CNNs have advantages over typical ML methods, such as handling spatial correlations and automatically learning features from data.

Performance evaluation
At this point, the confusion matrix is used by the algorithm to assess how well the training and test sets performed.The generated confusion matrix is then utilized to compute and analyze various performance metrics, including accuracy, precision, recall, and F1 score, for both models.The accuracy ratio is the proportion of properly recognized observations to all observations, whereas precision is calculated by dividing the total number of anticipated positive samples by the percentage of successfully categorized positive samples.By dividing the total number of positively categorized samples by the total number of positively tested samples, recall is calculated.The mathematical expressions for accuracy, precision, recall, and F1 score are depicted by equations ( 1), ( 2), (3), and (4) correspondingly [4].
Accuracy, also referred to as classification rate, is the percentage of correctly predicted overall results.The skin condition is correctly predicted if the precision is higher.Accuracy can be calculated as follows: The ratio of accurately anticipated positive cases to all of the actual positive instances in the test data is called recall, also known as sensitivity or true positive rate, also known as sensitivity.pemphigus disease is correctly categorized according to Higher Recall.The relationship given below explains the recall: A measure of precision compares the percentage of accurately anticipated positive observations to the total number of positive observations.It provides an assessment of the accuracy of positive predictions made by a model.The relationship given below provides precision: In order to provide a fair evaluation of a model's performance, the F1 score is a statistic that combines recall and accuracy into a single value [8].It is determined by calculating the harmonic mean of recall and accuracy, ranging between 0 and 1, with 1 representing the best possible score.The formula for computing the F1 score is as follows: Here: TPtrue positive, TNtrue negative, FPfalse positive, FNfalse negative.

Result analysis
In our research, the machine learning algorithms that we used has default parameters.The overall performance of different algorithms and the comparison between these algorithms are given below in a tabular format: First of all, we have used the Logistic Regression (LR) which is fitted and executed with parameters of C = 10 5 and max iteration = 1000 and we have got an accuracy of 76%, precision of 75%, recall of 76% and F1 score of 75%.Now it comes KNN algorithm where the algorithm is fitted and executed the model with the parameters of no of neighbour = 50 and weights=distance and found 61%, 73%, 67% and 59% of accuracy, precision, recall and F1 score respectively.
In this period, we have worked with random Forest (RF) algorithm where the algorithm is fitted and executed the model with the parameters of maximum depth = 100 and random state = 0 and found 87%, 88%, 85% and 86% of accuracy, precision, recall and F1 score respectively.
In the fourth phase, the Decision Tree (DT) model is fitted and run using the best splitter and Gini index parameters, and the results are 100% accuracy, 100% precision, 100% recall, and 100% F1 score, respectively.This DT model predicts the test set and yields accuracy, precision, recall, and F1 score of 73%, 72%, 73%, and 73%, respectively.
In the last phase the CNN model is fitted and executed the model with the parameters of optimizer = 'adam', three layer and epochs=30 and found the accuracy 93%.Where precision, recall, and F1 score of 54%, 54.5% and 54% respectively.Performance evaluation is shown in table 2.  By leveraging the insights gained from these studies, we were able to draw meaningful conclusions about the potential of machine learning for pemphigus detection.While there is still much to be explored in this area, our study contributes to the broader understanding of the potential of machine learning in medical diagnosis and disease detection.
As noted previously, there is currently no published research specifically focused on the application of machine learning algorithms to detect pemphigus.However, we conducted a comparative analysis by reviewing existing literature on the use of machine learning for skin disease detection.Our analysis included a thorough examination of the methods and results of each study.

Result visualization
This section aims to provide a comprehensive visualization of the results obtained from applying our machine learning algorithm to the dataset.By presenting these visualizations, we seek to offer a deeper understanding of the algorithm's performance, behavior, and effectiveness.Our results demonstrate that the proposed machine learning-based system can effectively detect pemphigus from skin lesion images, with promising results for future improvements and clinical applications.

Conclusion
The field of medical science is experiencing a revolutionary transformation with the advent of machine learning, as it has promising potential to help demystify.An image detection system has been proposed that is capable of effectively identifying skin lesions caused by the rare autoimmune disorder known as pemphigus.Five algorithms have been applied on augmented image for predicting this disorder.Among these five algorithms CNN provide the best accuracy.In the near future, we plan to incorporate various types of classifiers to enhance the detection rate of our proposed system.As it is an infrequent autoimmune disease, the source of collecting dataset is inherently limited.To improve the detection rate it may be beneficial to enrich the dataset and diversifying the algorithms.By doing so, we may be able to uncover more-subtle patterns and features that can expand model's capabilities and lead to better generalization of the models.Overall, our study highlights significant potential of machine learning in the field of dermatology.

Fig. 8 .Fig. 9 .
Fig. 8. Comparative graphical representation of performance evaluation of CNN in detecting other skin diseases and pemphigus

Table 2 .
Performance evaluation of classification models