Metrics and aggregation

To understand numerical and categorical features of your data

There are different data types in a dataset. Metrics and aggregations specifically work with numeric and categorical data respectively. Numerical values are composed of digits such as the number of stars for hotels, ratings, scores and response time in days. Categorical values are in text format but limited values that repeat within a dataset such as days of week, product categories, and names of states.

You can study your data under the combination of both parameters. For instance, "What is the average response time in June?" or "Which states reported the maximum ratings?"

The image below shows a small portion of our sample dataset. The dataset is composed of 1000 entries describing some computing resources, we are interested in understanding what is the overall star rating for different languages.


Relevance AI - Sample dataset view with both numerical and categorical data

In this page we are learning about the thirds section of the Explorer app.


Relevance AI - Access to metrics and aggregations on Explorer

Set up metrics

To set up metrics, click on the "Metrics" button on the right. This will open a window similar to what you see on the left-hand side of the below image. In this window, you can set up the main parameters for time-series (only necessary for the time-series view). Click on 1. "Add metric" and you will be directed to the metric config view (right-hand-side image).

  1. Click on Add
  2. type in a name
  3. select your desired numerical field from the drop-down menu under "Field to aggregate"
  4. select your desired analysis type (such as average (ave), minimum (min), maximum (max)) from the drop-down menu under "Type of aggregation"
  5. Optional settings: unit, number of decimal places, marking lower is better
  6. Apply changes

Keep in mind that the date field and the intervals on the time series must be specified as explained in the image below but it is only required when you plan to generate the time-series view of your data.


Relevance AI - Set up metrics on Explorer

Set up aggregations

Click on "Group by" on the right side of the Explorer page, and from the drop-down menu, select the field whose values are to be used for creating aggregation and apply changes.
Note: to be able to see the cluster view of the data, or to group your data based on clusters, you need to select "Explore clusters" as noted in the image below. When clusters are selected, you can see "based on your cluster field" on top of the drop-down menu.


Relevance AI - Set up Aggregations on Explorer

Set up the visualization

You can choose the visualization type by using the four options available via the drop-down menu on the left-hand side of the "Metrics" button. Samples of the visualizations (Lines, Bar, Column and Timeseries) are provided below.


Relevance AI - Four visualization types

Metrics an aggregation side by side

Immediately after defining metrics and aggregations, you can see the results. In the image below we are looking at the 1- Column view of the dataset, based on the frequency and star rating of different existing languages in the dataset.
We can clearly identify the most frequent language as well as the most favourite one.


Relevance AI - Analysis of the configured metrics and aggregation

Learn about data and cluster explorer in the next page.