When I run this code:
svd.recommend(x, n=3, is_row=False, only_unknowns=True)
I get this error:
ValueError: Matrix is empty! If you loaded an SVD model you can't use only_unknowns=True, unless svd.create_matrix() is called
And it's very right: I'm loading with this code:
svd = SVD(filename=sFileTarget) # Loading already computed SVD model
Which I had previously generated with this code:
svd = SVD()
svd.load_data(filename=sFileSource, sep=',', format=dictFormat)
k = 5 # Number of clusters
svd.compute(
k=k, min_values=3, pre_normalize=None,
mean_center=False,
post_normalize=True, savefile=sFileTarget
)
But when I use create_matrix(), I get this:
>>> svd = SVD(filename=sFileTarget) # Loading already computed SVD model
>>> svd.create_matrix()
Creating matrix (0 tuples)
Matrix density is: None%
And nothing works from there, of course.
What might the solution be?
Thanks!