Skip to main content

Vectograph

Vectograph is an open-source software library for applying knowledge graph embedding approaches on tabular data. To this end, Vectograph enables users to converts tabular data into RDF knowledge graph and apply KGE approaches.

Installation

Installation from source

1) git clone https://github.com/dice-group/Vectograph.git
2) conda create -n temp python=3.6.2 # Or be sure that your have Python => 3.6.
3) conda activate temp
4) python ontolearn/setup.py install
# After you receive this Finished processing dependencies for OntoPy==0.0.1
5) python -c "import vectograph"

Installation via pip

pip install vectograph

Usage

import pandas as pd
from sklearn.pipeline import Pipeline
from vectograph.transformers import ApplyKGE, KGCreator

path_of_folder = '/.../data_files/'
tabular_csv_data_name = 'example'  
df = pd.read_csv(path_of_folder + tabular_csv_data_name + '.csv', index_col=0, low_memory=False)
####################################
#### Data Preprocessing ####
####################################
kg_path = path_of_folder + tabular_csv_data_name
pipe = Pipeline([('createkg', KGCreator(path=kg_path)),
                 ('embeddings', ApplyKGE(params={'kge': 'Conve',  # Distmult,Complex,Tucker,Hyper, Conve
                                                 'embedding_dim': 10,
                                                 'batch_size': 256,
                                                 'num_epochs': 10}))])

model = pipe.fit_transform(X=df.select_dtypes(include='category'))
print(model)

Metadata

Release files for vectograph 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vectograph 0.0.2
File Size Uploaded
vectograph-0.0.2.tar.gz 21.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vectograph 0.0.2
File Interpreter ABI Platform
vectograph-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 42.2 kB

Release files / vectograph-0.0.2.tar.gz

Download URL vectograph-0.0.2.tar.gz
Size 21.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a3aad22c1800219a0ce25e82fd44e9aac3a89586f65f6da2f58a5ddc60620eee
BLAKE2b-256 checksum
How to use checksums
95f02d508dea86a01201124942f11777c93c1316f41c114767b1105a3d2ceb88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.0.post20200616 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.10

Release files / vectograph-0.0.2-py3-none-any.whl

Download URL vectograph-0.0.2-py3-none-any.whl
Size 20.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2d608616a24940285a4a08e1e0158fab0d1a10db8596462eecf6c8b409024d9
BLAKE2b-256 checksum
How to use checksums
c5175dbc2e6f5b1acda0df1d6faed70b3fb384c3a936513b70f26a4f88f955d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.0.post20200616 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.10

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page