GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - IDSIA/crema: Crema: Credal Models Algorithms

BranchesTags
Open more actions menu

Latest commit

 

History

607 Commits
607 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
datasets
datasets
 
 
docs
docs
 
 
examples
examples
 
 
models
models
 
 
papers
papers
 
 
src
src
 
 
.clear-target-files
.clear-target-files
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CITATION.bib
CITATION.bib
 
 
CITATION.cff
CITATION.cff
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.properties
build.properties
 
 
pom.xml
pom.xml
 
 

Repository files navigation

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.

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:

    <repositories>
        <repository>
            <id>cremaRepo</id>
            <url>https://raw.github.com/idsia/crema/mvn-repo/</url>
        </repository>
    </repositories>

    <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):

@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}
}

About

Crema: Credal Models Algorithms

crema-toolbox.readthedocs.io/

Topics

bayesianbayesian-modelscredalcredal-modelscremaimprecise-probabilityinferenceprobabilistic-graphical-modelsprobability

Resources

Readme
LGPL-3.0 license
Activity
Custom properties

Stars

12 stars

Watchers

2 watching

Forks

4 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.