Created
October 21, 2013 23:55
-
-
Save predictioniogists/7092937 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# You need to specify the name of the engine from which you want to retrieve the prediction results. | |
# Suggest similar funded projects | |
try: | |
# retreive top 5 similar funded projects | |
result = client.get_itemsim_topn("itemsim-fund", "the project ID", 5) | |
iids = result['pio_iids'] # list of recommended project IDs | |
except Exception as e: | |
iids = get_default_iids_list(5) # default behavior when no prediction results. eg. recommends the latest funded projects | |
log_error(e) # Handle error here. You may log the error for debugging. | |
display_projects(iids) # display the projects to the user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment