The implementation of paper "KG4Vis: A Knowledge Graph Based Approach for Visualization Recommendation". For more details related to this project, please visit our project page.
- Before running it, please download the raw data here and extract the .csv file to ./data.
- Extract features:
python feature_extraction.pyunder ./feature_extraction. We also provide the extracted feature to save time. Please download here and extract the .csv file to ./features. - KG construction and test generation:
python KG_construction.pyandpython test_generation.pyunder ./KG_construction. - Embedding learning:
./run.shto run embedding learning under ./embedding_learning. To tune parameters, please modify the shell file according to the possible parameters described in ./embedding_learning/codes/run.py. - Inference and rule generation:
python inference.pyandpython rule_generation.pyunder ./inference. The results of inference is saved under ./inference_results. (The core algorithms of inference.py and rule_generation.py are the same. To faciltate easy usage, we create two files.)
Since it is still an experimental version, please feel free to let us know if there is any issue.
| Name | Version |
|---|---|
| python | 3.7.9 |
| scikit-learn | 0.21.0 |
| numpy | 1.16.3 |
| editdistance | 0.5.3 |
| pandas | 0.24.2 |
| pytorch | 1.7.0 |
We would like to thank Dr. Kevin Hu for granting us the permission of using and open-sourcing the code and dataset in VizML.
Partial implementation is based on:
