Create a Custom Text Classification Solution
Introduction
You may process natural
language for your own application by using the Azure AI Language service.
One of the most prevalent
AI issues is Natural Language Processing (NLP), which requires software to
perceive voice or text in the same way that people do. Text classification is a
component of Natural Language Processing (NLP), and Azure offers methods for
text classification that include sentiment, language, and user-defined custom
categories.
Understand Types of Classification
Projects
Text files are given
labels by custom text classification, which in the Azure AI Language service is
a class that the developer defines. A video game synopsis, for instance, could
be categorized as "Adventure," "Strategy," "Action,"
or "Sports."
Custom text
classification falls into two types of projects:
- Single Label Classification
-
you can assign only one class to each file. Following the above example, a
video game summary could only be classified as "Adventure" or
"Strategy".
- Multiple Label Classification
-
you can assign multiple classes to each file. This type of project would allow
you to classify a video game summary as "Adventure" or
"Adventure and Strategy".
When creating your custom
text classification project, you can specify which project you want to build.
Single vs. Multiple Label
Projects
The main distinctions
between multiple label classification projects are labeling, model improvement
considerations, and the API payload for classification activities, in addition
to the capacity to classify files into many categories.
Labeling Data
In single label projects,
each file is assigned one class during the labeling process; class assignment
in Azure AI Language only allows you to select one class.
You can designate as many
classes as you like for each file when labeling several label projects. Your
data must maintain clarity and offer a good distribution of potential inputs
for your model to learn from due to the impact of the additional complexity.
You can designate as many
classes as you like for each file when labeling several label projects. Your
data must maintain clarity and offer a good distribution of potential inputs
for your model to learn from due to the impact of the additional complexity.
Labeling data correctly,
especially for multiple label projects, is directly correlated with how well
your model performs. The higher the quality, clarity, and variation of your
data set is, the more accurate your model will be.
Evaluating and Improving Your
Model
The number of accurate
predictions is only one aspect of evaluating your model's predictive ability.
When the model predicts a label x and the actual label is x, the classification
is correct. In the actual world, incorrect classifications lead to various
types of inaccuracies in documents:
- False positive - model predicts x, but the file isn't labeled x.
- False negative - model doesn't predict label x, but the file in fact is labeled x.
With a single label
project, you can identify which classes aren't classified as well as others and
find more quality data to use in training your model. For multiple label
projects, figuring out quality data becomes more complex due to the matrix of
possible permutations of combined labels.
API Payload
Azure AI Language
provides a REST API to build and interact with your model, using a JSON body to
specify the request. This API is abstracted into multiple language-specific
SDKs.
Conclusion
We have successfully
learnt about types of classification projects.
Comments
Post a Comment