Hidden Markov Models to Estimate the Probability of Having Autistic Children

Genetic factors have been pointed out as the primary root associated with the risk of autism. Recent works indicate that approximately 80% of autistic people have inherited the condition from their parents. However, there are no estimates that indicate the likelihood of an autistic parent having an autistic child. Using Hidden Markov Models, together with the data of autism heritability, we developed a model to investigate the likelihood of autistic parents generating autistic children. Hidden Markov Models are a double-layered stochastic process, and it consists of a nonvisible stochastic process (not observable) that can be predicted through a visible one. Our model was built and validated using statistical data from the association of gender with recurrence of autism among siblings, as well as statistical data from the association of genetic factors with autism. Our results suggest that autistic parents may generate autistic children with probabilities of ≈ 33% for female children and ≈ 80% for male children. Such estimates could assist parents in some decision making processes according to the estimated risk of autism in their descendants.


I. INTRODUCTION
Composed by the Greek words ''autos'' (self) and ''ismos'' (action), the term ''autism'' was used for the first time by Kanner et al. [1] to describe children with an ''extreme inability to relate to others''. Autism Spectrum Disorder (ASD) is an age-and sex-related lifelong neurodevelopmental disorder characterized primarily by persistent deficits in core domains as social communication across multiple contexts, in addition to restricted and repetitive patterns of behavior, interests, or activities. These symptoms are mainly manifested in the early developmental period and limit or impair children's everyday lives. This disorder has a wide range of severity. It is dimensionally defined, with borders that overlap normality on the one hand and profound intellectual impairment caused by brain malfunctions on the other hand [2]- [4].
The associate editor coordinating the review of this manuscript and approving it for publication was Thomas Canhao Xu .
The most recent prevalence estimates indicate that we are witnessing an increase in the positive ASD diagnosis. Whereas in 2000 it was estimated one case for every 150 United States (US) children, in 2014 it was estimated one case for every 59 US children [5], and one case for every 162 global children, no matter the racial, ethnic or socioeconomic characteristics [6]. Moreover, this disorder is about three to four times more common among boys than girls [5], [7]. An estimated increase in the ASD diagnosis, from 6% to 15% per year, makes ASD the fastest-growing developmental disability in the USA [8], although a global report [9] highlights that the prevalence increase may be affected by the changes in diagnostic concepts, service availability, and awareness about the disorder.
The amount of money invested in supporting an individual with ASD during his/her lifetime is about USD$1.4M (USD$2.4M if intellectual disability) in the US, and USD$1.4M (USD$2.2M if intellectual disability) in the United Kingdom (UK). Such costs consist of special education services and parental productivity loss when children, plus special care, sheltered work, and individual productivity loss when adults [10]. Children and adolescents with ASD have medical expenses up to 6.2 times greater than those with Typical Development (TD), with general costs from 8.4 to 9.5 times greater than the average [11]. In addition to medical expenses, intensive behavioral interventions needed for the ASD treatment has costs from USD$40k to USD$60k per child per year [12].
Early diagnosis and proper interventions are critical factors in reversing ASD on children. Forehand treatments may result in improved cognitive, behavioral, and social functioning, allowing, for a subset of people, an evolution that may lead to healthy adult life, as well as significant long-term societal costs reductions [13], [14]. Despite the importance of early diagnosis and interventions, there are no low-cost automated tests to identify the disorder. The ASD diagnosis is performed through clinical observation, which is challenging to accomplish in young children, especially in the early years of life [15].
In addition to other causes, several works have related some parents' characteristics or the gestation environment with an ASD risk increase in their descendants. The most evident characteristics concerning the ASD risk increase are, for now, the parents' age and some genetic factors [16]- [22]. It is estimated that approximately 80% of ASD people inherited the condition from their parents [23], [24].
A Hidden Markov Model (HMM) is a double-layered Stochastic Process (SP). It consists of a nonvisible SP that can be observed through a visible one. The hidden process is a set of states connected by transition probabilities, whereas the observable process is a set of outputs or observable states. The observable states are emitted by the hidden states, following a probability density function [25]. Thus, it is possible to model systems where, given a sequence of visible states, another sequence of related states can be predicted.
Thus, taking into account the following true propositions: 1) there is an increase in the ASD prevalence nowadays; 2) early diagnosis and interventions lead to better outcomes for autism treatment, as well as long term costs reduction; 3) the high ASD heritability estimates; and 4) the ability of HMMs to predict unknown states, past or future, from current observations; this work aims to employ HMMs to infer the general probability of parents with ASD characteristics having ASD children.
The remaining of this article is structured as follows: section II shows a brief introduction to the HMMs, followed by some relevant HMMs applications in Section III. Section IV describes the methodology of our work, while section V shows our results. At last, section VI brings some discussion, and section VII concludes this work.

II. ARTIFICIAL INTELLIGENCE
Artificial Intelligence (AI) is the study of intelligent behaviors. Its primary goal is a theory of intelligence that explains the behavior of natural intelligent entities and guides the creation of artificial agents capable of smart behaviors [26]. Decision-making is an essential area of AI. There are a set of problems that require solutions for a better decision-making process. Such solutions may seek the application of statistical methods to construct inference models. These methods may involve, for example, techniques such as Bayesian Networks and Markovian Models. HMMs have been applied in different areas of AI, such as Computer Vision [27], Robotics [28], Speech and Face Recognition [29], [30], and Computational Biology [31].

A. HIDDEN MARKOV MODELS
Markovian processes in discrete state spaces are known as Markov Chains (MCs). An MC is a memoryless SP where its future state depends only on its current state, disregarding past states. Satisfying what is known as Markov property, a MC X t is a SP where given a value of X t the values of X s (t < s) are not influenced by the values of X u (u < t) [32].
Grinstead and Snell [33] made an interesting description on MCs by defining it as a set of states S = {s 1 , s 2 , ..., s r } on a process. The process starts in one of these states and moves successively from one state to another. Each move is called a step. If the chain is in a current state s i , then it moves to a state s j at the next step with a probability denoted by p ij , and this probability does not depend upon which states the chain was before the current state s i . The probabilities p ij are called transition probabilities. The process can remain in the state it is in, and this occurs with probability p ii . An initial probability distribution, defined on S, specifies the starting state and is calculated as a vector π that indicates the initial probability of each state.
This probability distribution of the states transitions is typically represented in a transition matrix. If a MC has N possible states, its transition matrix will be an N xN matrix, where each entry N ij is the transition probability from state i to state j. The transition matrix must be stochastic, which is a matrix where entries in each row must add up to exactly one ( n j=1 P ij = 1), since each row represents its own probability distribution.
Most Markovian processes consist of states that can be directly observed. However, HMMs are used for modeling Markovian processes that generate indirectly observable states, due to the transitions between the states of the MC that governs the process, but which can not be directly observed. HMMs are a double-layered SP with a nonvisible SP, but which can be observed through another SP that produces the sequence of observations. The hidden process in an HMM is a set of states connected by transitions with probabilities (an MC). In contrast, the observable process is a set of outputs or visible states, each one emitted by each not observable state according to some output of a probability density function. The challenge is to determine the hidden states from the visible states [25].
Most Neural Networks are probabilistic methods. They work in a discriminative approach to take inputs from a highdimensional space and map it to a lower-dimensional space.
On the other hand, HMMs are statistical methods, which work in a generative approach that models conditional dependencies of hidden states, where each state has a probability distribution regarding the observations. An HMM hidden state is the identity of the entity that caused each observation, and this hidden cause is translated statistically into the observed data. Through the forward-backward algorithms, it is possible to find the conditional distribution over the hidden states [25], [34].

1) HMMs STRUCTURE
An HMM is characterized by: As A, B is stochastic and its probabilities b j (k) are time independent ((b j (k) can be read as P(observation k at t|state q j at t)); • π = {π i }: the initial state distribution, where: An HMM specification requires the definition of two model parameters (N and M ), a symbol observation specification, and the definition of three sets of probability distribution A, B, and π . The complete set of model parameters is defined as λ = (A, B, π). This set of parameters defines the measure of probability for O, P(O|λ), where O is a set of observed states.
There are three main problems we can solve using HMMs: 1) Evaluation problem: given an observation sequence O, and a model λ, how to calculate the probability of O be produced by the model (P(O|λ)); 2) Best sequence of states: given an observation sequence O, and a model λ, how to calculate an optimal state sequence Q for a given sequence of observations; 3) Training: how to adjust the model parameters λ = (A, B, π) to maximize P(O|λ).

III. HMMs APPLICATIONS IN MEDICAL RESEARCHES
Several AI techniques have been applied in medical research. Deep neural architectures are being applied in different biomedical areas, such as public and medical health management, bio and medical imaging, and brain and body machine interface [35]- [37]. Current and potential uses of AI in healthcare also include dermatology, ophthalmology, radiology, histopathology, and nuclear medicine [38]. Some researches involving the use of intelligent systems applied to autism propose the formulation of diagnostic methods based on magnetic resonance imaging [13], [14], [39]- [48], early prediction approaches from behavioral and developmental measures [49], the use of robots and other AI techniques applied to the therapy processes of ASD children [50]- [57], wearable assistive technologies [58], and approaches to predicting autism risk genes [59], [60].
HMMs also have been used for modeling several different problems in medical researches [61]- [63], including approaches to diagnose cancer [64], for genotype imputation [65]- [69], and to investigate heart abnormalities [70]- [75]. Regarding to mental disorders, HMMs have been applied to evaluate the pronunciation quality and acquisition of language skills [76], [77], to diagnose emotion-related mental diseases [78], to recognize the stereotyped gestures which are typical of ASD people [79], and to forecast a possible future ASD diagnosis from infants with high risk of ASD [80].

IV. METHODOLOGY
This section covers our work methodology. Based on the possible observation of some characteristics of the parents, our approach was to estimate the probability variation of generating ASD children, a not observable condition before birth. Given the statistical nature of ASD heritability and recurrence data available in literature, HMMs seemed to be the most straightforward, appropriate, and transparent strategy to start this investigation. This adequacy is mostly due to the HMMs generative approach, which, based on prior probabilities of each state, allows to infer a distribution probability over the possible values of the hidden states.
For this, we used two sets of statistical data. A set of statistical information about ASD recurrence among siblings was used to model the hidden states transition probabilities, and a set of statistical data about ASD heritability was used to model the observable states emission probabilities. We did not use direct individual observations to train our HMMs parameters because, to the best of our acknowledgment, there is no such kind of public data available. Thus, we used the most relevant statistical data in literature for the adjustment ('training') of the proposed model parameters. The use of these known statistical relationships does not mean that our models are static or deterministic. Such data may change when arising either new data that could be used as training data or new relevant statistical data about ASD heritability.
The remaining of this section explains our assumptions about the probabilities used to model our HMMs. We used such HMMs to estimate the likelihood of ASD parents generating ASD children. We created six variations of the chains, each one according to the children's gender and transition matrices. Thus, it was possible to estimate the probabilities 99542 VOLUME 8, 2020 for ASD girls and ASD boys separately, which is essential given the difference in the ASD prevalence between genders. The following subsections describe our methodology stages.

A. HMMs STATES
To create our HMMs, it was necessary to define their hidden and observable states.
The hidden chain was composed of two states (N = 2): • TD: meaning a Typical Girl/Boy; • ASD: meaning an ASD Girl/Boy. The observable chain was composed of two states (M = 2): • TP: meaning Typical Parents (father AND mother without ASD diagnosis); • AP: meaning ASD Parents (father OR mother with ASD diagnosis). The ASD diagnosis may be considered as either clinical diagnosis or genetic characteristics recognized as possible causes of ASD. These hidden and observable states were used for modeling all of our HMMs.

B. INITIAL STATE DISTRIBUTION (π)
Although there are different and important studies related to ASD prevalence [5], [6], [81], we used an ASD prevalence among children calculated from the ASD diagnosis data presented by [82]. From these diagnosis data, we calculated three important probabilities: 1) the children general ASD prevalence, regardless of gender (P(A) = 0.0125); 2) the ASD prevalence among girls (P(AG) = 0.005); and 3) the ASD prevalence among boys (P(AB) = 0.0197). One of the most important researches on ASD prevalence indicates that 1/59 children were diagnosed inside the spectrum [5]. This same research shows that for each ASD girl (prevalence of 20%), there are four ASD boys (prevalence of 80%). Although the prevalence calculated from [82] shows a lower ASD prevalence, both general and by gender, it corroborates the relation of four ASD boys to each ASD girl.
We chose to use the calculated prevalence because the research of [82] was conducted among pairs of siblings, recording the probability of younger siblings being autistic concerning to the older sibling's condition. This pattern was essential so that we could both use that information in the development of our transition data and validate more accurately our prediction model by simulating the population of [82].
From the probabilities and the hidden states previously defined, it was possible to determine our initial state distribution vectors (π ) for both girls (π G) and boys (π B).
These initial state distribution vectors were used for modeling all of our HMMs according to the respective children's gender.

C. TRANSITION MATRIX (A)
Several works have been studying the ASD recurrence rates among siblings [82]- [85]. A more uniform estimate of ASD sex-specific recurrence rates among siblings was made by [82]. When the older male sibling had the ASD diagnosis, ASD was diagnosed in 4.2% of female siblings and 12.9% of male siblings. When the older female sibling had the ASD diagnosis, ASD was diagnosed in 7.6% of female siblings and 16.8% of male siblings. These statistics clearly show us the increased likelihood of a younger sibling being diagnosed as autistic when he/she has an older sibling already diagnosed.
Alternatively, when the older male sibling did not have the ASD diagnosis, ASD was diagnosed in 0.4% of female siblings and 1.5% of male siblings. When the older female sibling did not have the ASD diagnosis, ASD was diagnosed in 0.4% of female siblings and 1.8% of male siblings. These statistics clearly show us the decreased likelihood of a younger sibling being diagnosed as autistic when he/she has an older sibling not diagnosed.
Although an ASD older sibling suggests an increase in the likelihood of ASD in a younger sibling, the older sibling condition is not the determining genetic factor. The determining genetic factor is what they have in common, their parents. As we aim to estimate the risk of ASD children based on the parents' characteristics, we used the data of ASD recurrence among siblings to calculate the transition probabilities among our HMMs states.
We created three transition matrices for each gender since the probabilities significantly changed according to the older sibling gender. Two of them, according to the older sibling gender, and the other one disregarding the older sibling gender. We calculated all transition probabilities presented in the following subsections from the diagnostic data of the population studied by [82].

1) TRANSITION MATRICES FOR THE BIRTH OF FEMALES
To simulate female births, given that there is an older brother, we calculated the following conditional probabilities: 1) a girl being autistic, given that she has an autistic older brother (P(AG|AB) = 0.0422); 2) a girl being autistic, given that she has a typical older brother (P(AG|TB) = 0.0038); 3) a girl being typical, given that she has an autistic older brother (P(TG|AB) = 1 − P(AG|AB)); and 4) a girl being typical, given that she has a typical older brother (P(TG|TB) For clarification purposes, position {A(MF) 0,1 = 0.0038} is the conditional probability value of P(AG|TB), which is the transition probability from the state TB to the state AG. In other words, it means the probability of a TD older brother having an ASD younger sister.
To simulate female births, given that there is an older sister, we calculated the following conditional probabilities: 1) a girl being autistic, given that she has an autistic older sister (P(AG|AG) = 0.0759); 2) a girl being autistic, given that she has a typical older sister (P(AG|TG) = 0.0045); 3) a girl being typical, given that she has an autistic older sister (P(TG|AG) = 1 − P(AG|AG)); and 4) a girl being typical, given that she has a typical older sister (P(TG|TG) = 1−P(AG|TG)). These conditional probabilities constitute the transition matrix A(FF). To simulate female births, regardless the older sibling gender, we calculated the following conditional probabilities: 1) a girl being autistic, given that she has an autistic older sibling (P(AG|ASD) = 0.0486); 2) a girl being autistic, given that she has a typical older sibling (P(AG|TD) = 0.0041); 3) a girl being typical, given that she has an autistic older sibling (P(TG|ASD) = 1 − P(AG|ASD)); and 4) a girl being typical, given that she has a typical older sibling (P(TG|TD) = 1−P(AG|TD)). These conditional probabilities constitute the transition matrix A(XF).

2) TRANSITION MATRICES FOR THE BIRTH OF MALES
To simulate male births, given that there is an older brother, we calculated the following conditional probabilities: 1) a boy being autistic, given that he has an autistic older brother (P(AB|AB) = 0.1293); 2) a boy being autistic, given that he has a typical older brother (P(AB|TB) = 0.0154); 3) a boy being typical, given that he has an autistic older brother (P(TB|AB) = 1 − P(AB|AB)); and 4) a boy being typical, given that he has a typical older brother (P(TB|TB) = 1 − P(AB|TB)). These conditional probabilities constitute the transition matrix A(MM ). To simulate male births, given that there is an older sister, we calculated the following conditional probabilities: 1) a boy being autistic, given that he has an autistic older sister (P(AB|AG) = 0.1681); 2) a boy being autistic, given that he has a typical older sister (P(AB|TG) = 0.0180); 3) a boy being typical, given that he has an autistic older sister (P(TB|AG) = 1 − P(AB|AG)); and 4) a boy being typical, given that he has a typical older sister (P(TB|TG) = 1 − P(AB|TG)). These conditional probabilities constitute the transition matrix A(FM ). To simulate male births, regardless the older sibling gender, we calculated the following conditional probabilities: 1) a boy being autistic, given that he has an autistic older sibling (P(AB|ASD) = 0.1368); 2) a boy being autistic, given that he has a typical older sibling (P(AB|TD) = 0.0167); 3) a boy being typical, given that he has an autistic older sibling (P(TB|ASD) = 1 − P(AB|ASD)); and 4) a boy being typical, given that he has a typical older sibling (P(TB|TD) = 1 − P(AB|TD)). These conditional probabilities constitute the transition matrix A(XM ). Because genetic factors are the ones with the highest ASD risk increase, the presence of ASD diagnosis/genes in parents was taken as the observable characteristic, which may allow predicting the probability of generating ASD children. It was assumed that parents' characteristics (genetics or clinical diagnosis) can be observed before they have children.

1) ASD PARENTS GIVEN THEY HAVE ASD CHILDREN
Approximately 63% of ASD people have a parent with a positive history of any mental or neurological disorder (e.g., ASD, intellectual disability, attention-deficit/hyperactivity disorder, schizophrenia, etc.) [83]. Although genetics is already a widely accepted risk factor for ASD, there is no consensus on the percentage of autism caused by genetic factors. Researches point to percentages ranging from 38% [22] to 90% [20]. In part, these discrepancies can be explained by the variation of the research methods. Thus, the ASD heritability estimates are sensitive to the research methods, once these methods require several and often untestable assumptions [24].
A study conducted among siblings [24] has identified 14, 516 children diagnosed with ASD. Such work studied 37, 570 twin pairs; 2, 642, 064 full sibling pairs; and 432, 281 maternal and 445, 531 paternal half-sibling pairs. Liabilitythreshold models were fitted using mono-zygotic or dizygotic twins, full siblings, and paternal and maternal half-siblings to decompose the variance into four factors: 1) additive genetic effect (inherited); 2) non-additive genetic factors; 3) shared environmental factors; and 4) non-shared environmental factors. This data was used for the determination of concordant and discordant sibling pairs, which allowed them to calculate ASD heritability. The best model was the one that used additive genetic and non-shared environmental parameters. The ASD heritability estimated was ≈83%.
Another recent multinational cohort study with more than two million people also used additive genetic factors and nonshared environmental to estimate the ASD heritability [23]. They estimated that the ASD heritability is ≈80%, with possible modest differences in the sources of ASD risk replicated across countries.
No specific estimates are indicating the likelihood of a couple of parents being autistic (either one of them or both), given that they have an ASD child. Some of the best ASD heritability estimates we have are the genetic factors calculated by [24] and [23]. These estimates suggest that more than 80% of ASD people have inherited the condition directly from their parents. Thus, we have assumed that given an ASD child, there is a likelihood of 83% that its parents are also autistic (P(AP|ASD) = 0.83). Once the ASD heritability estimates of [24] do not take the children's gender into account, we used the conditional probability (P(AP|ASD)) as the emission data for ASD children of both genders.

2) ASD PARENTS GIVEN THEY HAVE TD CHILDREN
Similarly, no known estimates are indicating the likelihood of a couple of parents being autistic (either one of them or both) given that they have a TD child. Therefore, the ASD diagnosis data presented by [82] also were used for estimating the probability of ASD parents, given that they have a TD child. Such estimates were calculated as follows.
Firstly, we calculated the percentage of parents having both one ASD child and one TD child. Let's call this group of parents as PwAT . According to the ASD heritability data, having an ASD child suggests that PwAT have a higher likelihood to be autistic, although they also have a TD child. The fact of the PwAT also have a TD child is the starting point to estimate the probability of TD children having ASD parents. Through a statistical analysis over the data of [24], the percentage of PwAT is 2.26% (P(PwAT ) = 0.0226).
Secondly, we determined the percentage of children with PwAT according to their gender. The percentage of TD boys with PwAT is 46.82% (P(TTB|PwAT ) = 0.4682). The percentage of TD girls with PwAT is 53.18% (P(TTG|PwAT ) = 0.5318). These two conditional probabilities will allow us to estimate the likelihood of a PwAT occurrence according to the children gender.
Thirdly, we calculated the prevalence of TD children in the population studied by [82]. Regardless of the children condition, such population sex-ratio is 51.1% of boys (P(B) = 0.511), and 48.9% of girls (P(G) = 0.489). Given that, the total percentage of TD boys (P(TTB)) and TD girls (P(TTG)) was obtained as follows.
Finally, we calculated the likelihood of a PwAT occurrence with regard to the children's gender. We calculated two probabilities: the probability of PwAT , given that they have a TD boy (P(PwAT |TTB)); and the probability of PwAT , given that they have a TD girl (P(PwAT |TTG)). These two conditional probabilities were calculated using Bayes' theorem. As mentioned before, PwAT are those with both one ASD child and one TD child. Thus, P(PwAT |TTB) and P(PwAT |TTG) represent, in fact, the probability of a TD child having an ASD sibling. However, according to [24], ASD people have inherited the disorder from their parents in ≈83% of the cases. This heritability suggests that PwAT have the likelihood of 83% to be autistic, once they also have one ASD child. Taking the ASD heritability into account, the likelihood of at least one or both parents (mother OR father) being autistic was calculated with regard to the children's gender.
We used similar reasoning for estimating the overall prevalence of ASD parents in the population studied by [82]. In such population, 2.38% of the parents had at least one VOLUME 8, 2020 ASD child (P(PwA) = 0.0238). Taking the ASD heritability into account, the overall prevalence of ASD parents was calculated as follows.

P(AP) = P(PwA) · P(AP|ASD)
= 0.0238 · 0.83 = 0.0197 (7) We used this estimate of ASD parents to validate our model results by estimating the potential prevalence of ASD in their offspring. We compared the ASD estimated prevalence with the real ASD prevalence of [82].

3) EMISSION MATRICES (B)
The emission matrices were defined from the genetic probabilities and the prevalence data referred above (Subsections IV-D1 and IV-D2). Two emission matrices were defined, one for boys (B(B)) and one for girls (B(G)). These two matrices were used for modeling all of our HMMs, according to the children's gender. This subsection intends to simplify the visualization of the proposed methodology. The HMMs presented in Figure 1 and Figure 2 show our resulting HMMs structures and probabilities for female and male births, respectively. There are HMMs groups divided by gender because of the difference in statistical data regarding the prevalence and genetic inheritance of autism between male and female children.
The initial state distribution vectors of each group of HMMs have the same values for the three chains belonging to the same group. They were fitted according to the ASD prevalence data for each gender, Subsection IV-B.
Inside each group, the three distinct chains vary basically by the difference between the probabilities distribution between the transition states. This probability distribution variation is related to the gender of the older sibling, as presented in Subsection IV-C.
The emission data were computed according to the statistical data about the autism heritability. Statistics on genetically inherited autism did not take the gender into account, case of TD/ASD parents potentially generating ASD children with the same probabilities for both genders, Subsection IV-D1.  Our calculated statistics on non-genetically inherited autism take the gender into account, case of TD/ASD parents potentially generating TD children with distinct probabilities for each gender, Subsection IV-D2.

F. IMPLEMENTATION
The hmmlearn 1 library (version 0.2.1) was used for developing our HMMs, more specifically the MultinomialHMM model with multinomial (discrete) emissions. Hmmlearn is an open source set of algorithms and models usually used for modeling HMMs in the Python language. Built on scikitlearn, 2 NumPy 3 and SciPy, 4 hmmlearn adapts and uses these tools to sequence data.
We used the predict_proba function for estimating the probabilities of the HMMs hidden states. This function computes the posterior probability for each state in the model. Viterbi was employed as the predict_proba decoder algorithm. In an attempt to decrease accuracy errors, our probabilities were rounded to the 15th decimal place. Our HMMs implementation code can be seen at our code repository. 5

G. SIMULATIONS
We simulated the generation of children from two different parents' profiles. Such profiles were the parents' states defined in Subsection IV-A and used for modeling our observable states.
For each HMM set (boys and girls) and parents states/profiles (TP and AP), we simulated the birth of two children, maintaining the pattern of two children per couple presented by [82].
We observed the probabilities of the generated children being in one of the states defined in Subsection IV-A, those states which were used for modeling our HMMs hidden chains.

V. RESULTS
We organized our results according to the parents' profiles and the children's gender. The key findings of this study are shown on the graph displayed in Figure 3, which summarizes the probabilities of TD/ASD parents generating TD/ASD children. For comparison purposes, the overall ASD prevalence calculated from the data of [82] was also plotted.
The following subsections detail our results.

A. TYPICAL PARENTS
We displayed our results in tables. Each table row shows results with regard to the corresponding transition matrix. Results from A(FF) matrix is 7.3% greater than those from A(MF) matrix (Table 1). This difference was already expected due to the greater likelihood of ASD when there is an older ASD sister. The A(XF) matrix shows results close to the mean of the three matrices results. The mean probability of an ASD girl is (P(AG|TP) = 0.078%). This probability is ≈6.5 times lower compared to the overall probability of ASD girls (P(AG) = 0.5%), Subsection IV-B. For boys, the ASD probability increases ≈ 4 times with regard to ASD girls ( Table 2). Results from A(FM ) matrix is 6.6% greater than those from A(MM ) matrix. Taking the transition matrix A(XM ) into account, the mean probability   of an ASD boy is (P(AB|TP) = 0.306%). This probability is also ≈ 6.5 times lower compared to the overall probability of ASD boys (P(AB) = 1.97%), Subsection IV-B.
Our experiments suggest that it is unlikely that TD parents could generate an ASD child when genetic inheritance is taken into account. Although, according to the genetic factors presented by [82] and [23], from ≈ 17% to 19% of ASD children are generated by TD parents, with no evident hereditary genetic causes. This percentage of TD parents generating ASD children is mostly due to genetic mutations (not inherited) or gestational environment issues.

B. ASD PARENTS
Results from A(FF) matrix is 32% greater than those from A(MF) matrix (Table 3). Taking the transition matrix A(XF) into account, the probability of an ASD girl is (P(AG|AP) ≈ 33%). This probability is ≈ 65 times higher compared to the overall probability of ASD girls (P(AG) = 0.5%), Subsection IV-B.  For boys, the ASD probability increases ≈ 2.5 times with regard to ASD girls (Table 4). Results from A(FM ) matrix is 4.3% greater than those from A(MM ) matrix. Taking the transition matrix A(XM ) into account, the mean probability of an ASD boy is (P(AB|AP) = 79.6%). This probability is ≈ 40 times higher compared to the overall probability of ASD boys (P(AB) = 1.97%), Subsection IV-B.

VI. DISCUSSIONS
The overall direction of our results showed compelling evidence that could help learn about the ASD genetic risk among TD/ASD parents. Our data suggest that the ASD risk has a significant increase from 40 to 65 times in parents with ASD diagnosis/risk genes.
Although many authors have investigated AI approaches to predict ASD, to the best of our knowledge, this is the first attempt to use genetic statistics related to the parents' condition to infer the risk of autism in their children. Most works used some data from the subject itself to predict ASD diagnosis. Even studies aimed at predicting autism in newborns used individuals' own material samples [86], [87]. Therefore, we validate and compare our model results against some well-known statistical data about the heritability and prevalence of autism.
In order to validate our models results, we simulated the population studied by [82] (Subsection IV-B). Such population contains 3, 121, 074 children (1, 596, 078 males and 1, 524, 996 females), with two children per parents. The parents' states (observable ones) were randomly defined as TPs (98.03%) and APs (1.97%). These percentages of parents state follow the overall APs prevalence estimated at the end of Subsection IV-D2. In addition to the gender distinction, the number of children as being the first or second descendants was also taken into account.
Using the probabilities for generating ASD children obtained from our HMMs (Section V), our strategy was to estimate the ASD prevalence in that known population. Our estimated ASD prevalence was 0.7% among females. With regard to males, the estimated ASD prevalence was 1.9%.
The overall estimated ASD prevalence was 1.3%. As expected, it appears our estimated ASD prevalence is close to the ASD prevalence of the real population. The highest ASD prevalence variation was among females, which suggests that the calculated probabilities of ASD parents generating ASD girls would be a maximum probability.
On the other hand, our estimated prevalence is lower than or equal to the prevalence found by [5]. Their estimates were 0.7% among girls, 2.6% among boys and 1.7% for the overall ASD prevalence. These statistics corroborate that our probabilities of ASD parents generating ASD girls would be at their maximum and that the probabilities of ASD parents generating ASD boys could be even higher. Thus, it seems that our ASD risk probabilities for TD/ASD parents lead to ASD prevalence estimates close to the real ASD prevalence nowadays.
For ASD parents, our study indicates that the ASD risk for boys (≈ 80%) is approximately 2.5 times higher than it is for girls (≈ 33%). The current literature indicates that the ASD prevalence is three to four times higher in boys, which suggests that the ASD risk difference should be more significant between boys and girls. However, the difference between boys and girls with regard to the ASD prevalence is reduced when the genetic factor is taken into account. In an analysis of the population studied by [82], we observed that the difference in ASD prevalence between genders decreases when there is more evidence about the presence of the disorder in family. Taking only families (population of [82]) where both siblings have the ASD diagnosis, which increases the likelihood of the ASD inheritance in these families, the ASD ratio is approximately 2.8 ASD boys (74%) for each ASD girl (26%), approaching our results with regard to the risk of ASD parents having ASD children.
There are pieces of evidence that ASD parents are likely to have more ASD boys than ASD girls [5], [23], [24], [82]. Quite distinct probabilities for ASD parents generating ASD children could be obtained if there were more accurate data about the likelihood of a(n) TD/ASD boy/girl having TD/ASD parents. This indicates that we may have in the future a more appropriate emission matrix (B) data, whether by having more assertive data about the genetic factors (currently tending to be close to 80% for both gender) or by having more assertive data to distinguish between TD boys/TD girls with regard to the probability of having ASD parents (assumed in this work as 1.75% for boys and 2.05% for girls). A larger sample to create the transition data also would be able to make more accurate predictions.
Some improvements that could lead to different results would be to consider more than one level in the family ancestry chart [84], and take the parents' age into account [19]. Since in the Markovian models only the previous state influences the current state, there is no reference, for example, about the genetic influence of the grandparents. Such analysis could require other types of statistics about genetic factors in autism, as well as the use of different AI techniques, such as Bayesian Networks.

VII. CONCLUSIONS
Using our HMMs models, we estimated that ASD parents could generate ASD children with probabilities of ≈ 33% for girls and ≈ 80% for boys. As no previous work has estimated the ASD risk from parents characteristics, by quantifying the risk of ASD parents having ASD children, we gave a first look at how much the ASD risk increases for ASD parents (≈ 40 to ≈ 65 times), as well as how much the ASD risk decreases for TD parents (≈ 6.5 times). We also highlighted the decrease between the rate of ASD girls and ASD boys when genetic factors are taken into account (≈ 2.5 boys for each girl). This decrease suggests that genetically inherited autism may affect girls more than other causes of autism. Another key point was the estimation of the (emission) probabilities of ASD parents, even though they have TD children (P(AP|TB) and P(AP|TG)). Most ASD cases tend to cluster in families. Thus, our findings support and quantify past evidence that this clustering is due to genetic factors.
Although it is too early to draw statistically significant conclusions, the possibility of contributing to estimate the ASD risk according to the parents' condition is a fascinating proposition. We believe that we provide an initial model that can be applied and improved as long as new and potentially more accurate ASD statistical data emerge. For people who intend to have children and have autistic characteristics/diagnoses, our estimates could be useful in clarifying the ASD risk, as well as to alert in planning the process of early investigation on their children. By having more accurate statistical data about the genetic factors in autism, future works could estimate more accurately the potential risk of ASD parents generating ASD children. He is currently an Associate Professor with UNIFEI. He has authored over 70 journal articles, book chapters, and conference papers. His research interests include machine learning, autonomous robotics, power systems, and technology for autism spectrum disorder. VOLUME 8, 2020