Created
January 18, 2019 02:34
-
-
Save jfkirk/f23d5c9415b1cc0628c71f19ee3c88dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Let's try a new loss function: WMRB | |
print("Training collaborative filter with WMRB loss") | |
ranking_cf_model = tensorrec.TensorRec(n_components=5, | |
loss_graph=tensorrec.loss_graphs.WMRBLossGraph()) | |
ranking_cf_model.fit(interactions=sparse_train_ratings_4plus, | |
user_features=user_indicator_features, | |
item_features=item_indicator_features, | |
n_sampled_items=int(n_items * .01)) | |
# Check the results of the WMRB MF CF model | |
print("WMRB matrix factorization collaborative filter:") | |
predicted_ranks = ranking_cf_model.predict_rank(user_features=user_indicator_features, | |
item_features=item_indicator_features) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment