Hierarchical Classification
Brief
An outdoor retail customer has a large repository of publicly available data about competitor’s products and pricing. The customer wants to be able to compare listings and pricing of their own products with similar products offered by their competitors.This was not possible due to the large volume of products, and the lack of shared ontology regarding product classification.
As an example, the customer wanted to be able to compare the prices of their sleeping bags with the prices of all their competitors. However, there was inconsistent metadata available on the competitor products; they only had access to a text description field, product name, and price. The data from their competitors occasionally had some class ontology, but it was inconsistent and often not compatible with their preferred ontology.
The customer was able to use the TrueState platform to apply a Hierarchical Zero Shot Classification to their data to classify each record into an appropriate class. This allowed them to produce a dataset that was ‘like for like’ with their own, and perform analysis of competitor pricing within the TrueState platform. They were able to use this analysis to perform price discovery and obtain a better understanding of the retail landscape and improve their own product pricing.
What is hierarchical zero shot classification?
Zero-shot classification refers to the ability of a model to classify or make predictions on tasks it has never been explicitly trained on, using only a general understanding of language. This is achieved by leveraging transfer learning, where a model is pre-trained on large, diverse datasets (such as those used for language modeling or text generation) and is then fine-tuned or adapted for various downstream tasks. During pre-training, the model learns general linguistic patterns, semantics, and structures, which it can then apply to new tasks without requiring task-specific labeled data. In zero-shot classification, the model understands the task by interpreting input descriptions of categories, enabling it to generalize across tasks in a flexible, human-like way.
Tutorial
-
Navigate to the ‘Zero-shot categorisations’ page and click ‘Create a new categorisation’
-
Set the name of the categorisation, and fill out the questions. Below is an example of an outdoor retail product categorisation set. Click save to save this categorisation.
-
Go to the Workflows - My Workflows page and create a new workflow
-
Set the project name and description
-
Select the ‘+’ icon in the middle of the screen and create a new Dataset node
-
Under ‘Selection Mode’ select Upload a new Dataset and name and upload the dataset
-
Once the dataset has uploaded, click the ‘+’ again and click ‘Use a model’
-
Set this model action type to be ‘Zero-shot classifier’. Select the categorisation we want to use, and set the column name to be the field we will be categorising.
-
Click the ‘+’ arrow to create another dataset node. Leave the selection mode to ‘Automatically create dataset on run’ and call it ‘output dataset’
-
Drag the node edges to join them so that the company data feeds into the zero-shot classifier, which then feeds into the output dataset
-
Click ‘save’ in the top menu, then return to the Workflows page with the ‘exit button’
-
Click ‘Actions’ then ‘Run’ next to the workflow name. You can click ‘Actions - Log’ to check the status of the run
-
When the Run has completed, navigate to ‘Apps - Dashboards’ and click ‘Create New’
-
Name the dashboard and select ‘output dataset’ and submit
-
On the Dashboard, click ‘Add Element’ to add a table and select
category_1
andcategory_2
to display the categorisations.