## 5 Analysis of the Results
mapping_columns = [col for col in df.columns if 'Mapping' in col] max_coverage_values = [df[col].max() for col in coverage_columns] max_coverage_index = max_coverage_values.index(max(max_coverage_values)) max_mapping_column = mapping_columns[max_coverage_index] max_coverage_column = coverage_columns[max_coverage_index] max_mapping_column, max_coverage_column  
After that, the rearrangement (pivoting) of the data from the restructured data table has been done. In this new format (pivot data), each unique value in the ID (requirement) column of the original table becomes a row. Each unique value in the Standard column of the original table becomes a new column in pivot data. Pivot the data pivot_data = restructured_data.pivot_table(index='ID', columns='Standard', values='Coverage', aggfunc='mean') # Creating correlation matrix correlation_matrix = pivot_data.corr() # Ploting plt.figure(figsize=(10, 10)) sns.heatmap(correlation_matrix, annot=True, cmap='coolwarm', square=True) plt.title('Correlation Matrix of Coverage Levels for Different Standards') plt.show()  
A creation of the heatmap using the sns (which typically stands for Seabom, which is a visualization library) has been completed. A heatmap is a grid where each cell's color represents a value, and, here, the values are the correlation values from the correlation matrix. The proposed model reorganizes some data to see how \"Coverage\" values vary for different \"Standards\" for each \"ID\". It then checks how each \"Standard\" relates to every other \"Standard\" and displays these relationships as a colorful heatmap. Two Python libraries, networkx (abbreviated as nx), which helps in creating, manipulating, and studying networks and graphs, and itertools, which provides tools to create iterators for efficient looping, were included as well. The mappings string, splitting it by commas, and then generating all possible pairs (combinations) of these split values were initialized. For example, if mappings were \"A,B,C\", then the pairs would be (\"A\", \"B\"), (\"A\", \"C\"), and (\"B\", \"C\"). The proposed model defines a function to create a network/graph from a table (dataframe). For each row in the table, it checks the 'Mapping' and 'Coverage' columns. If the 'Mapping' value is valid, and the 'Coverage' is greater than zero, it adds connections (edges) to the graph between the items in 'Mapping', weighted by the 'Coverage' value. import networkx as nx import itertools def create_graph(df, mapping_col, coverage_col): G = nx.Graph() for _, row in df.iterrows(): mappings = row[mapping_col] coverage = row[coverage_col] if pd.notna(mappings) and coverage > 0: for pair in itertools.combinations(mappings.split(','), 2): if G.has_edge(*pair): G.edges[pair]['weight'] += coverage else: G.add_edge(*pair, weight=coverage) return G G G = create_graph(df, 'Mapping', 'Coverage') nx.draw(G, with_labels=True) ```  
After creating the graph, the code visualizes it (see Figure 21). The heatmap shows the correlation matrix of the coverage levels for different standards. Each cell in the matrix represents the correlation coefficient between two standards. The correlation coefficient is a value between \(-1\) and \(1\) that represents the degree to which two variables are linearly related. Mathematically, the correlation coefficient is derived from the covariance of the two variables, normalized by the product of their standard deviations. This normalization ensures that the correlation coefficient is dimensionless and bounded between \(-1\) (a perfect negative linear relationship) and \(1\) (a perfect positive linear relationship). A value of \(0\) indicates no linear correlation. The bounds of \(-1\) and \(1\) arise because the correlation coefficient essentially measures the quality of the linear approximation to the data; any data set perfectly aligned along a line (either ascending or descending) will achieve these extremal values, while data sets that do not exhibit a linear trend will result in values closer to \(0\).