Classification of Ayurveda constitution types: a deep learning approach

In precision medicine, there has been a paradigm shift, from a population average based one-size-fits all, to an individualized approach. The aim is to tailor a medicine according to an individual’s genetic make-up and response to drug, diet, and environment. Machine learning algorithms are being developed to dissect inter-individual variability in the population. This is more important for prevention of diseases in healthy individuals and early actionable interventions. In Ayurveda, the basic tenet of the practice is personalized—an individual’s constitution type “Prakriti” is used for predicting healthy and disease trajectories as well as individualized management. Prakriti refers to the nature of the body in terms of doshas, and the time of conception is decided according to the predominance of doshas. It does not change throughout life and is responsible for a person’s physical and mental characteristics. Any population can be stratified into seven Prakriti groups amongst which the Vata, Pitta and Kapha are the three phenotypic extremes with contrasting disease susceptibilities and response. Prakriti is assessed through examination of multi-system attributes and has been formalized into a questionnaire that captures 120 feature attributes for objective assessment. We use for the first time—powerful dense neural network deep learning algorithms for predicting Prakriti classes. The study was carried out on a validated dataset of 233 extreme Prakriti individuals derived from two genetically diverse cohorts from North and West India. We benchmark our method with the state-of-the-art supervised machine learning and establish a learning approach for transferring features from the Western to Northern Indian data and vice versa as well. Our study provides a computational framework for predicting Prakriti which can be implemented in large scale studies of precision medicine. The dataset and the baseline implementation can be found in (https://github.com/skarifahmed/DeepAyurveda)


Introduction
There is extensive inter-individual variability in a population which contribute to differences in disease susceptibility, prognosis, and response to the environment. These differences are also evident in variable response to medications and side-effects. Efforts are ongoing to understand the basis of this inter-individual variability for early diagnosis, prevention, and management. This has propelled the new field of precision medicine that aims to provide tailored recommendations based on the individual's attributes. A vast array of technologies are being developed to capture the diverse physiological, metabolic and cellular readouts of an individual in spatio-temporal dimensions. These include sensors and monitoring devices and high-throughput multi omics platforms. It is felt that "Big Data Analytics" from these multidimensional readouts might allow one to distinguish patterns in populations as well as discover signatures specific for individuals. The enormous heterogeneity in expression and sequence variation of genes coupled with genetic network interactions and environmental factors contributes to phenotypic diversity in health and disease. At present, the definition of phenotypes relies on easily measurable physical attributes such as height, weight, BMI or those that are measured in disease conditions such as diabetes, coronary heart disease, rheumatoid arthritis, Celiac's, Parkinson's, Alzheimer's, multiple sclerosis, etc. In the present era of phenomics, emphasis is shifted for deep and composite phenotypes along with molecular endo-phenotypes from omics studies for identification of groups that differ in susceptibility, prediction, and response to therapy (Leboyer et al. 1998;Almasy and Blangero 2001). This forms the basis for the development of predictive, preventive, personalized and participatory (P4) medicine (Flores et al. 2013;Hood and Friend 2011;Tian et al. 2012). Classification of individuals depends upon the methods or questionnaires which are accessible in terms of specific anatomical and physiological attributes such as somatotype, phototypes, chronotypes and metabotypes (Sheldon et al. 1940;Chua et al. 2013;Katzenberg et al. 1998;Roenneberg et al. 2003;Wittmann et al. 2006). These methods or questionnaires, to some extent, are very useful for predicting the tendencies of health and disease with respect to specific organizations. However, to synthesis and estimate the number of possibilities from these heterogeneous profiles is a major challenge. There is still an unmet demand for developing phenotypic methods for classification of the healthy individual at a system's level. This is analogous to solving a puzzle from numerous pieces when the overall picture is not known as there is no comprehensive understanding of human individuality.
Integration of holistic phenotyping concepts from traditional knowledge-based medicine is gaining credence lately. Ayurveda, the Indian system of traditional medicine which dates back to 5000 years, has a personalized approach to healthcare. According to this system, individuals in a population can be classified into seven constitution types called as "Prakriti." These constitution types differ with respect to susceptibility to diseases and environments, and hence this method becomes important to predict an individual's health trajectory. Besides, knowledge of individuality on the basis of Prakriti forms helps in customizing the therapeutic regime. Amongst the seven constitutions, three types "Vata, Pitta, Kapha" have the most contrasting phenotypic attributes and susceptibilities. Phenotypic classification of Prakriti is based on anatomical features like body build, size and symmetry of body parts, physiology, physical endurance, and aptitudes. Evaluation of Prakriti assessment is thus based on a multi-system examination of anatomical, physiological, psychological and activity-based attributes of an individual. Vata Prakriti have a lean and narrow body frame, weakly developed body, an irregular appetite, food and bowel habits, difficulty in gaining weight, quick in physical activities, dry skin, and hair, and less tolerance for cold temperature; individuals with moderate body frame, build, high frequency of appetite and thirst, good digestive power, perspiration tendency higher than normal, tolerance for cold conditions, reasonably mobile with moderate physical strength are of Pitta Prakriti type; and individuals with large broad frame and well developed body build, tendency to gain weight, lower appetite and digestion, prefer to be less mobile, and with the good healing ability and cool disposition are classified into Kapha groups (Prasher et al. 2016(Prasher et al. , 2008. Thus this system is very different from modern classification of human phenotypes where individual system attributes are considered such as somatotypes for anthropometric attributes, phototypes for skin phenotypes, chronotypes for early and late risers. We have developed a new framework of Ayurgenomics that integrates the principle of Ayurveda with genomics. Our group for the first time provided molecular correlates of Prakriti which has also been important in discovery of predictive markers. Prominent amongst them has been a novel genetic marker in an oxygen sensor gene that differs between the Prakriti types and predicts adaptation as well as adaptability to high altitude conditions (Aggarwal et al. 2010). This study highlights that the integration of Prakriti can help in pre-screening of individuals prior to high altitude sojourns. Our and other groups' observations have provided further evidence of differences amongst Prakriti types in diverse studies and recommend this approach for stratification of healthy and diseased individuals for more effective outcomes. Ayurveda-based phenotyping along with different objective measures and omic studies now has been conducted in different ethnic populations to identify the shared correlates of Prakriti. One of the aims is to develop analytic methods for objective assessment of Prakriti. This has enabled its implementation in diverse populations across national and International settings. In our studies, Prakriti assessment is formalized using a questionnaire that is based on original textual descriptions (Prasher et al. 2016(Prasher et al. , 2008. This captures more than 150 features has been earlier developed for objective assessment of Prakriti besides information related to ethnicity, family history of diseases, etc. The questionnaire provides many options for each feature-each of which is mappable to Vata, Pitta or Kapha based on textual descriptions. Cumulative assessment of the features allows individuals to be classified into any of seven; Vata (V), Pitta (P), Kapha (K), Vata-Pitta (VP), Vata-Kapha (VK), Pitta-Kapha (PK) and Vata-Pitta-Kapha (VPK) groups. Sometimes inferences are taken into account a combination of features. Using the questionnaire, data of prakriti phenotypes were collected using earlier studies in genetically homogeneous cohorts from Northern and Western India (JTM and frontiers reference) Recently, three methods were utilized for the supervised modelling of the questionnaire in the domain of machine learning by Tiwari et al. (2017). The study was carried out in predominant Prakriti individuals of two genetically homogeneous cohorts from Northern and Western India. The regression framework of the LASSO model was used for extreme Prakriti modelling. The study also used an elastic net method for predicting non-redundant variables that alone might not differentiate extreme from non-extreme Prakriti individuals and for retaining correlated variables that might be of significant importance. In an orthogonal approach, the random forest has been used for the given data set which is based on the ensemble decision tree. All three methods provided a minimum set of variables for capturing the relation between Prakriti types and featured properties in a mathematical fashion. From these methods, 39, 61 and 59 features were obtained from LASSO, elastic net and random forest, respectively. Madaan and Goyal (2020) proposed an ensemble model for predicting Ayurveda-based constituent balancing in human body. The model is trained using ANN, KNN, SVM, NB, and DT, which are common machine learning techniques for classification analysis. In order to recognize constitutions, system is also constructed utilizing an ensemble of various machine learning techniques. The outcome of the experiment demonstrates that the proposed model, which is based on ensemble learning techniques, clearly outperforms traditional techniques. The findings suggest that machine learning may have a bright future thanks to developments in boosting algorithms. Indoriya and Barde (2022) have made a prediction of Ayurvedic herbs for specific diseases by using machine learning. The major goal of this research is to provide a method for everyone who favours using herbal remedies to treat illnesses. In this study, they employ machine learning's classification technique to predict the disease-specific herbs based on the properties of Ayurvedic herbs. They have defined the applicability of herbs for sickness and gathered information on 200 herbs for this.
In the present times, deep learning based on the dense neural network is gaining prominence in the area of artificial intelligence (AI). It is already known that in traditional learning-the algorithm runs linearly, but in deep learning, they are arranged in a pyramid of increasing complexity and generalization. A nonlinear transformation is applied in every step during inputs to the pyramid and after learning it creates a statistical model as output. Iterations continue until the yield reaches an acceptable level of accuracy. The number of processing layers through which information must occur is what has inspired the label as-deep. For the first time, we use this powerful tool in supervised machine learning-for classification of Prakriti. We use the data from 233 healthy individuals of extreme constitution types that are described above to develop our method for classification of Prakriti. These are the same cohorts that are described above. We also benchmark our method with the state-of-the-art supervised machine learning and establish a learning approach for transferring features from the Western to Northern Indian data and vice versa as well. Our study provides a computational framework to predict Prakriti classes from observable characteristics of an individual for its integration in precision medicine.

Contributions
Here, we propose to use a verbal question-answers for classifying "Ayurveda phenotype" of a person says Vata (V), Pitta (P), Kapha (K). Our hypothesis and observations lead towards a link between "personalized medicine" and the psycho-actual status of a patient. We confronted the difficulties of having insignificant research on this area and adequate dataset for the assignment. Although, old style ML method, for example, Random Forest, Decision Tree, SVM, KNN, and so on, we opened up new area of investigates using deep neural network with limited data. Interestingly, this study gives a promising future on personalized medicine design using deep learning with Ayurveda phenotypes. In this area of research, we have contributed as below: • We achieve better accuracy as compared to Decision Tree using deep learning with a few training samples. • We have explored different parameter settings for deep neural network towards optimal settings for few training samples. • We have approved the proposed technique utilizing a cross-dataset arrangement. • We have compared the proposed method with state-ofthe-art supervised machine learning approaches.
We have not claimed to have a novel contribution towards machine learning. We have designed a shallow neural network for the task. Due to the nature of the data, i.e. limited number of sample, tabular, etc., we considered DNN as a potential method for classifying. We switched to DNN (deep learning approach) over KNN, SVM, etc. (machine learning approach) due to the nature of flexibility. The DNN can be modified from shallow to deep based on the available training data size, whereas machine learning approaches have less flexibility towards this. We agree that the parameters of KNN, SVM, etc. are not fine-tuned.

Propose method
The proposed method is an artificial neural network (ANN) consisting of simple dense layers. Firstly, the questionanswer are taken as the input features. We consider 132 samples for Western (KEM HRC-VADU) and 105 samples for North (IGIB-North) cohort. Next, the answers are one hot encoded and create new (binary) features, indicating the presence of each possible value of the original data.
One hot encoding is a representation of a class variable as a binary vector. This requires first mapping the class values to integer values. Then, the value of each integer is represented as a binary vector which is all zero values except the integer index, which is denoted by 1. Let's make this concrete with a worked example. Suppose we have a sequence of labels with the values 'red' and 'green'. We can set the integer value of 0 as 'red' and the integer value of 1 as 'green'. Unless we always assign these numbers to these labels, this is called integer encoding. Consistency is important so that we can later reverse the encoding and get the labels back from integer values, as in the case of making a prediction. Next, we can create a binary vector to represent the value of each integer. The length of the vector will be 2 for 2 possible integer values.
The label 'red' encoded as 0 will be represented by a binary vector [1, 0] where the 0 th indicator is denoted by the value of 1. Instead, the 'green' label encoded as 1 will be represented by a. The binary vector [0, 1] where the first indicator is denoted by the value of 1.
Let the input feature ( f ) is an n-dimensional vector (in our case n = 376), and f ∈ R n×1 . A model (M) containing a dense layer consists of a set of trainable parameters represented by matrix-vector multiplication. The parameters which get updated during back propagation (Hagan and Menhaj 1994). The model is defined in Eq. (1). So we get an m-dimensional vector as output. A dense layer thus is used to change the dimensions of the input vector by applying a rotation, scaling, translation and the output passes to the next dense layer. We have studied varying the ANN construction and come up with an optimal ANN with a simple but efficient outcome. We have used a 16×1 and 8×1 Dense layers, one after another, in the proposed method. Figure 1 represents the architecture of the proposed method. During training, we have used 80% data for training and validation and rest 20% for testing. We have used batch size 5 with 200 epochs.

Results and discussion
In this section, we have discussed various state-of-the-art classification methods applied on Ayurveda constitution data and also elaborate on the results of the proposed method.

Deep learning-based outcomes
We have conducted several experiments to identify the optimum neural network for the classification task. First, we chose the smallest number of nodes and gradually increase We observe that different variations of models having different progress over training. It is noted that all the losses are normalized between 0 to 1. In this way, we observed similar characteristics of the behaviour by changing the training pools the hidden nodes to identify the effects. We have also presented the results by adding dropout (Srivastava et al. 2014) to the network and also varying dropout amount. Table 1  describes the deep model architecture, and Table 2 presents

Comparative results of classification
In this section, we have discussed various state-of-the-art learning algorithms applied for the classification task. We have conducted several experiments such as K-nearest neighbour (KNN) (Deng et al. 2016;Cover and Hart 1967), Decision tree (Safavian and Landgrebe 1991), Random forest (Azar et al. 2014), and Support Vector Machine (SVM) (Tong and Koller 2001) as the baseline. We have also used principal component analysis (PCA) (Abdi and Williams 2010) to reduce the dimension of the input data. Table 3 shows the comparative results of the classification.
It is observed that the proposed deep learning-based approach performs similar with the nearest competitors such as decision tree, KNN, and random forest. The main drawback of KNN is that the choice of K may affect the final accuracy. Decision tree and random forest are also suffering from a similar problem of the choice of depth. Figure 5 shows the effect of K and the depth on the North and Western data. It is observed that the algorithms perform differently with the same K or depth on different dataset. Table 4 shows the comparative results of the classification using limited training data (30%). We noted that the proposed deep neural network outperforms state-of-the-art supervised machine learning techniques.

Cross-dataset validation
Generalization is one of the most important features of learning algorithms. Better generalized algorithm considered much powerful. To understand the efficiency of the deep learning methods, we have conducted several experiments using Western and North dataset. We have trained the algo-  rithm using north data and validate it on the Western data, and vice versa. We found that the proposed architecture performs satisfactorily in both cases. Table 5 presents the results in detail, and Fig. 6 presents the confusion matrix in both cases for the proposed method.

Conclusion
This study thus reveals that the clinical methods of Ayurveda Prakriti identification can be learned and formalized through intelligent learning algorithm. It is noted that proposed opti-mized and lightweight dense neural network is sufficient to classify predominant Prakriti types using the phenotype questions. The network is general, and it is validated on crossdataset. The simple dense neural network does not demand high computational hardware and hence can be integrated with portable mobile devices. The study reveals that it can reduce the number of questions for accurate Prakriti prediction. The proposed automation helps trained Ayurveda physicians in predicting accurate Prakriti types. These models would be helpful across heterogeneous populations and help decipher novel link of genotypes to multi-system phenotypes in association studies.
Although the model is trained and tested for 3 extreme (predominant) types of Prakriti, there exist subtypes known as extreme and non-extreme Prakriti. In future, identification of such non-extreme cases can be considered.
Funding BP and MM would like to acknowledge CSIR-IGIB and COE-Ministry of AYUSH grant GAP0183.

Data availability
The dataset and the baseline implementation can be found in (https://github.com/skarifahmed/DeepAyurveda).

Conflict of interest
The authors declare that there is no conflict of interest regarding the publication of this paper.
Ethical approval This article does not contain any studies with human participants or animals performed by any of the authors.
Informed consent Informed consent was obtained from all individual participants included in the study.