Skip to content

Commit

Permalink
Merge pull request #64 from bio-ontology-research-group/cate
Browse files Browse the repository at this point in the history
CatE Implementation (#59) and Docs update.
  • Loading branch information
ferzcam authored Oct 16, 2023
2 parents 2bc9cf6 + 0e23cae commit 0d95f06
Show file tree
Hide file tree
Showing 82 changed files with 2,384 additions and 639 deletions.
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Report a bug
description: Describe any wrong or unexpected behavior of mOWL
labels: [ "bug" ]
body:
- type: textarea
id: description
attributes:
label: Describe the bug
description: Please provide a clear and concise description of the unexpected or erroneous behavior in mOWL that you experienced and what you expected to happen instead.
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: How to reproduce
description: Please provide a example of the code that you ran to encounter the bug. This is a crucial aspect in order to find the source of error.
validations:
required: true
- type: textarea
id: environment
attributes:
label: Environment
description: Please, describe the OS, the Python version, mOWL version and JDK version where you ran the code.
validations:
required: true
- type: textarea
id: extras
attributes:
label: Additional information
description: Add any other information about the problem here.
validations:
required: false

45 changes: 45 additions & 0 deletions .github/ISSUE_TEMPLATE/model.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Add a new model
description: Suggest a new model for mOWL
labels: [ "model" ]
body:
- type: dropdown
id: models
attributes:
label: mOWL support different types of models. Select which type fits better for your suggestion.
multiple: false
options:
- Ontology graph projection
- Random walker
- Syntactic model
- Model-theoretic model
- Other
- type: input
id: arxiv
attributes:
label: Publication Link
description: Link to the academic text of record where the model was first proposed (e.g., from _arXiv_)
placeholder: e.g., https://arxiv.org/abs/1902.10499
validations:
required: true
- type: input
id: reference_implementation
attributes:
label: Reference Implementation
description: Link to the publicly available reference implementation, preferrably from the authors of the publication
placeholder: e.g., https://github.com/bio-ontology-research-group/el-embeddings
validations:
required: false
- type: textarea
id: additional_implementations
attributes:
label: Additional Implementations
description: Links to any additional publicly available implementations
validations:
required: false
- type: textarea
id: context
attributes:
label: Additional Information
description: Additional information related to this model.
validations:
required: false
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,6 @@ dist/
.coverage
*.pickle
*.zip
*.log
*.log

docs/source/api/mowl.*
16 changes: 14 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
### Security

## [0.3.0]
### Added
- Implemented `CategoricalProjector` based on [https://arxiv.org/abs/2305.07163](https://arxiv.org/abs/2305.07163). ([#59][i59])

### Removed
- Removed redundant class `based_models.EmbeddingModel`


## [0.2.1]
### Fixed
Fixed issue related to importing graph-based models due to missing `__init__.py` files. ([#60][i60])
Expand Down Expand Up @@ -78,7 +86,9 @@ Fixed issue related to importing graph-based models due to missing `__init__.py`
- Walking methods accept optional `outfile` parameter and corpus extraction methods do not append by default.
- Documentation updated and fixed some typos.

[unreleased]: https://github.com/bio-ontology-research-group/mowl/compare/v0.2.0...HEAD
[unreleased]: https://github.com/bio-ontology-research-group/mowl/compare/v0.3.0...HEAD
[0.3.0]: https://github.com/bio-ontology-research-group/mowl/releases/tag/v0.3.0
[0.2.1]: https://github.com/bio-ontology-research-group/mowl/releases/tag/v0.2.1
[0.2.0]: https://github.com/bio-ontology-research-group/mowl/releases/tag/v0.2.0
[0.1.1]: https://github.com/bio-ontology-research-group/mowl/releases/tag/v0.1.1
[0.1.0]: https://github.com/bio-ontology-research-group/mowl/releases/tag/v0.1.0
Expand All @@ -89,4 +99,6 @@ Fixed issue related to importing graph-based models due to missing `__init__.py`
[i36]: https://github.com/bio-ontology-research-group/mowl/issues/36
[i42]: https://github.com/bio-ontology-research-group/mowl/issues/42
[i43]: https://github.com/bio-ontology-research-group/mowl/issues/43
[i43]: https://github.com/bio-ontology-research-group/mowl/issues/60
[i59]: https://github.com/bio-ontology-research-group/mowl/issues/59
[i60]: https://github.com/bio-ontology-research-group/mowl/issues/60

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ mainly in Python, but we have integrated the functionalities of [OWLAPI](https:/

### System dependencies

- JDK version 17
- JDK version >= 11
- Python version: 3.8, 3.9, 3.10, 3.11
- Conda version >= 4.x.x

Expand Down
16 changes: 8 additions & 8 deletions docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@ dependencies:
- python=3.8
- click
- deprecated
- gensim
- gensim>=4.3.0
- gradle
- JPype1=1.3.0
- matplotlib
- networkx
- numpy
- openjdk
- JPype1=1.4.1
- pandas
- pytorch
- pyyaml
Expand All @@ -21,10 +17,14 @@ dependencies:
- urllib3
- pip
- pip:
- pykeen==1.9.0
- pykeen>=1.10.1
- temp
- deprecated
- nbsphinx
- sphinx-gallery
- sphinx-rtd-theme
- ipython
- memory-profiler
- memory-profiler
- matplotlib
- sphinx-automodapi
- mock
6 changes: 0 additions & 6 deletions docs/source/api/base_models/base.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/source/api/base_models/base_el.rst

This file was deleted.

5 changes: 0 additions & 5 deletions docs/source/api/base_models/base_graph.rst

This file was deleted.

5 changes: 0 additions & 5 deletions docs/source/api/base_models/base_syntactic.rst

This file was deleted.

17 changes: 3 additions & 14 deletions docs/source/api/base_models/index.rst
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
mowl.base_models
=====================

* :doc:`base`
* :doc:`base_graph`
* :doc:`base_syntactic`
* :doc:`base_el`

.. automodapi:: mowl.base_models
:no-heading:
:headings: --

.. toctree::
:maxdepth: 0
:hidden:
:glob:

base
base_graph
base_syntactic
base_el


24 changes: 11 additions & 13 deletions docs/source/api/datasets/index.rst
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
mowl.datasets
=====================

Base dataset
-------------------------
Dataset constructors
----------------------

.. automodule:: mowl.datasets.base
:members:
:show-inheritance:
.. automodapi:: mowl.datasets
:no-heading:
:headings: --

|
|
Built-in datasets
-------------------
.. automodule:: mowl.datasets.builtin
:members:
:show-inheritance:

Dataset for :math:`\mathcal{EL}` language
------------------------------------------
.. automodule:: mowl.datasets.el
:members:
:show-inheritance:
.. automodapi:: mowl.datasets.builtin
:no-heading:
:headings: --

13 changes: 3 additions & 10 deletions docs/source/api/evaluation/index.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
mowl.evaluation
============================

.. automodule:: mowl.evaluation.base
:members:
:show-inheritance:



.. automodule:: mowl.evaluation.rank_based
:members:
:show-inheritance:

.. automodapi:: mowl.evaluation
:no-heading:
:headings: --
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

The DL2Vec graph follows the rules described in the paper `Predicting candidate genes from phenotypes, functions, and anatomical site of expression (2020) <https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/btaa879/5922810>`__. The parsing rules are shown in the table below:
The parsing rules are shown in the table below:


+-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+
Expand All @@ -14,3 +13,17 @@ The DL2Vec graph follows the rules described in the paper `Predicting candidate
| :math:`A \equiv B` | | :math:`\left\langle A, EquivalentTo, B \right\rangle` |
+-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+

Initially, DL2Vec projection rules are intended to parse TBox axioms. However, for some cases, useful information might be present as ABox axioms of the form :math:`C(a)`, :math:`\exists R.C (a)` and :math:`R(a,b)` where :math:`C` is an atomic concept, :math:`R` is a role and :math:`a, b` are individuals. The extended rules are the following:


+---------------------------+-----------------------------------------------------------+
| Condition | Triple |
+===========================+===========================================================+
| :math:`C(a)` | :math:`\left\langle a, http://type, C \right\rangle` |
+---------------------------+-----------------------------------------------------------+
| :math:`\exists R.C (a)` | :math:`\left\langle a, R, C \right\rangle` |
+---------------------------+-----------------------------------------------------------+
| :math:`R(a,b)` | :math:`\left\langle a, R, b \right\rangle` |
+---------------------------+-----------------------------------------------------------+


File renamed without changes.
24 changes: 0 additions & 24 deletions docs/source/api/models/elboxembeddings.rst

This file was deleted.

25 changes: 0 additions & 25 deletions docs/source/api/models/elembeddings.rst

This file was deleted.

19 changes: 0 additions & 19 deletions docs/source/api/models/graphs.rst

This file was deleted.

19 changes: 3 additions & 16 deletions docs/source/api/models/index.rst
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
mowl.models
============

* :doc:`graphs`
* :doc:`syntactic`
* :doc:`elembeddings`
* :doc:`elboxembeddings`


.. toctree::
:maxdepth: 0
:hidden:
:glob:

graphs
syntactic
elembeddings
elboxembeddings

.. automodapi:: mowl.models
:no-heading:
:headings: --
10 changes: 0 additions & 10 deletions docs/source/api/models/syntactic.rst

This file was deleted.

Loading

0 comments on commit 0d95f06

Please sign in to comment.