predict-Collection-method: This is the prediction endpoint. This will be the primary...

Description Usage Arguments Value Examples

Description

This is the prediction endpoint. This will be the primary interaction point for all predictive analysis.

Usage

1
2
3
## S4 method for signature 'Collection'
predict(collection_object, data, version = NULL,
  domain = NULL, ...)

Arguments

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

Value

List with available collections

Examples

 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"]]))

IndicoDataSolutions/IndicoIo-R documentation built on May 7, 2019, 6:37 a.m.