Skip to content

Commit

Permalink
Merge pull request #225 from probcomp/031024-thomaswc-visdoc
Browse files Browse the repository at this point in the history
Describe new visualization program in the README
  • Loading branch information
ThomasColthurst authored Oct 3, 2024
2 parents f02a443 + af22de3 commit 2dea896
Showing 1 changed file with 23 additions and 1 deletion.
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

0 comments on commit 2dea896

Please sign in to comment.