{'fraction_non_alphanumeric': 0.046862725005977386, 'fraction_numerical': 0.012057246302558323, 'mean_word_length': 4.08475164987843, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Hidden Markov model analysis for fluorescent time series of quantum dots

We present a hidden Markov model analysis for fluorescent time series of quantum dots. A fundamental quantity to measure optical performance of the quantum dots is a distribution function for the light-emission duration. So far, to estimate it, a threshold value for the fluorescent intensity was introduced, and the light-emission state was evaluated as a state above the threshold. With this definition, the light-emission duration was estimated, and its distribution function was derived as a blinking plot. Due to the noise in the fluorescent data, however, this treatment generates a large number of artificially short-lived emission states, thus leading to an erroneous blinking plot. In the present paper, we propose a hidden Markov model to eliminate these artifacts. The hidden Markov model introduces a hidden variable specifying the light-emission and quenching states behind the observed fluorescence. We found that it is possible to avoid the above artifacts by identifying the state from the hidden-variable time series. We found that, from the analysis of experimental and theoretical benchmark data, the accuracy of our hidden Markov model is beyond human cognitive ability.

In the present paper, we present an analysis for a timeseries data on optical properties of single quantum dots (QDs). The QD is a fine particle of several nanometers and is a system that can confine electrons and holes in all dimensions. Due to its unique electronic and fluorescent properties, there are wide applications including singleelectron transistor [26], quantum teleportation [27], QD laser [28], QD solar cell [29], and quantum computers [30]. From a viewpoint of the performance of the QD as emiters, it is desirable that the light emission continues as long as possible under continuous excitation, leading to a high performance on luminescence quantum yield. However, it is known that the single QDs show blinking behaviors [31]. As a fundamental property for this measure, a distribution function on the light-emission states of the single QD is widely employed and called a blinking plot [32].
In the experiment, we irradiate the QD with the light continuously and observe a situation where the QD emits or quenches in real time. Figure 1 shows an example of the observed fluorescent intensities of a single QD as a function of time. As can be seen from the figure, the time series of the fluorescent intensity is noisy due to the experimental equipment and the measurement environment. It is difficult to quantitatively distinguish the light-emission and quenching states especially in such case that the noises are larger or comparable to the fluorescent signals. Conventionally, in order to define the light-emission states, an artificial threshold is introduced by hand in the intensity analysis, and all the states beyond this threshold are evaluated as the light-emission state. With this definition, the light-emission duration are estimated, and a distribution function on the duration is evaluated. With this method, however, the result will include a large amount of short light-emission duration that do not actually exist, and then, the obtained distribution function would clearly be erroneous.
In this study, we present a time-series data analysis using a hidden Markov model (HMM) [33,34] to solve this problem. The HMM is a typical machine learning method to handle time-series data, and is applied to various dynamic data analyses such as stock price prediction [35] and anomaly detection [36]. In material science, it is also beginning to be used for several applications including random telegraph noise [16][17][18][19], nitrogen-vacancy center in diamond [20,21], electron holograms [22], atom quantum jump dynamics [23], fluorescence resonance energy transfer [24], and crack propagation [25]. The HMM introduces hidden variables for specifying states behind the observed real time series. We will show that the above mentioned noises in the fluorescence data can be eliminated with the HMM method; the time series of the hidden variable are noise-suppressed, and as a result, the duration evaluation becomes stable. The present paper is organized as follows: In Sec. II, we describe a basic idea for treating the present problem, details of the HMM, and how to analyze the time series data with the HMM. In Sec. III, we present results of the HMM analysis for experimental fluorescence data. On top of that, to verify accuracy of the present HMM analysis, we show performance for the theoretical benchmark data. Section IV summarize conclusions. We also in Appendix A describe details for the blocking Gibbs sampling to solve the HMM.

A. Basic idea on state identification
Before presenting details, we first show a basic idea for studying a blinking phenomena. As an example, we consider a time series of a fluorescent intensity I(t) in Fig. 2 (a). In this time series, the intensity is high at the regions of t 1 ≤ t ≤ t 2 and low in the range of 0 ≤ t ≤ t 1 and t 2 ≤ t. Here, we define the former region as an ON (bright) state and the latter region as an OFF (dark) state. The time series contains a noise η, which makes it difficult to determine the ON or OFF state; if the level difference ∆ between the two states competes with the η, the state assignment becomes difficult.
In the conventional method, a threshold intensity I th in the panel (a) is introduced to define the ON and OFF states; if the intensity I(t) is larger than the I th , the state at the time t is specified as the ON states. On the other hand, if the intensity I(t) is smaller than the I th , the state is classified as the OFF state. Figure 2 (b) shows a statistics on the duration τ of the ON state, based on the conventional method (see Sec. II C for details). Since the intensity I(t) largely fluctuates due to the noise, many short-duration states of τ ∼ 0.1-0.5 s generate. In the normal sense, however, in the case of this time series, the ON duration would be t 2 − t 1 = 62.6 s and there are no shorter ON states. From this discussion, the evaluation of the duration with the conventional method would bring about an erroneous result for the noisy time series.
Next, we consider the state assignment by HMM. The HMM introduces a time series of a hidden variable s(t) that governs the generation of the I(t) (see Sec. II B). When s(t) = 1, the state at the time t is ON associated with the high fluorescent intensity, while when s(t) = 0, the state at the time t is OFF with the low intensity. The s(t) time series can be determined with the Bayesian inference for the observed time series I(t). Note that the noise is suppressed in the s(t) time series [ Fig. 2 (c)]. Since the s(t) has basically a binary feature, by intro- ducing a threshold s th in the panel (c), we can perform a stable state assignment.

B. Hidden Markov model
The HMM is in general expressed with a combination of various probability distributions of stochastic variables [33,34]. A form of the HMM employed in the present study is shown below: p(I, S, Θ, π, A) = p(I|S, Θ)p(S|π, A)p(Θ)p(π)p(A). (1) Here, I is observed data, S is hidden variable, Θ describes parameters characterizing the distribution function of I, π is parameters to set the initial step of the hidden variable, and A describes a transition matrix for the time evolution of hidden variables. The p(S|π, A) in Eq. (1) describes the conditional probability distribution of S with A and π fixed, and similarly, p(I|S, Θ) is the conditional probability distribution of I after S and Θ are determined. I in Eq. (1) is discrete time-series data written as where I n is an observed value at the n-th time grid, and the total number of grids is N . In the present study, the I corresponds to the time series of the fluorescent intensity of a single QD. S in Eq. (1) is hidden variables written as which is also a time series. The component s n is a vector and consists of K components as The s n describes an internal state behind the fluorescence data at the time t n . In the present study, the number of the internal states is 2 (K = 2), and thus, the s n is described with binary as Note that this variable satisfies a sum rule as K k=1 s kn = 1.
Θ in Eq. (1) expresses variables to characterize a probability distribution function of the time series I in Eq. (2). Since the total number of the internal states is K, we consider K distribution functions and prepare parameters for each distribution function. In the present study, we assume that the distribution function of each state follows the Gaussian distribution. In the Gaussian function, it is characterized by mean µ and precision λ, where λ −1 represents a variance. Thus, we rewrite Θ as {µ, λ}, where µ contains the mean of each state as µ = (µ 1 , µ 2 , · · · , µ K ) T and λ contains the precision of each state as λ = (λ 1 , λ 2 , · · · , λ K ) T .
Here, µ k and λ k are the mean and precision of the k-th Gaussian distribution. π in Eq. (1) describes parameters to set an initial-step hidden variable s 1 , and this is also a K-component vector as π = (π 1 , π 2 , · · · , π K ) T (9) with π k being the probability of taking the k-th state at the initial step. Note a normalization of K k=1 π k = 1. A in Eq. (1) is variables for describing the transition between successive hidden variables, which are expressed as with representing a transition probability from k -th state to other states. Thus, A is a K × K matrix, and the matrix element A kk expresses a transition probability from the k -th state to the k-the state. Note the normalization of K k=1 A kk = 1.
We now rewrite the right-hand side of Eq. (1) by considering independency of the stochastic variables as [33,34] p(I|S, µ, λ)p(S|π, A)p(µ, λ)p(π)p(A) Here, we note that the forms of K k=1 p(I n |µ k , λ k ) s kn and K k =1 p(s n |A k ) s k n−1 in Eq. (12) select only one of the K states due to the binary feature of the hidden variable s n [Eqs. (5) and (6)]. The variable dependency in this model is represented as a graph in Fig. 3. Arrows represent a dependency between variables; for example, in this model, I n depends on s n , µ, and λ, which corresponds to K k=1 p(I n |µ k , λ k ) s kn of the right-hand side in Eq. (12). Concrete forms of each probability distribution in Eq. (12) is summarized as follows: 1. p(I n |µ k , λ k ) is the Gaussian distribution as lows. An initial-step hidden variable s1 is generated based on the parameter π in Eq. (9), while sn is generated by the previous-step sn−1 and the transition matrix A in Eq. (10). Stochastic variables are represented with nodes and the dependency between the variables is represented by arrows. and respectively.
3. p(µ k , λ k ) is the Gaussian-Gamma distribution as where m, a, b, and ν are hyperparameters in the Gaussian-Gamma distribution, and C G (a, b) is the normalization constant as with Γ(a) being the Gamma function.
4. p(π) and p(A k ) are the Dirichlet distribution as and respectively, and α and β are hyperparameters in the Dirichlet distribution. Also, C D (x) is the normalization constant written as In the practical simulation, we need to calculate the conditional distribution function under the observed time-series data I in Eq. (2) as where p(I) is a marginal distribution written as In the present study, we used the blocking Gibbs sampling [37] based on the Bayesian inference to optimize the conditional distribution function in Eq. (21). Details can be found in Appendix A. Anyway, by evaluating the conditional distribution function, the time-series data of the hidden variable S in Eq. (3) can be obtained, which is used for the following analysis of the ON/OFF duration.

C. Duration estimate based on HMM
We next describe an evaluation of the duration of the ON or OFF state of QDs. We first consider a sampling average for the time-series data of the hidden variable as where S (i) is the time-series data of the hidden variable in the i-th Gibbs sampling step, and N itr is the total number of the Gibbs sampling. TheS is given in the same form as in Eq. (3): In the present study, the s n has two components; the ON and OFF states. Therefore, thes n is written as and s OFF 2n . Also, the sum rule in Eq. (6) was used in the transformation from the middle to right-side equations. We note that the component s ON n is a real number, not a binary, after the ensemble average. Now, using s ON n , we define a time series s ON as Figure 4 shows a schematic diagram of s ON denoted by a thick green-solid curve. Generally, in the s ON , statistical noise is suppressed and smooth behavior is obtained (see Sec. III). We thus estimate the ON duration τ ON and the OFF duration τ OFF from the s ON data, where a threshold s th denoted by thin red-solid line is introduced. Since the s ON takes a value from 0 to 1, s th = 0.5 is adopted. It is defined as entering the ON state when the s ON curve exceeds the s th . We set this time to t ON α with a suffix α to specify the number of the ON event.
On the other hand, when the s ON curve becomes smaller than the s th , it is defined as entering the OFF state. We set this time to t OFF α . From these two times, the duration of the ON state is defined as Similarly, we define the duration of the OFF state as and (30) respectively, where N ON and N OFF are total numbers of independent ON and OFF events, respectively. We note that, in this calculation, the two duration are considered equal within the grid spacing ∆τ . f ON α and f OFF α are the number of events with the same ON and OFF duration, respectively. Also, w ON α and w OFF α are weights given as [32] and respectively. Lastly, the denominators N ON and N OFF in Eq. (29) and Eq. (30) are the total number of the ON and OFF events, which satisfy the following sum rules: and respectively, where we introduced correction factors S ON and S OFF which are determined from the normalization condition of P ON (τ ) and P OFF (τ ) .

III. RESULTS AND DISCUSSIONS
We implemented the method described in Sec. II into the program code written by Python. With this program, we performed HMM simulations for experimental and theoretical benchmark data. TABLE I summarizes the present setting of our HMM simulation and the employed hyperparameters. In the simulations, observed fluorescence data I in Eq. (2) is standardized as with a mean ofĪ and a standard deviation of The standardized time seriesĨ has a mean value of 0 and a standard deviation of 1, which is used as input as the HMM simulations. K is the number of the hidden states, and ν, m, a, and b are the hyperparameters for the Gaussian-Gamma distribution of p(µ k , λ k ) in Eq. (16). α is the hyperparameter for the distribution function p(π) in Eq. (18), which is a K-component vector. Also, β is the hyperparameter for the distribution function p(A k ) in Eq. (19), which is represented by a K × K matrix. The matrix elements are characterized by N , D, and γ, where N is the total length of the time series, and D and γ were set to 1 and 0.01 in the present simulation, respectively. Nitr is the total number of the iteration steps of the Gibbs sampling, which depends on the simulations.
Nitr in Eq. A. HMM analysis for experimental data

Experimental fluorescence data
Here, we apply the above method to analysis of the experimental data. Before presenting the analysis results, we first describe experimental detalils. The QDs used in the experiment are CdSe/ZnS core-shell QDs capped with trioctylphosphine oxide and hexadecyl amine, synthesized via the pyrolytic decomposition of organometallic compounds [38]. The QDs have a spheroid shape (minor axis: 4.1 ± 1.2 nm; major axis: 5.3 ± 1.3 nm), as confirmed in the transmission electron microscope (TEM) [ Fig. 5 (a)] and the scanning TEM [ Fig. 5 (b)] images. The thickness of the ZnS shell is 1.7 monolayers. The QDs were spin-cast from a toluene solution at 3,000 rpm onto silica glass plates with a hydrophobic surface. The spin-cast samples were set in a sealed chamber with optical windows.
We measured scanning fluorescence images and time series of a fluorescent intensity of single QDs using a scanning laser microscope [39] equipped with an objective lens (100×; 0.9 NA) and avalanche photodetector. The laser-light wavelength and excitation intensity were 488 nm and 133 W/cm 2 , respectively. The fluorescence images were acquired by raster scanning a laser spot on the sample surface. The laser spot size and scanning step length were the diffraction limited size (less than 1 µm) and 0.1 µm, respectively. An exposure time for each step   [31], i.e., an irregular change between the ON and OFF states. The blinking occurrence rate appeared to be reduced in the wet-nitrogen atmosphere, as demonstrated qualitatively in Ref. [39]. It is known that the OFF state of blinking corresponds to the trapping of photogenerated electrons (or holes) in trap site(s) located on or near QD surfaces [31,32]. Thus, we can qualitatively infer that suppression in the wet-nitrogen atmosphere is due to inactivation of the trap site(s) by photo-adsorption of water molecules in the environment [39]. However, it is difficult to quantify blinking properties with commonlyused conventional analysis, assuming an artificial threshold between the ON and OFF states (Sec. II A), due to the low signal-to-noise ratio of the data in Figs. 6 and 7. As such, we can apply an HMM analysis described in Secs. II B and II C to quantify blinking within the noisy data.

HMM analysis
Green-dashed lines in Figs. 6 and 7 show time series of the hidden variable s ON in Eq. (26), which are obtained from the HMM simulations for the time series of the experimental fluorescent intensity I in Eq. (2). We see from the figure that the behavior of the s ON is in a good agreement with the variation in the experimental intensities (red-solid lines). Also, the s ON basically takes 1 or 0 discontinuously and is hardly affected by noise. For such data, the duration can be estimated stably by the method described in Sec. II C. The blue-dotted line I th is a threshold to distinguish the ON and OFF states for the I data, while s th denoted by the black-solid line is a threshold for the s ON data. When estimating the duration in the conventional way with using I th (Sec. II A), it becomes erroneous. For example, in the case of Fig. 6 (c), the difference in the experimental intensity of the ON and OFF states is clearly smaller than the noise. In this case, it would be difficult to distinguish the two states from fluorescent time series with I th . If the way is forcibly performed for estimating the duration, a large amount of short duration due to noise will occur. In contrast, in the analysis for s ON with using s th , since the noise is suppressed in s ON , the ON/OFF assignment can be stably performed. To analyze trends of each data, we performed a fitting of the following function [40] to the data as where A is a coefficient and m is an inverse exponent. The fitted function is described by a black-solid line and the obtained m values are summarized in TABLE II. A small m indicates that long-duration states tend to be formed; for example, the plot of the panel (g) exhibits the smallest m = 0.884 and therefore has much long duration data compared with the other plots. In contrast, in the largest m plot of the panel (b), the data concentrate in the short duration regime. By comparison of m of each plot, we found that the probability distributions based on the conventional method are approximated by τ −2 , while the probability distributions based on the HMM decay as τ −1 . Thus, the plots based on the conventional method tend clearly to reflect many artificial short duration states, and the HMM corrects the long duration data. We note that, on the results based on the HMM, the m values with the wet condition are basically small compared to the m with the vacuum condition, indicating that single QDs emit long and quench long in the wet atmospheres, while in the vacuum atmosphere, the single QDs blink with moderate length.

B. HMM analysis for theoretical benchmark data
In this part, we check quantitative accuracy of the present HMM simulation. In Sec. III A, we have shown that there is a discernible difference between the results based on the conventional method and the HMM simulation, but it does not mean the quantitative accuracy for the HMM. In order to verify the accuracy of the HMM, it is necessary to perform HMM analyses for a time series with correct answers and check whether the HMM can reproduce the correct results.

Generation of model time series
For this purpose, we consider the following model distribution functions for the ON and OFF duration [41] as (40) respectively, where A ON and A OFF are normalization constants. θ(x) is a step function, and q, ξ and l are parameters of the model functions. τ min and τ max are respectively lower and upper cutoffs of the duration considered in the present model. These functions have been widely used in analyses for the blinking phenomena with the power law of QDs [41,42]. The exponential term in Eq. (39) is valid in the case of the truncated power law. In the simulation, we first generate a time series with   the model distribution functions. Next, we perform an HMM analysis for the generated time series, and evaluate the ON and OFF duration. Finally, we check whether the distribution function calculated with the simulation [Eqs. (29) and (30)] reproduces the original model distribution functions [Eqs. (39) and (40)]. The model time series is generated as follows: 1. We first define baselines for the ON and OFF intensities (I ON and I OFF ) and their difference 2. We next sample {τ ON α } from p ON (τ ) in Eq. (39) and {τ OFF α } from p OFF (τ ) in Eq. (40) with α specifying a sampling number. The τ ON α and τ OFF α represent the duration of the I ON and I OFF intensities, respectively. With these data, we make a sequence τ as where N e is the total number of the ON or OFF events.
3. Then, based on the above τ , I ON , and I OFF , we construct a bare time series which are discretized at interval ∆t and in a similar form to Eq. (2).
4. Finally, we add an artificial noise η to the above time series I 0 , where η is sampled from the Gaussian functions as with σ being a standard deviation of the Gaussian function. Thus, the final model time series I in Eq. (2) is obtained.  Fig. 9 compare TS-I, TS-II, and TS-III. As the ∆ becomes smaller (∆ = 0.7 → 0.5 → 0.3), it becomes difficult to distinguish between the ON and OFF intensities. At ∆ = 0.3 (TS-III), it would be no longer possible for the human eye to distinguish between the ON and OFF states correctly.
We note that, to ensure numerical accuracy of the HMM simulation, a proper choice of a grid spacing ∆t of the time series is important; ∆t must ideally be small enough compared to a grid spacing ∆τ of the duration grid which is introduced in the calculation of P ON (τ ) in Eq. (29) and P OFF in Eq. (30). Then, ∆t ∆τ.   Fig. 9 (a). Similarly, the panels (b) and (c) are the results for TS-II (∆ = 0.5) in Fig. 9 (b) and TS-III (∆ = 0.3) in Fig. 9 (c), respectively. Bare time series I0 denoted by red-dotted lines are also shown for comparison. If the HMM simulation is successful, the s ON should match I0.
By definition, ∆τ represents the minimum duration. In order to evaluate it accurately, the ∆t must be small enough. In the present study, ∆t and ∆τ were respectively set to 0.01 s and 0.1 s for TS-I and TS-II and 0.005 s and 0.1 s for TS-III.

The time series of hidden variables
We show in Fig. 10 results of our HMM analysis for the time series in Fig. 9. The panels (a), (b), and (c) correspond to the results for TS-I [ Fig. 9 (a)], TS-II [ Fig. 9 (b)], and TS-III [ Fig. 9 (c)], respectively. The  Fig. 9, based on the model functions pON(τ ) in Eq. (39) and pOFF(τ ) in Eq. (40). ξ, q, l, τmax, and τmin are parameters characterizing pON(τ ) and pOFF(τ ). ION and IOFF are baselines for the ON and OFF intensities, respectively, and ∆ is their difference [Eq. (41)]. According to the ∆, we named the time series with ∆ = 0.7, 0.5, and 0.3 TS-I, TS-II, and TS-III, respectively. σ is a standard deviation of the Gaussian function to generate noise η [Eq. (44)]. Ne is the total number of the ON or OFF events [Eq. (42)] in the time series. Note that the total number of the ON and OFF events in the time series is the same. ∆t is a grid spacing of time series, and ∆τ is a grid spacing of the duration grid, which is introduced in the calculation of PON(τ ) in Eq. (29) and POFF(τ ) in Eq. (30). The τmax, τmin, ∆τ , and ∆t are given in a unit of s.

Eq.
TS-I TS-II TS-III solid-green line describes the time series of the hidden variables s ON in Eq. (26), which is compared with the bare time series I 0 in Eq. (43) (red-dotted line). We see that the behavior of s ON rather well reproduces the I 0 .
There are almost no misjudgements even for the time series with ∆ = 0.3 (TS-III), and thus our HMM has very high accuracy.

Probability density of duration time
From the analysis to the s ON time series as shown in Fig. 10, we evaluated the duration {τ ON α } and {τ OFF α } using the method described in Sec. II C, and calculated their probability distributions P ON (τ ) in Eq. (29) and P OFF (τ ) in Eq. (30). The resulting blinking plots are shown in Fig. 11 by red dots. The left-side panels represent P ON (τ ), and the right-side panels are P OFF (τ ). Also, the upper (a) and (b) panels describe the results for the model time series TS-I [ Fig. 9 (a)]. Similarly, the middle (c) and (d) and lower (e) and (f) panels describe the results for the time series TS-II [ Fig. 9 (b)] and TS-III [ Fig. 9 (c)], respectively. We also give the original model distributions p ON (τ ) in Eq. (39) and p OFF (τ ) in Eq. (40) by black-solid lines. We see that the calculated blinking plots are well reproduce the original distribution functions. As emphasized in Fig. 9 (c), it is difficult for humans to identify the ON or OFF state in the I time series TS-III (∆ = 0.3, η = 0.5), but the present HMM simulation is able to discriminate between the ON and OFF states with a fairly high accuracy.

Quantitative accuracy of HMM analysis
To check the HMM-simulation accuracy quantitatively, we evaluated recall and precision, which are defined as and respectively. Here, N ans , N sim , and N suc are the number of actual events with a certain duration, the number of events with a certain duration obtained by the HMM simulation, and the number of correctly predicted events, respectively. In the present model time series, we introduce cutoffs τ min and τ max [Eqs. (39) and (40)], and then the actual events exist only in 1-1000 s. In this analysis, we tolerate a 10% error. For example, in the case of data with the duration of τ = 1 s, if the simulation evaluates it within 0.9-1.1 s, it is regarded as a success event. Certainly the accuracy of the short duration seems a little bad; especially, simulations observes duration of 0-1 s that does not actually exist. Overall, however, the accuracy is very high and satisfactory.

IV. SUMMARY
We have presented an HMM analysis for experimental and theoretical fluorescent time series of QDs. In this simulation, we have calculated the time series of hidden variables to evaluate the ON/OFF duration of the fluorescence. With the resulting duration data, we have calculated blinking plots. Through the comparison between the results based on the conventional and HMM analyses, we have found discernible quantitative differences; in the conventional method, the ON or OFF state is directly evaluated for the noisy fluorescent time series, thus leading to a large amount of artificial short duration data. On the other hand, in the HMM analysis, the hidden-variable time series which is noise-suppressed is calculated for the ON/OFF assignment, so we can accumulate reliable duration data; the artificial short duration data are suppressed and long duration data are properly evaluated. It was found that these differences in the evaluation methods have a great influence on the analysis for the noisy time-series data; in the case of the QD fluorescence data, it had a significant effect on the power of the duration probability distribution. Also, in order to show the accuracy of the present HMM analysis, we have analyzed the theoretical benchmark time series generated from model distribution functions for the duration. The distribution functions obtained from the HMM simulations well reproduce the model distribution functions, and we have found that the ON/OFF assignments can be performed rather accurately even for the low signal-to-noise time series.
In the present simulation, we have focused on two-state analysis, but the HMM can also be applied to analysis of three or more states. If such an analysis is performed successfully, it will be possible to construct a more detailed model on fluorescence of QDs, especially on the relaxation from photo-excited to ground states [43], which is left as a future task.  4. Finally, we sample A (i) from a conditional distribution function with fixed S (i) , µ (i) , λ (i) , π (i) , and I as follows: