crema

Crema: Credal Models Algorithms

https://github.com/idsia/crema

Science Score: 31.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
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.9%) to scientific vocabulary

Keywords

bayesian bayesian-models credal credal-models crema imprecise-probability inference probabilistic-graphical-models probability
Last synced: 6 months ago · JSON representation ·

Repository

Crema: Credal Models Algorithms

Basic Info
Statistics
  • Stars: 10
  • Watchers: 3
  • Forks: 4
  • Open Issues: 15
  • Releases: 0
Topics
bayesian bayesian-models credal credal-models crema imprecise-probability inference probabilistic-graphical-models probability
Created almost 6 years ago · Last pushed almost 2 years ago
Metadata Files
Readme Changelog License Citation

README.md

GitHub version example workflow

Crema

CreMA is an open-source java toolbox that provides multiple learning and inference algorithms for credal models.

An example of exact inference in a credal network is given below.

```java import ch.idsia.crema.core.ObservationBuilder; import ch.idsia.crema.core.Strides; import ch.idsia.crema.factor.credal.vertex.separate.VertexFactor; import ch.idsia.crema.factor.credal.vertex.separate.VertexFactorFactory; import ch.idsia.crema.inference.ve.CredalVariableElimination; import ch.idsia.crema.model.graphical.DAGModel; import ch.idsia.crema.model.graphical.GraphicalModel;

public class Starting { public static void main(String[] args) { double p = 0.2; double eps = 0.0001;

    /*  CN defined with vertex Factor  */

    // Define the model (with vertex factors)
    GraphicalModel<VertexFactor> model = new DAGModel<>();
    int A = model.addVariable(3);
    int B = model.addVariable(2);

    model.addParent(B, A);

    // Define a credal set of the partent node
    VertexFactor fu = VertexFactorFactory.factory().domain(model.getDomain(A), Strides.empty())
            .addVertex(new double[]{0., 1 - p, p})
            .addVertex(new double[]{1 - p, 0., p})
            .get();

    model.setFactor(A, fu);

    // Define the credal set of the child
    VertexFactor fx = VertexFactorFactory.factory().domain(model.getDomain(B), model.getDomain(A))
            .addVertex(new double[]{1., 0.,}, 0)
            .addVertex(new double[]{1., 0.,}, 1)
            .addVertex(new double[]{0., 1.,}, 2)
            .get();

    model.setFactor(B, fx);

    // Run exact inference
    CredalVariableElimination inf = new CredalVariableElimination();
    inf.query(model, ObservationBuilder.observe(B, 0), A);
}

} ```

Installation

Add the following code in the pom.xml of your project:

```xml cremaRepo https://raw.github.com/idsia/crema/mvn-repo/

<dependencies>
    <dependency>
        <groupId>ch.idsia</groupId>
        <artifactId>crema</artifactId>
        <version>0.2.1</version>
        <scope>compile</scope>
    </dependency>
</dependencies>

```

Citation

If you write a scientific paper describing research that made use of the CREMA library, please cite the following paper:

Huber, D., Cabañas, R., Antonucci, A., Zaffalon, M. (2020). CREMA: a Java library for credal network inference. In Jaeger, M., Nielsen, T.D. (Eds), Proceedings of the 10th International Conference on Probabilistic Graphical Models (PGM 2020), Proceedings of Machine Learning Research, PMLR, Aalborg, Denmark.

In BiBTeX format (for your convenience):

bibtex @INPROCEEDINGS{huber2020a, title = {{CREMA}: a {J}ava library for credal network inference}, editor = {Jaeger, M. and Nielsen, T.D.}, publisher = {PMLR}, address = {Aalborg, Denmark}, series = {Proceedings of Machine Learning Research}, booktitle = {Proceedings of the 10th International Conference on Probabilistic Graphical Models ({PGM} 2020)}, author = {Huber, D. and Caba\~nas, R. and Antonucci, A. and Zaffalon, M.}, year = {2020}, url = {https://pgm2020.cs.aau.dk} }

Owner

  • Name: IDSIA
  • Login: IDSIA
  • Kind: organization
  • Location: Lugano Switzerland

Istituto Dalle Molle di Studi sull'Intelligenza Artificiale

Citation (CITATION.bib)

@InProceedings{pmlr-v138-huber20a,
  title = 	 {CREMA: A Java Library for Credal Network Inference},
  author =       {Huber, David and Caba\~nas, Rafael and Antonucci, Alessandro and Zaffalon, Marco},
  booktitle = 	 {Proceedings of the 10th International Conference on Probabilistic Graphical Models},
  pages = 	 {613--616},
  year = 	 {2020},
  editor = 	 {Jaeger, Manfred and Nielsen, Thomas Dyhre},
  volume = 	 {138},
  series = 	 {Proceedings of Machine Learning Research},
  month = 	 {23--25 Sep},
  publisher =    {PMLR},
  pdf = 	 {http://proceedings.mlr.press/v138/huber20a/huber20a.pdf},
  url = 	 {https://proceedings.mlr.press/v138/huber20a.html},
  abstract = 	 {We present CREMA (Credal Models Algorithms), a Java library for inference in credal networks. These models are analogous to Bayesian networks, but their local parameters are only constrained to vary in, so-called credal, sets. Inference in credal networks is intended as the computation of the bounds of a query with respect to those local variations. For credal networks the task is harder than in Bayesian networks, being NP^PP-hard in general models. Yet, scalable approximate algorithms have been shown to provide good accuracies on large or dense models, while exact techniques can be designed to process small or sparse models. CREMA embeds these algorithms and also offers an API to build and query credal networks together with a specification format. This makes CREMA, whose features are discussed and described by a simple example, the most advanced tool for credal network modelling and inference developed so far.}
}

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 88
  • Total pull requests: 108
  • Average time to close issues: 24 days
  • Average time to close pull requests: 7 days
  • Total issue authors: 3
  • Total pull request authors: 5
  • Average comments per issue: 0.77
  • Average comments per pull request: 0.25
  • Merged pull requests: 93
  • Bot issues: 0
  • Bot pull requests: 15
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • rcabanasdepaz (33)
  • cbonesana (8)
  • davidhuber (3)
Pull Request Authors
  • cbonesana (42)
  • dependabot[bot] (9)
  • rcabanasdepaz (3)
  • davidhuber (1)
  • GiorgiaAuroraAdorni (1)
Top Labels
Issue Labels
enhancement (22) bug (10) tests (5) documentation (5) design (3) deploy (1) question (1)
Pull Request Labels
dependencies (12) enhancement (10) java (6) deploy (4) bug (2) tests (2) design (1)

Dependencies

pom.xml maven
  • ch.javasoft.polco:polco 4.7.1
  • com.github.quickhull3d:quickhull3d 1.0.0
  • com.google.guava:guava 31.0.1-jre
  • com.joptimizer:joptimizer 5.0.0
  • com.opencsv:opencsv 5.5.2
  • commons-cli:commons-cli 1.5.0
  • net.sf.lpsolve:lp_solve 5.5.2
  • net.sf.trove4j:trove4j 3.0.3
  • org.apache.commons:commons-lang3 3.12.0
  • org.apache.commons:commons-math3 3.6.1
  • org.eclipse.persistence:org.eclipse.persistence.moxy 3.0.2
  • org.jgrapht:jgrapht-core 1.5.1
  • org.junit.jupiter:junit-jupiter 5.8.1 test
  • org.junit.jupiter:junit-jupiter-params 5.8.1 test
docs/requirements.txt pypi
  • graphviz ==0.17
  • nbsphinx ==0.8.7
  • networkx ==2.6.3
  • recommonmark ==0.7.1
  • sphinx ==4.2.0
  • sphinx-rtd-theme ==1.0.0
.github/workflows/deploy.yaml actions
  • actions/checkout v2 composite
  • actions/setup-java v2 composite
.github/workflows/javadoc.yaml actions
  • actions/checkout v2 composite
  • actions/setup-java v2 composite
  • s0/git-publish-subdir-action develop composite
.github/workflows/maven.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/setup-java v2 composite