Question: import seaborn as sns import matplotlib.pyplot as plt import pandas as pd # Create the DataFrame from the table data data = { 'Risk Description':

import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd
# Create the DataFrame from the table data
data ={
'Risk Description': [
'Unwanted Outputs, Bias',
'Lack of Quality, Factuality',
'Lack of Timeliness',
'Lack of Explainability',
'Insecure Generated Code',
'Incorrect Response to Inputs',
'Automation Bias',
'Misinterpreting Text as Instruction',
'Lack of Confidentiality',
'Self-reinforcing Impacts',
'Developer Dependence',
'Misinformation',
'Social Engineering',
'Re-identification',
'Surveillance Concerns',
'Malware Creation',
'Malware Placement',
'RCE Attacks',
'Training Data Reconstruction',
'Model Subversion',
'Member Reasoning Attacks',
'Homograph Attacks',
'Prompt Injection Attacks',
'Data Poisoning',
'Model Poisoning',
'Learning Transfer Attacks',
'Environmental Impact',
'Economic Disruption',
'Overreliance/Dependency',
'Dual Use Concerns',
'Unforeseen Consequences'
],
'Planning': [1,0,1,0,0,0,0,0,1,0,0,1,0,1,1,0,0,0,0,0,0,1,0,0,0,0,1,1,0,1,0],
'Data': [1,1,1,0,0,1,0,0,1,0,0,1,0,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0],
'Development': [1,1,0,1,1,1,0,1,1,1,1,1,1,0,1,1,0,0,1,1,1,0,1,0,1,0,0,0,0,0],
'Operation': [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,0,0,0,0,0,1,0],
'Ethical': [1,1,0,1,0,1,1,0,1,1,1,1,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,1],
'Legal': [1,1,0,1,1,1,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0],
'Technical': [1,1,0,1,1,0,0,0,1,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0],
'Societal': [1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,1],
'Economic': [1,1,1,0,1,1,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0],
}
df = pd.DataFrame(data)
plt.figure(figsize=(15,10)) # Adjust figure size as needed
sns.set(font_scale=0.9) # Adjust font size for readability
sns.heatmap(df.set_index('Risk Description').transpose(), cmap="YlOrRd", annot=True, fmt='d', cbar_kws={'label': 'Risk Presence'})
plt.title('AI System Lifecycle & Impact Risk Assessment Heatmap', fontsize=14)
plt.xlabel('Lifecycle Phase / Impact Category', fontsize=12)
plt.ylabel('Risk Description', fontsize=12)
plt.xticks(rotation=45, ha="right", fontsize=10) # Rotate x-axis labels for better readability
plt.yticks(fontsize=10)
plt.show() Let's create a heatmap to visualize the AI risks across the lifecycle phases and their broader impacts.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!