runtime comparison
2019-04-15 16:09发布
生成海报
"""
Table 3. Runtime comparison (in milliseconds) of PIC and spectral
clustering algorithms on several real datasets.
Dataset Size NCutE NCutI PIC
Iris 150 17 61 1
PenDigits01 200 28 23 1
PenDigits17 200 30 36 1
PolBooks 102 7 22 1
UBMCBlog 404 104 32 1
AGBlog 1222 1095 70 3
20ngA 200 32 37 1
20ngB 400 124 56 3
20ngC 600 348 213 5
20ngD 800 584 385 10
Table 4. Runtime comparison (in milliseconds) of PIC and spectral
clustering algorithms on synthetic datasets.
Nodes Edges NCutE NCutI PIC
1k 10k 1885 177 1
5k 250k 154797 6939 7
10k 1000k 1111441 42045 34
50k 25000k - - 849
100k 100000k - - 2960
"""
import matplotlib.pyplot as plt
import numpy as np
plt.style.use('ggplot')
data = np.array([[17, 61, 1],
[28, 23, 1],
[30, 36, 1],
[7, 22, 1],
[104, 32, 1],
[1095, 70, 3],
[32, 37, 1],
[124, 56, 3],
[348, 213, 5],
[584, 385, 10]])
n_rows, n_cols = data.shape
width = 0.5
index = np.arange(n_rows) * (n_cols + 1) * width
bars = []
for i in range(n_cols):
bars.append(plt.bar(index + i * width, data[:, i], width))
for bar in bars:
for item in bar:
y = item.get_height()
plt.text(item.get_x() + 0.5 * width, y + 1, int(y), ha='center', va='bottom', size=6)
ticks = ["Iris", "PenDigits01", "PenDigits17", "PolBooks", "UBMCBlog", "AGBlog", "20ngA", "20ngB", "20ngC", "20ngD"]
plt.xticks(index + 0.5 * n_cols * width, ticks, rotation=90)
plt.tight_layout()
plt.show()
打开微信“扫一扫”,打开网页后点击屏幕右上角分享按钮