# NOT RUN {
# creating a recommendations service endpoint from an Azure resource
svc <- resgroup$get_rec_service("myrec")
rec_endp <- svc$get_rec_endpoint()
# creating the endpoint from scratch -- must supply admin, recommender and storage keys
rec_endp <- rec_endpoint$new("myrecusacvjwpk4raost",
admin_key="key1", rec_key="key2", storage_key="key3")
# upload the Microsoft store data
data(ms_usage)
rec_endp$upload_data(ms_usage)
# train a recommender
rec_model <- rec_endp$train_model("model1", usage="ms_usage.csv", support_threshold=10,
similarity="Jaccard", user_affinity=TRUE, user_to_items=TRUE,
backfill=TRUE, include_seed_items=FALSE)
# list of trained models
rec_endp$sync_model_list()
# delete the trained model (will ask for confirmation)
rec_endp$delete_model("model1")
# }
Run the code above in your browser using DataLab