-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SolverError after using Standardized constraint #52
Comments
This might be because you have duplicated items in your data matrix (if this is for the same or similar data for your other issue). For embedding problems, there's no need to get multiple vectors for the same item. If you have a specific need for that then maybe you can explain what you're trying to do, and we can see if there's another way to do it. EDIT: If you provide me your data ( |
Hello, thank you for the quick reply. The reason for the duplicates is, that I'm using PyMDE to compute user/item embeddings from the interactions matrix of the MovieLens dataset. I created a sparse matrix from the interactions and then ran the
I attached the data.zip. Here is a piece of code to quickly load them: df = pd.read_csv('...')
n_users = df["user"].max() + 1
n_items = df["item"].max() + 1
rows, cols, values = df["user"], df["item"], df["value"]
matrix = csr_matrix(
(values, (rows, cols)),
dtype="float64",
shape=(n_users, n_items),
) Latest implementation: pymde.seed(0)
mde = pymde.preserve_neighbors(matrix, init='random', n_neighbors=10, constraint=pymde.Standardized(), verbose=True)
embeddings = mde.embed(verbose=True, max_iter=1000, memory_size=50)
embeddings = embeddings.cpu().numpy() |
I would like to use the
Standardized()
constraint, but every time I get a following error:I tried different configurations of the
preserve_neighbors
function, but still getting the same error. After removing this constraint, everything works just fine. I also triedCentered()
constraint, which works as well.My implementation is:
The text was updated successfully, but these errors were encountered: