## 3 Materials and Methods
### Need Based Package Generation Using Clustering  
The machine learning concept of clustering is used for classification purposes. Clustering is the natural grouping of records or data, in which similar records are in the same group whereas dissimilar records are in the different group. For generating need-based packages, we must perform category based analysis of transactional data. One category of employees is considered at one time and then clustering and mapping are applied as shown in Figure 3, amount is the money used by the employees of the selected category and on the x-axis number of records are the number of transactions in the selected category. Each category can be divided into groups, as depicted in the Figure 3. As a result of clustering, clusters are obtained in each category. Once a centroid for each cluster is obtained, we compute the distance of each computed centroid from all records of the considered category. The distance between centroids and all records of each category are computed and based on these calculated distances, patients are assigned to each cluster. The values of amount and visits are kept same as that of the centroid for all records. These steps are repeated for all the centroids. Algorithm 1, explains the procedure for the need-based package generation. Inputs for the algorithm 1 are: number of clusters, max_iterations, \(\varphi_{1}\),\(\varphi_{2}\),\(\varphi_{3}\),\(\varphi_{4}\),\(\varphi_{5}\),\(\varphi_{6}\),\(\varphi_{7}\) along with all considered attributes. First of all, the Kmeans algorithm is executed for one category. The second for loop is on x, where x denotes the number of clusters and \(C_{x}\) denotes centroid for cluster \(x\). Mapping of \(C_{x}\) on specific category records is performed. The meaning of term mapping is different in our scenario, it is the computation of distance of \(C_{x}\) from all the records in the considered category. Fourth, for loop iterates for the number of records in a specific category. \(D_{u}\) denotes the distance of record from centroid where subscript \(k\) denotes category. The mean of all the \(D_{u}\) is computed. All those records whose \(D_{u}\) is less than the Mean are added to the \(G_{x}\). All remaining are discarded. At line no 18, the amount of considered record is \(Am_{u}\), and \(Am_{x}\) is the amount of centroid. \(Am_{u}\) is replaced with \(Am_{x}\). In the end, the sum of all amounts \(Am_{x}\) in one group is computed. \begin{table}
\begin{tabular}{l l} \hline \hline
**Notation** & **Description** \\ \hline \(\varphi\) & depicts transactional data of employees. \\ \hline \(k\) & There are seven categories of employees in this organization and each category is availing separate \\  & insurance plan. Categories are represented by k where k= (A, B,C,D,E,F,G) \\ \hline \(\phi\) & denotes total computed medical benefit. \\ \hline \(\alpha_{j}\) & denotes total amount in each category. \\ \hline \(\beta_{i}\) & depicts packages for \(k\) categories. \\ \hline \(\alpha_{C_{i}}\) & depicts amount of each group in each category \\ \hline  & is the Premium amount which the hospital/organization is paying. \\ \(O\) & The organization is giving total premium \(T\) and for each category there is a separate value of \\  & premium amount \\ \hline \(\epsilon\) & Number of total employees are denoted by \(E\) and number \\  & of employees in each group \(G_{x}\) of each category are denoted by \(\epsilon\) \\ \hline \(V^{i}\) & is the out of pocket employees in each category i = k where k = A,B,C,D,E,F,G. \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Notation with description. For generating packages, there is a need to sum up the total amount of all members in one group. Within every category \(u\), total amount is computed for each group \(\beta_{i}\). Total amount \(\alpha_{j}\) for each category is computed in the next step. Figure 3: Clusters within categories. Figure 2: Graphical Summary of Proposed Methodology.