I have build framework to do some algorithm evaluation. I have build methods to calculate based on data that I am passing into these method. RMSE@K, NDCG@K, MAE@K etc.
ndcg = []
rmse = []
mae = []
for i in xrange(11):
results = generate_metrics(data_file, i)
ndcg.append(np.mean(results['ndcg']))
rmse.append(np.mean(results['rmse']))
mae.append(np.mean(results['mae']))
plt.plot(ndcg)
plt.plot(rmse)
plt.plot(mae)
plt.plot()
plt.show()
I want to use ggplot within python to plot this in one graph: X axis is @k values which is 0-10 and y axis relevant value in each list.
how can I convert above lists to a data frame like this:
at_k ndcg rmse mae
1 1 0.4880583 0.3438043 0.3400933
2 2 0.4880583 0.3438043 0.3400933
3 3 0.4880583 0.3438043 0.3400933
4 4 0.4880583 0.3438043 0.3400933
5 5 0.4880583 0.3438043 0.3400933
6 6 0.4880583 0.3438043 0.3400933
7 7 0.4880583 0.3438043 0.3400933
8 8 0.4880583 0.3438043 0.3400933
9 9 0.4880583 0.3438043 0.3400933
10 10 0.4880583 0.3438043 0.3400933
and plot it using ggplot