cofilter

Description

Use this command to determine how many times a value in <field1> and a value in <field2> occur together. For example, if you have a field that contains user IDs and another field that contains items names, this command finds how common each pair of user and item occur.

This command implements one step in a collaborative filtering analysis for making recommendations.

Syntax

cofilter <field1> <field2>

Required arguments

field1

Syntax: <field>

Description: The name of field.

field2

Syntax: <field>

Description: The name of a field.

Usage

The cofilter command is a transforming command. See Command types.

Examples

Example 1

Find the cofilter for user and item. The user field must be specified first and followed by the item field. The output is an event for each pair of items with: the first item and its popularity, the second item and its popularity, and the popularity of that pair of items.

Let's start with a simple search to create a few results:

The results appear on the Statistics tab and look something like this:

The eval command with the modulus ( % ) operator is used to create the item field:

The results look like this:

Add the cofilter command to the search to determine how many user values occurred with each item value,

The results look something like this: