Skip to content
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

Auc evalutation return always nan #702

Open
apujol-accenture opened this issue Oct 27, 2023 · 0 comments
Open

Auc evalutation return always nan #702

apujol-accenture opened this issue Oct 27, 2023 · 0 comments

Comments

@apujol-accenture
Copy link

apujol-accenture commented Oct 27, 2023

Hello,

I have an issue when i compute roc auc, ti's return always NAN for all the value in the matrix.
`interactions=interactions.tocsr().astype(np.float32)
user_features=interactions.tocsr().astype(np.float32)
item_features=interactions.tocsr().astype(np.float32)

train, test = random_train_test_split(interactions, test_percentage=0.2, random_state=42)

epochs = 30

# Train model
model = LightFM(loss='bpr', no_components=200, max_sampled=100, learning_schedule='adagrad', item_alpha=1e-6, learning_rate=0.001)

for epoch in range(epochs):
    model.fit_partial(train, user_features=user_features, item_features=item_features, num_threads=3, epochs=1)
    print(auc_score(model, test, train_interactions = train, user_features=user_features, item_features=item_features, check_intersections=True).mean())`

I check the train and test matrix there is no Null or Nan so I don't understand.
Can you help me on this case.

@apujol-accenture apujol-accenture changed the title Auc evalutation return always null Auc evalutation return always nan Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant