jeli

Joint Embedding-classifier Learning for improved Interpretability (JELI)

https://github.com/recess-eu-project/jeli

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.7%) to scientific vocabulary

Keywords

collaborative-filtering drug-repurposing factorization-machine interpretability
Last synced: 6 months ago · JSON representation ·

Repository

Joint Embedding-classifier Learning for improved Interpretability (JELI)

Basic Info
Statistics
  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 3
Topics
collaborative-filtering drug-repurposing factorization-machine interpretability
Created over 1 year ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation Codemeta Zenodo

README.md

funding logo

Joint Embedding-classifier Learning for improved Interpretability (JELI) Python Package

This repository is a part of the EU-funded RECeSS project (#101102016), and hosts the code for the open-source Python package JELI for the collaborative filtering approach.

Python Version DOI License: MIT Build Status Codecov Codefactor

Statement of need

Interpretability is a topical question in recommender systems, especially in healthcare applications. In drug repurposing, the goal is to identify novel therapeutic indications as drug-disease pairs. An interpretable drug repurposing algorithm quantifies the importance of each input feature for the predicted therapeutic drug-disease association in a non-ambiguous fashion, using post hoc methods. Unfortunately, different importance score-based approaches lead to different results, yielding unreliable interpretations.

We introduce the novel Joint Embedding Learning-classifier for improved Interpretability (JELI). It features a new structured recommender system and trains it jointly on a drug-disease-gene knowledge graph completion task. In particular, JELI simultaneously (a) learns the gene, drug, and disease embeddings; (b) predicts new drug-disease associations based on those embeddings; (c) provides importance scores for each gene. The drug and disease embeddings have a structure that depends on the gene embeddings. Therefore, JELI allows the introduction of graph-based priors on the connections between diseases, drugs, and genes in a generic fashion to recommend and argue for novel therapeutic drug-disease associations. 

Contrary to prior works, the recommender system explicitly includes the importance scores, strengthening the link between the recommendations and the extracted scores while allowing the use of a generic embedding model. The recommendation strategy in JELI can also be readily applied beyond the task of drug repurposing for any sets of items, users, and features.

Install the latest release

Using pip

bash pip install jeli

Docker

```bash

Build Docker image

docker build -t jeli .

Run Docker image built in previous step and drop into SSH

docker run -it --expose 3000 -p 3000:3000 jeli ```

Dependencies

OS: developed and tested on Debian Linux.

The complete list of dependencies for JELI can be found at requirements.txt (pip).

Usage

```python from jeli.JELI import JELI

from stanscofi.utils import loaddataset from stanscofi.trainingtesting import randomsimplesplit import pandas as pd

loads the Gottlieb drug repurposing data set

dataargs = loaddataset("Gottlieb", "./") dataset = Dataset(**data_args)

splits in training and testing sets without leakage

(trainfolds, testfolds), _ = randomsimplesplit(dataset, 0.2, randomstate=1234) train = dataset.subset(trainfolds) test = dataset.subset(test_folds)

classifier = JELI({"cudaon": False, "ndimensions": 10, "random_state": 1234, "epochs": 25})

trains JELI on the training set

classifier.fit(train)

predicts on the testing set

scores = classifier.predictproba(test) classifier.printscores(scores) predictions = classifier.predict(scores, threshold=0.5) classifier.print_classification(predictions)

computes an embedding i (item/drug)

item = pd.DataFrame(dataset.items.toarray()[:,0],index=dataset.itemfeatures,columns=["0"]) i = model.transform(item, isitem=True)

computes an embedding u (user/disease)

user = pd.DataFrame(dataset.users.toarray()[:,0],index=dataset.userfeatures,columns=["0"]) u = model.transform(user, isitem=False)

computes the feature-wise importance scores from embeddings

embs = classifier.model["featureembeddings"] featurescores = embs.sum(axis=1) ```

Licence

This repository is under an OSI-approved MIT license.

Citation

If you use JELI in academic research, please cite it as follows

``` @article{reda2025joint, title={Joint embedding--classifier learning for interpretable collaborative filtering}, author={R{\'e}da, Cl{\'e}mence and Vie, Jill-J{^e}nn and Wolkenhauer, Olaf}, journal={BMC bioinformatics}, volume={26}, number={1}, pages={26}, year={2025}, publisher={Springer} }

```

Community guidelines with respect to contributions, issue reporting, and support

Pull requests and issue flagging are welcome, and can be made through the GitHub interface. Support can be provided by reaching out to recess-project[at]proton.me. However, please note that contributors and users must abide by the Code of Conduct.

Owner

  • Name: RECeSS EU project
  • Login: RECeSS-EU-Project
  • Kind: user
  • Location: Rostock, Germany
  • Company: Universität Rostock

The RECeSS (Robust Explainable Controllable Standard for drug Screening) project is funded by a Marie Skłodowska-Curie Postdoctoral Fellowship 2022.

Citation (CITATION.cff)

cff-version: "1.0.1"
authors:
- family-names: Réda
  given-names: Clémence
  orcid: "https://orcid.org/0000-0003-3238-0258"
- family-names: Vie
  given-names: Jill-Jênn
  orcid: "https://orcid.org/0000-0002-9304-2220"
- family-names: Wolkenhauer
  given-names: Olaf
  orcid: "https://orcid.org/0000-0001-6105-2937"
message: If you use this software, please cite this repository and the RECeSS project.
title: "Joint Embedding-classifier Learning for improved Interpretability (JELI) "
version: 1.0.1
date-released: 2024-06-22
doi: 10.5281/zenodo.12193722
url: "https://github.com/RECeSS-EU-Project/JELI"

CodeMeta (codemeta.json)

{
  "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
  "type": "SoftwareSourceCode",
  "applicationCategory": "recommender system",
  "author": [
    {
      "id": "https://orcid.org/0000-0003-3238-0258",
      "type": "Person",
      "affiliation": {
        "type": "Organization",
        "name": "Systems Biology and Informatics, University of Rostock, Rostock, Germany"
      },
      "email": "clemence.reda@uni-rostock.de",
      "familyName": "Rda",
      "givenName": "Clmence"
    }
  ],
  "codeRepository": "git+https://github.com/RECeSS-EU-Project/JELI",
  "dateCreated": "2024-06-22",
  "dateModified": "2024-06-22",
  "datePublished": "2024-06-22",
  "description": "Joint Embedding-classifier Learning for improved Interpretability (JELI) ",
  "downloadUrl": "https://pypi.org/project/jeli/#files",
  "funder": {
    "type": "Organization",
    "name": "Horizon 2022 programme"
  },
  "keywords": [
    "collaborative filtering",
    "drug repurposing",
    "factorization machine",
    "recommender system"
  ],
  "license": "https://spdx.org/licenses/MIT",
  "name": "JELI",
  "programmingLanguage": "Python 3",
  "softwareRequirements": [
    "numpy",
    "pykeen>=1.10.1",
    "stanscofi>=2.0.1",
    "scikit-learn>=1.2.2",
    "scipy>=1.9.3",
    "torch_geometric>=2.4.0",
    "igraph>=0.11.4",
    "torch>=2.1.2",
    "tqdm>=4.66.2",
    "qnorm>=0.8.1",
    "typing_extensions>=4.2.0"
  ],
  "version": "1.0.1",
  "funding": "RECeSS - Robust Explainable Controllable Standard for drug Screening (101102016)",
  "issueTracker": "https://github.com/RECeSS-EU-Project/JELI/issues"
}

GitHub Events

Total
  • Release event: 1
  • Watch event: 2
  • Push event: 2
  • Create event: 1
Last Year
  • Release event: 1
  • Watch event: 2
  • Push event: 2
  • Create event: 1

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 22 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
  • Total maintainers: 1
pypi.org: jeli

Package for Joint Embedding-classifier Learning for Interpretability. Learns feature/item/user embeddings with specific structures, recommends new item-user associations and provides feature importance scores.

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 22 Last month
Rankings
Dependent packages count: 10.8%
Average: 35.7%
Dependent repos count: 60.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/pip-release.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v1 composite
.github/workflows/post-push-test.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • codecov/codecov-action v3 composite
Dockerfile docker
  • python 3.8.18-bullseye build
pip/requirements.txt pypi
  • igraph >=0.11.4
  • numpy *
  • pykeen >=1.10.1
  • qnorm >=0.8.1
  • scikit-learn >=1.2.2
  • scipy >=1.9.3
  • stanscofi >=2.0.1
  • torch >=2.1.2
  • torch_geometric >=2.4.0
  • tqdm >=4.66.2
  • typing_extensions >=4.2.0
pyproject.toml pypi
setup.py pypi
  • igraph >=0.11.4
  • numpy *
  • pykeen >=1.10.1
  • qnorm >=0.8.1
  • scikit-learn >=1.2.2
  • scipy >=1.9.3
  • stanscofi >=2.0.1
  • statsmodels >=0.14.1
  • torch >=2.1.2
  • torch_geometric >=2.4.0
  • tqdm >=4.66.2
  • typing_extensions >=4.2.0