June 2017
Beginner to intermediate
334 pages
7h 11m
English
The engine takes a query in the form of a JSON structure to output prediction.
The JSON input structure is like the following code snippet for our Recommendation Engine example:
{ "userEntityId": "u1", "number": 10, "categories": ["c4", "c3"] }
The query JSON structure is mapped via the Query class. The following piece of code shows the example of the Query Class for this engine:
org.template.recommendation; import java.io.Serializable; import java.util.Collections; import java.util.Set; public class Query implements Serializable { private final String userEntityId; private final int number; private final Set<String> categories; private final Set<String> whitelist; private final Set<String> blacklist; public Query(String ...Read now
Unlock full access