Search code examples
machine-learningpredictgoogle-prediction

Google prediction api, Having the output as a list that have a variable size


I want to train a model that will allow me to generat a LIST of tag related to certain text, my output list will have variable size depending in the context. In the examples that i found, the model return always one output. I am wondering if the Google prediction Api can help me and if there are any examples.


Solution

  • It seems this is what you will get when using a CATEGORICAL rather than a REGRESSION model. From the Google documentation: https://developers.google.com/prediction/docs/developer-guide#examples

    When you submit a query, the API tries to find the category that most closely describes your query. In the Hello World example, the query "mucho bueno" returns the result

    ...Most likely: Spanish, Full results:

    [
      {"label":"French","score":-46.33},
      {"label":"Spanish","score":-16.33},
      {"label":"English","score":-33.08}
    ]