Description Usage Arguments Value Examples
This is the prediction endpoint. This will be the primary interaction point for all predictive analysis.
1 2 3 |
data |
the text example being provided to the API. As a general rule, the data should be as similar to the examples given to the train function (above) as possible. Because language in different domains is used very differently the accuracy will generally drop as the difference between this text and the training text increases. Base64 encoded image data, image urls, and text content are all valid. |
version |
for api version |
domain |
String: This is an identifier that helps determine the appropriate techniques for indico to use behind the scenes to train your model. One of "standard", "topics" |
... |
additional arguments to passed to request |
collection |
the collection object for this model the response format for the given label will match the format of the training examples |
api_key |
your personal indico API key |
cloud |
subdomain for indico private cloud |
List with available collections
1 2 3 4 5 6 7 8 9 10 | collection <- Collection(name='example')
test_data <- list(list("I love my friends!", "extrovert"),
list("I love to be alone", "introvert"),
list("I have mixed feelings on people", "ambivert"))
addData(collection, test_data)
train(collection)
wait(collection)
res <- predict(collection, "I love my friends!")
cat(sprintf("The likelihood the author was an extrovert is \%0.4f.",
res[["extrovert"]]))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.