πŸ”€Classification

Description of classification for Iris. What is classification and how can it be used ?

When to use classification ?

Classification is meant to associate an input or a list of inputs among values that represent classes. Each input will be associated with a class that is the more representative.

Example of use case

If you have a list of materials written in natural language coming from a bill of quantities, and you want to associate each one to a given database of materials, you can use the classification.

Limitations: you annot use classification with too many classes (say more than 70, it is not a hard constraint) or you may decrease the accuracy of the model.

Advantage: it requires no training data, and can be used directly from a list of classes (a description of each one would help! )

API

Classify a list of string

import requests
import json

token = 'JWT ' + ''  # set your token here
url = "https://iris.egis-group.com/api/cgpt_structure/task_execute/?label_task=classify_string"

payload = json.dumps({
  "string_list": [
    "Ce restaurant est mauvais",
    "Ce restaurant est moyen",
    "Ce restaurant est excellent"
  ],
  "values_list": [
    {
      "label": "neg",
      "val": "nΓ©gatif"
    },
    {
      "label": "pos",
      "val": "positif"
    },
    {
      "label": "neut",
      "val": "neutre"
    }
  ]
})
headers = {
  'Authorization': token,
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

Last updated