Input and Output¶
PyKEEN¶
Entry points for PyKEEN.
PyKEEN is a machine learning library for knowledge graph embeddings that supports node clustering,
link prediction, entity disambiguation, question/answering, and other tasks with knowledge graphs.
It provides an interface for registering plugins using Python’s entrypoints under the
pykeen.triples.extension_importer
and pykeen.triples.prefix_importer
groups. More specific
information about how the Bio2BEL plugin is loaded into PyKEEN can be found in Bio2BEL’s
setup.cfg under the [options.entry_points]
header.
The following example shows how you can parse/load the triples from a Bio2BEL
repository using the bio2bel
prefix:
# Example 1A: Make triples factory
from pykeen.triples import TriplesFactory
tf = TriplesFactory(path='bio2bel:mirtarbase')
# Example 1B: Use directly in the pipeline, which automatically invokes training/testing set stratification
from pykeen.pipeline import pipeline
results = pipeline(
dataset='bio2bel:mirtarbase',
model='TransE',
)
Automation¶
Automation of installation and execution of Bio2BEL packages.
-
bio2bel.io.automate.
ensure_tsv
(name, *, manager_kwargs=None)[source]¶ Generate/save a TSV from the Bio2BEL package using
pybel.to_tsv()
and return its path.The resulting file is cached within the bio2bel package’s data directory. If it already exists, the path is directly returned with no other code being run.