NikitaSikalov / DataViz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Algorithms of data visualization

Content

  1. Tree visualization
  2. DAG visualization
  3. Labels placement problem
  4. t-SNE

Tree visualization

You can find out code and examples in colab notebook.

Open In Colab

We use Layered-Tree-Draw algorithm to visualize our trees. You can see its pseudocode on the sreenshot below.

Algorithm

Algorighm

This screenshot was taken from this doc where you can find some more interesting algorithms of tree visualization.

In our implementation we use matplotlib for visualization and also networkx lib for loading and parsing graphs in GraphML format.

DAG visualization

You can find out code and examples in colab notebook.

Open In Colab

There are two algorithms implemented for DAG visualization:

  • Coffman-Graham algorithm for DAG visualization with max_width
  • Algorithm for minimizing dummy vertecies

Also algorithm for minimizing crossings count executes after layout algorithm for minimizing dummy vertecies.

Labels placement problem

You can find out code and examples in colab notebook.

Open In Colab

Algorithm and lables placement logic

We get all possible variants of label placements for each point and corresponding bound rectagles. After that we consider each rectangle and corresponding clauses on positions surrounding rectangles. These clauses in fact are implications. For example, rectangle with id = 1 can not be placed with rectangle with id = 2, so it means implication: x_1 -> not(x_2). In this way we compute all clauses and convert them to SAT problem (x_1 -> x_2 => not(x_1) or x_2). We try to solve this problem with SAT-solver. If solution exists, we get filtered list of rectangles which we can draw.

Materials and links

t-SNE

You can find out code and examples in colab notebook.

Open In Colab

Materials and links

About


Languages

Language:Jupyter Notebook 100.0%