去越南做网站,大气的个人网站,建筑材料价格查询网站,百度商桥代码怎么加到网站上目录 渐变气泡图彩色气泡图 在进行实验结果分析的时候#xff0c;气泡标尺图能非常清晰对不同的结果进行多维度的比较#xff0c;特别是在深度学习模型大小和精度进行比较的时候非常合适使用#xff0c;以下是几个例子。 渐变气泡图
import seaborn as sns
import matplotl… 目录 渐变气泡图彩色气泡图 在进行实验结果分析的时候气泡标尺图能非常清晰对不同的结果进行多维度的比较特别是在深度学习模型大小和精度进行比较的时候非常合适使用以下是几个例子。 渐变气泡图
import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pddata pd.DataFrame({Model Size (MB): [251, 218, 261, 280, 221],Accuracy: [0.85, 0.88, 0.87, 0.91, 0.83],Model Name: [Resnet, Unet, Googlenet, Deeplabv3, Pspnet]
})# Create a bubble plot with larger circle sizes for different accuracies and a different colormap
plt.figure(figsize(10, 6))
plot sns.scatterplot(datadata, xModel Size (MB), yAccuracy, sizeAccuracy, hueAccuracy, sizes(100, 1000), cmapviridis)
plt.title(Bubble Plot of Model Size vs. Accuracy in Deep Learning)
plt.xlabel(Model Size (MB))
plt.ylabel(Accuracy)# Customize the legend and move it inside the plot to the upper left corner
plt.legend(titleAccuracy)
plt.gca().legend(locupper left, bbox_to_anchor(0.02, 0.98))# Add model names near the circles
for line in range(0, data.shape[0]):plot.text(data[Model Size (MB)][line], data[Accuracy][line], data[Model Name][line], horizontalalignmentleft, sizemedium, colorblack, weightsemibold)# Adjust X-axis tick spacing
plt.xticks([200, 220, 240, 260, 280, 300])plt.show()示例图
彩色气泡图
import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pddata pd.DataFrame({Model Size (MB): [251, 218, 261, 280, 221],Accuracy: [0.85, 0.88, 0.87, 0.91, 0.83],Model Name: [Resnet, Unet, Googlenet, Deeplabv3, Pspnet]
})# Define a bright and colorful color palette
bright_palette sns.color_palette(husl, as_cmapTrue)# Create a bubble plot with larger circle sizes for different accuracies and the defined color palette
plt.figure(figsize(10, 6))
plot sns.scatterplot(datadata, xModel Size (MB), yAccuracy, sizeAccuracy, hueAccuracy, sizes(100, 1000), palettebright_palette)
plt.title(Bubble Plot of Model Size vs. Accuracy in Deep Learning)
plt.xlabel(Model Size (MB))
plt.ylabel(Accuracy)# Customize the legend and move it inside the plot to the upper left corner
plt.legend(titleAccuracy)
plt.gca().legend(locupper left, bbox_to_anchor(0.02, 0.98))# Add model names near the circles
for line in range(0, data.shape[0]):plot.text(data[Model Size (MB)][line], data[Accuracy][line], data[Model Name][line], horizontalalignmentleft, sizemedium, colorblack, weightsemibold)# Adjust X-axis tick spacing
plt.xticks([200, 220, 240, 260, 280, 300])plt.show()示例图