How to get recommendations for new user in MLRecommender model

I have a dataset with 3 columns "item_id", "user_id", "rating". I created a coreML MLRecommender model from this dataset.

I want to use this model to get the top 10 predictions for a new user (not in the original dataset) but who has rated a subset of the items in the dataset.

I don't see any API in the Apple docs to do this. Both the recommendations APIs only seem to accept an existing user-id and get recommendations for that user.

The WWDC tutorial talks about a prediction API to achieve this. But I dont see this in the Apple API documentation and code below from WWDC tutorial cannot be used since it does not give details on how to create the HikingRouteRecommenderInput class it passes into the prediction API.

let hikes : [String : Double] = ["Granite Peak" : 5, "Wildflower Meadows" : 4] let input = HikingRouteRecommenderInput(items: hikes, k: 5) // Get results as sequence of recommended items let results = try model.prediction(input: input)

Any pointers on how to get predictions for new user would be greatly appreciated.

How to get recommendations for new user in MLRecommender model
 
 
Q