## 3 Analyzing HCAHPS Data
### Salient Feature Extraction  
One can draw associations between the salient features of the outer (satisfaction) cluster and the salient features of its inner (demographic) sub-clusters. For instance, suppose that as a result of the first layer we get an outer cluster whose salient features indicate low values for \"satisfaction with Doctor\". This cluster is then further clustered into demographic sub-groups. Suppose that the salient features of one of the sub-groups indicates higher values for age and a particular doctor (Doctor X) who visited most patients in this sub-group. Putting the salient features of a cluster and its sub-clusters together, one can draw an association between older patients who expressed low satisfaction with their doctor and who were visited by Doctor X. Such associations must be further validated through statistical evaluations and can be used to make recommendations to the hospital. For example, the recommendation system might recommend not to assign Doctor X to older patients. We extract the salient features of each cluster based on the methodology proposed in [16]:  
1. The centroid of a cluster \(k\) is computed as the average of the points in the cluster: \[X_{k}=\frac{\sum_{i=1}^{N}P_{i}}{N}\] (1) where \(X_{k}\) is the centroid of cluster \(k\) and \(P_{i}\) is a point in cluster \(k\). 2. The Euclidean distance of each point to its cluster centroid is computed: \[d_{i}=\sqrt{\sum_{j}\Bigl{(}P_{ij}-X_{kj}\Bigr{)}}\] (2)
3. The points in each cluster are divided into _in-pattern_ and _out-pattern_ records. The records whose distance lie within the range defined by (3) are called in-pattern records while all other records including the ones in other clusters are called out-pattern records. \[\mu_{k}-z\sigma_{k}<d_{i}<\mu_{k}+z\sigma_{k}\] (3) where \(\mu_{k}\) and \(\sigma_{k}\) are the mean and standard deviation of the points in cluster \(k\), respectively, and \(z\) is a constant factor. Smaller \(z\) results in more out-pattern records and larger \(z\) result in more in-pattern records. 4. For each feature \(v\) and cluster \(k\), the mean of all in-pattern records, \(\mu_{in}(k,v)\) and the mean of the out-pattern records, \(\mu_{in}(k,v)\), are computed: \[\mu_{in}(k,v)=\frac{\sum_{P_{i}\in\varphi_{in}}P_{iv}}{|\varphi_{in}(k)|}\] (4) \[\mu_{out}(k,v)=\frac{\sum_{P_{i}\in\varphi_{out}}P_{iv}}{|\varphi_{out}(k)|}\] (5) where \(\varphi_{in}(k)\) and \(\varphi_{out}(k)\) are the set of in-pattern and out-pattern points in cluster \(k\), respectively. A difference factor, \(df(k,v)\), is calculated for each feature \(v\) in cluster \(k\) based on Equation (6): \[df(k,v)=\frac{\mu_{in}(k,v)-\mu_{out}(k,v)}{\mu_{out}(k,v)}\] (6)
6. The mean and standard deviation of the difference factors for all features in cluster \(k\) are calculated as follows: \[\mu_{df}(k)=\frac{\sum_{v-1}^{D}df(k,v)}{D}\] (7) \[\sigma_{df}(k)=\sqrt{\sum_{v-1}^{D}\left(df(k,v)-\mu_{df}(k)\right)^{2}/D}\] (8) where \(D\) is the number of features in the input space. 7. A feature \(v\) is a salient feature in cluster \(k\) if its corresponding difference factor in \(k\) deviates considerably from \(\mu_{df}(k)\). More formally, feature \(v\) is a salient feature in cluster \(k\) if: \[df(k,v)\leq\mu_{df}(k)-z\sigma_{df}(k)\] (9) \[df(k,v)\geq\mu_{df}(k)+z\sigma_{df}(k)\] (10)  
where \(z\) is a constant factor. The smaller the \(z\) the more salient features in each cluster. Salient feature extraction method is outlined in Algorithm 2. ```
FindingSalientFeatures (noc, clustered_data, z) Comment: calculating the center of each clustering by averaging records in the cluster. For i \(\leftarrow\) 0 to noc \(-\)\(1\) cluster_centers [i] \(\leftarrow\) average over columns(clustered_data[i]) Comment: calculating distance of records from their assigned cluster center.