In [1]:
import matplotlib.pyplot as plt
import numpy as np
In [6]:
x_5 = np.loadtxt('../results/movielens/hcpf_ndcg_5.txt')
x_10 = np.loadtxt('../results/movielens/hcpf_ndcg_10.txt')
x_20 = np.loadtxt('../results/movielens/hcpf_ndcg_20.txt')
x_50 = np.loadtxt('../results/movielens/hcpf_ndcg_50.txt')
x_100 = np.loadtxt('../results/movielens/hcpf_ndcg_100.txt')
In [7]:
plt.figure(figsize=(12,6))
plt.xlabel("Iterations/1000")
plt.ylabel("NCDG")
plt.plot(x_5,'black',label="K=5")
plt.plot(x_10,'green',label="K=10")
plt.plot(x_20,'red',label="K=20")
plt.plot(x_50,'blue',label="K=50")
plt.plot(x_100,'orange',label="K=100")
plt.legend(loc="lower right")
plt.grid()
plt.savefig('x_matrix.png')
plt.show()
In [ ]:
x_5 = np.loadtxt('../results/movielens/hcpf_mae_5.txt')
x_10 = np.loadtxt('../results/movielens/hcpf_mae_10.txt')
x_20 = np.loadtxt('../results/movielens/hcpf_mae_20.txt')
x_50 = np.loadtxt('../results/movielens/hcpf_mae_50.txt')
x_100 = np.loadtxt('../results/movielens/hcpf_mae_100.txt')
In [ ]:
plt.figure(figsize=(12,6))
plt.xlabel("Iterations/1000")
plt.ylabel("MAE")
plt.plot(x_5,'black',label="K=5")
plt.plot(x_10,'green',label="K=10")
plt.plot(x_20,'red',label="K=20")
plt.plot(x_50,'blue',label="K=50")
plt.plot(x_100,'orange',label="K=100")
plt.legend(loc="lower right")
plt.grid()
plt.savefig('x_matrix.png')
plt.show()