Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Describe new visualization program in the README #225

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ it is heavily based) reads in tabular data and a schema describing the entities
that generated it, and converts the data and schema into their HIRM equivalents.


## Installation (C++)
## Installation

First obtain a GNU C++ compiler, version 7.5.0 or higher.
The underlying code can be built and installed via bazel. To install bazel:
Expand Down Expand Up @@ -198,6 +198,28 @@ Please see the file `cxx/integration_tests.sh` for more examples of using
the hirm binary, and run `./bazel-bin/hirm --help` for more information
about its options.

# Visualizing HIRM's output

The clusters created by HIRM can be visualized using the `make_plots.py`
program in the `/py` subdirectory.

To use this program, you will first need to install numpy and matplotlib.
On Debian systems, this can be done by running `./py/install.sh`.

Then simply run `make_plots.py` and pass it the locations of your observations,
schema, and HIRM clusters:

$ cd py
$ ./make_plots.py --schema=../cxx/assets/animals.unary.schema --observations=../cxx/assets/animals.unary.obs --clusters=../cxx/assets/animals.unary.hirm --output=/tmp/vis.html

The visualization is written to the HTML file `/tmp/vis.html`, which can be
viewed by pointing your web browser to `file:///tmp/vis.html`.

Currently, `make_plots` only produces visualizations for unary and binary
relations, and only for numeric-valued relations (including boolean
valued relations like `bernoulli` and categorical relations like
`categorical`).

## Usage: PClean

Here is an example usage of the pclean binary:
Expand Down