a

Lorem ipsum dolor sit amet, consectetur adicing elit ut ullamcorper. leo, eget euismod orci. Cum sociis natoque penati bus et magnis dis.Proin gravida nibh vel velit auctor aliquet. Leo, eget euismod orci. Cum sociis natoque penati bus et magnis dis.Proin gravida nibh vel velit auctor aliquet.

  /  Project   /  Blog: Get Explanations for the Classification Results with Watson Categories

Blog: Get Explanations for the Classification Results with Watson Categories


AI and machine learning systems are considered as black box especially when they are being consumed with an API. People usually wonder, how system predicted certain output and what contributed for the predictions. This often results in users losing trust in these systems. IBM Watson Natural Language Understanding now makes it easier to understand the results for categorization feature, by giving explanations for each predicted label. This explanation is provided in the form of text snippets from input text itself that contributed towards the results.

Categories is a hierarchical classification system that predicts labels up to 5 levels of hierarchy. Now, with a simple toggle `explanation: true`, users will be able to get explanations for the predictions. This feature can also be used with our newly released customization of categories. For those who are using this customization option and looking to improve their model, this explanation can come in handy, as it can point towards the text snippets that are making the system predict incorrect labels.

How can I use it?

This new feature can be turned on with a simple explanation toggle, example request body:

{
"url": " https://en.wikipedia.org/wiki/IBM",
"features": {
"categories":{
"explanation": true
}
}
}

This will enable the explanation engine and will return output in following format:

{
"retrieved_url": "https://en.wikipedia.org/wiki/IBM",
"language": "en",
"categories": [
{
"score": 0.950583,
"label": "/technology and computing/hardware/computer",
"explanation": {
"relevant_text": [ {
"text": "personal computer"
},
{
"text": "ibm pc"
},
{
"text": "computing"
},
{
"text": "floppy disk"
},
{
"text": "computer hardware"
},
{
"text": "computer system"
}
]}
}]
}

In the above output, “relevant text” gives key phrases from the input text that contributes towards the prediction of the label. For example, phrases like “personal computer”, “ibm pc”, “computing” and “floppy disk” played a key role in predicting “/technology and computing/hardware/computer” as the category label for the input text .

Try it out yourself!

Thanks for reading! Checkout these resources to get started.

Watson Natural Language Understanding | IBM Watson API Reference

Source: Artificial Intelligence on Medium

(Visited 2 times, 1 visits today)
Post a Comment

Newsletter