Mortar has joined Datadog, the leading SaaS-based monitoring service for cloud applications. Read more about what this means here.

Visualize Results

The best way to understand your recommendations is to actually see them. Mortar Explore was developed to both browse and visualize recommendation results as soon as you create them. Visualizations are also a great way to show your results to the rest of your team, whether they have a technical understanding or not.

Installation

Mortar explore is a plugin tool that allows you to visualize your recommendation results. To install:

$ mortar plugins:install https://github.com/mortardata/mortar-explore.git

Mortar explore displays a local file that contains the results of a pig job. To concatenate your files locally, use:

$ cat path/to/part/files/* > output

If the results of your Pig job are stored in an S3 bucket, the results can be downloaded and merged into a single file with a single command. Go to the root directory of your project and run:

$ mortar s3:getmerge S3_PATH LOCAL_TARGET

This will download your results to a local directory and merge them into a single file. To explore the data, go to the root of your project and run:

$ mortar explore LOCAL_TARGET  -r

If you have forked your project recently from the mortar-recsys project, mortar explore will attempt to automatically run in recsys mode and the additional -r flag is not required.

Browse demo


Configuration

Click the 'Details' button to open a page showing your recommendations. On the bottom of the page there is a section where you can set some specific configuration parameters for the data set you are analyzing.

  • "From" Item (Recommended For) - this selects the data column in your output that corresponds to the "from" item (item for which recommendations are being generated). In the standard recommendation system output, this will be column1.
  • "To" Item (Recommendation) - this selects the data column in your output that corresponds to the "to" item for the generated recommendations (the items being recommended). In the standard recommendation system output, this will be column2
  • Rank - this selects the data column in your output that corresponds to the rank (order) of the recommended item. This is displayed in the recommendations. In the standard recommendation system output, this will be column5

The next text box is the base URL that is used to generate an item image. Depending on your specific data domain, you may have links to items in a web page that you have created, or there may be an external website available with images. Mortar explore uses these web applications to capture the item's image and details by crafting a URL from a base url and the item's ID. The crafted URL replaces #{id} with the item ID. For example, your image URLs might look like this:

http://mystore.com/images/#{id}

If your item ID is 1234, then the URL for that item will then be:

http://mystore.com/images/1234

Click 'Apply URL Changes' and your changes will be applied.

Explore demo

When you've got your URLs set, you can browse your recommendations in a whole new way.

Visualizer screenshot