## 3 PLA Index  
For each day of CGM data, a graph can be generated. The PLA index is a scalar value that depends on the shape, and hence character, of a graph. It quantifies how variable a graph is. A Piecewise Linear Approximation (henceforth PLA) can approximate any function using a piecewise linear function. (This was first mathematically formulated in [5], and it is the basis of the \"Zig-Zag\" method of stock price analysis [6].) The approximating function minimizes the number of linear pieces necessary to remain within a specified distance of the original function at each 5 minute interval. For our purposes, the PLA of a diabetic's CGM blood glucose graph was calculated using the sliding window algorithm of [7]. We call the number of linear pieces used in the PLA the _PLA factor_ for a graph and the specified distance the PLA's _tolerance_. Therefore, at any given time, the PLA is no further than the PLA's tolerance from the CGM graph. A sample PLA is shown superimposed over the original blood glucose graph in Figure 1.  
Thus, we can fix a tolerance, and then for each of the over 6600 graphs, we can compute a PLA factor. Testing different tolerances, we found that choosing 12 mg/dL led to an adequate representation of the data, as it was sufficient in capturing overall trends while not introducing extraneous segments when blood sugar is relatively stable. When referring to the PLA factor throughout, it is therefore implied that the tolerance is 12 mg/dL. We then take the average PLA factor for a particular person to calculate for each patient a single _PLA index_. Using this PLA index, we classified each patient into one of three groups depending on whether the patient possessed a high or low PLA index or fell between the two extremes. The PLA indices were found to range from 13 to 40, with most being between 21 and 26. Figure 2 shows a high PLA index adjacent to a low PLA index. Our definitions of high, medium, and low PLA indices are summarized in Table 1.  
The classification scheme in this table corresponds with a separate classification, discovered independent of any knowledge of the PLA index, which was generated using a wavelet-based unsupervised learning algorithm that is described in Section 4. The algorithm clusters data based on some inherent similarities within the data. The unsupervised quality of the algorithm is vital because we start with no predisposition about what clusters, if any, exist in the data. When clusters do form, there is a significant relationship between points within them as seen in [8]. Specifically, we followed the lead of [PERSON] _et al._ who used data from a wavelet analysis of image pixels to successfully distinguish  
Figure 1: PLA (purple) of a blood glucose graph (black). The PLA factor is 10.  
between the artist or artists of alleged [PERSON] and [PERSON] paintings [2]. The clusters they found corresponded to the actual artist of the painting, while other points corresponded to imitators. These ideas have also been used to detect forged handwriting [9]. Using our wavelet-based approach, one possible way to identify clusters from the blood glucose data is the three banded clusters shown in Figure 3. When we colored this same graph based on the PLA index, a similar, banded appearance results, as shown in Figure 4. Thus, the results of the wavelet-based approach, an approach which has a track record of being able to identify similarities and differences within a data set, were roughly consistent with the classification by the simple PLA index. The correspondence between the wavelet based method and PLA index is admitted not as strong as \begin{table}
\begin{tabular}{|c|c|c|} \hline  & **Color** & **PLA index** \\ \hline
**Low** & Green & 22 or less \\ \hline
**Medium** & Red & 23, 24, or 25 \\ \hline
**High** & Blue & 26 or more \\ \hline \end{tabular}
\end{table} 
Table 1: Three classes of variability. Figure 2: A high PLA index shown above, and a low PLA index below.