Skip to content

Commit 1d98b0a

Browse files
authored
Merge pull request #90 from IDSIA/dev
Release 0.2.1
2 parents 29e4660 + 56327b1 commit 1d98b0a

72 files changed

Lines changed: 2320 additions & 600 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
0.2.1
2+
===========
3+
4+
- New *logics* Bayesian factors, such as `Not`, `And`, `Or`, and `NoisyOr` ( #86 )
5+
- New ApproxLP0 algorithm ( #83 )
6+
- Renamed `approxlp` package to `approxpl1` ( #84 )
7+
- Added new `VertexToRandomBayesian` converter ( #84 )
8+
9+
Extra:
10+
- Replaced CI/CD pipeline with GitHub actions ( #84 )
11+
- Added CITATION.cff and CITATION.bib files
12+
113
0.2.0
214
===========
315

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
[![GitHub version](https://badge.fury.io/gh/idsia%2Fcrema.svg)](https://badge.fury.io/gh/idsia%2Fcrema)
2-
[![Build Status](https://travis-ci.org/IDSIA/crema.svg?branch=master)](https://travis-ci.org/IDSIA/crema)
3-
2+
![example workflow](https://github.com/IDSIA/crema/actions/workflows/maven.yaml/badge.svg?branch=master)
43

54
<img src="docs/static/img/logo.png" alt="Crema" width="500"/>
65

7-
CreMA is a open-source java toolbox that provides multiple
6+
CreMA is an open-source java toolbox that provides multiple
87
learning and inference algorithms for credal models.
98

109
An example of exact inference in a credal network is given below.
@@ -72,7 +71,7 @@ Add the following code in the pom.xml of your project:
7271
<dependency>
7372
<groupId>ch.idsia</groupId>
7473
<artifactId>crema</artifactId>
75-
<version>0.2.0</version>
74+
<version>0.2.1</version>
7675
<scope>compile</scope>
7776
</dependency>
7877
</dependencies>

docs/notes/bayesianinference.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ the model. This will return the posterior of a variable considered the root of t
1515
.. literalinclude:: ../../examples/BeliefPropagation.java
1616
:language: java
1717
:lines: 42-44
18+
:dedent: 2
1819

1920

2021
To perform an inference on a variable, as an example if you want the marginal of ``P(A)``, use the ``query()`` method as
@@ -23,6 +24,7 @@ in the example below:
2324
.. literalinclude:: ../../examples/BeliefPropagation.java
2425
:language: java
2526
:lines: 55-60
27+
:dedent: 2
2628

2729

2830
If you want to use evidence, you need to create first a ``TIntIntHashMap`` that will include the state of the various
@@ -31,6 +33,7 @@ variables, in the belo case we query for ``P(A | B=0)``:
3133
.. literalinclude:: ../../examples/BeliefPropagation.java
3234
:language: java
3335
:lines: 62-69
36+
:dedent: 2
3437

3538

3639
Full example:

docs/notes/contact.rst

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,20 @@
11
Contact and Support
22
======================
33

4-
5-
.. image:: ../_static/img/idsia.png
4+
.. image:: _static/img/idsia.png
65
:scale: 60 %
76
:align: center
8-
:target: http://www.idsia.ch
9-
7+
:target: https://www.idsia.ch/
108

9+
Crema has been developed at the Swiss AI Lab IDSIA (Istituto Dalle Molle di Studi sull'Intelligenza Artificiale),
10+
a not-for-profit research institute for Artificial Intelligence.
1111

12-
Crema has been developed at the Swiss AI Lab IDSIA (Istituto Dalle Molle di Studi sull'Intelligenza Artificiale).
1312
The members of the development and research team are:
1413

15-
1614
- David Huber (david@idsia.ch)
17-
1815
- Rafael Cabañas (rcabanas@idsia.ch)
19-
2016
- Alessandro Antonucci (alessandro@idsia.ch)
21-
2217
- Marco Zaffalon (zaffalon@idsia.ch)
23-
2418
- Claudio Bonesana (claudio@idsia.ch)
2519

26-
2720
If you have any question, please use `Github issues <https://github.com/IDSIA/crema/issues>`_.
28-
29-

docs/notes/guideinference.rst

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,13 @@ run the query. The result is an object of class VertexFactor.
77

88
.. literalinclude:: ../../examples/docs/inferEx1.java
99
:language: java
10-
:lines: 34-39
10+
:lines: 39-42
1111

1212

1313
Approximate inference can be done by means of linear programming. For this, create
1414
the an object of class ``CredalApproxLP`` and then run the query. Note
1515
that the output is an ``IntervalFactor``.
1616

17-
18-
1917
.. literalinclude:: ../../examples/docs/inferEx2.java
2018
:language: java
21-
:lines: 48-54
22-
23-
19+
:lines: 52-58

docs/notes/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Crema can be easily included at any maven project. For this, add the following c
1616
<dependency>
1717
<groupId>ch.idsia</groupId>
1818
<artifactId>crema</artifactId>
19-
<version>0.1.6</version>
19+
<version>0.2.1</version>
2020
<scope>compile</scope>
2121
</dependency>
2222
</dependencies>

docs/notes/markdownguide.md

Lines changed: 0 additions & 67 deletions
This file was deleted.

docs/static/img/idsia.png

-29.4 KB
Loading

docs/tutorials/domains.rst

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Domains
77
.. contents:: Table of Contents
88
:local:
99

10+
1011
Domain interface
1112
=======
1213

@@ -24,6 +25,7 @@ This simple interface declares basic methods to query the domain about variables
2425
.. Note::
2526
Returned arrays should never be modified!
2627

28+
2729
SimpleDomain
2830
============
2931

@@ -33,22 +35,24 @@ This class encapsulates two integer arrays. One with the variable labels and one
3335
.. literalinclude:: ../../src/test/java/ch/idsia/crema/tutorial/DomainsTutorial.java
3436
:start-after: [simple-domain]
3537
:end-before: [simple-domain]
36-
:dedent: 8
38+
:dedent: 2
3739

3840
.. Warning::
3941
When creating a :code:`SimpleDomain` the list of variables must be sorted!
4042
Crema will **not** automatically sort them, but for some operations will assume they are.
4143

44+
4245
DomainBuilder
4346
=============
44-
While creating a :code:`SimpleDomain` by passing the arrays of variables and their sizes is possible and valid,
47+
48+
While creating a :code:`SimpleDomain` by passing the arrays of variables and their sizes is possible and valid,
4549
a slightly more friendly method is available using the :code:`DomainBuilder`.
4650
Laveraging the ellipses of Java the :code:`DomainBuilder` class avoids the explicit creation of the arrays as shown in the following example.
4751

4852
.. literalinclude:: ../../src/test/java/ch/idsia/crema/tutorial/DomainsTutorial.java
4953
:start-after: [domain-builder-1]
5054
:end-before: [domain-builder-1]
51-
:dedent: 8
55+
:dedent: 2
5256

5357

5458
Strides
@@ -71,27 +75,26 @@ We we first look at how :code:`Strides` instances can be created conveniently.
7175
.. Note::
7276
The variable's cardinalities are accumlated starting from the variable at index 0.
7377

74-
7578
.. literalinclude:: ../../src/test/java/ch/idsia/crema/tutorial/DomainsTutorial.java
7679
:start-after: [strides]
7780
:end-before: [strides]
78-
:dedent: 8
81+
:dedent: 2
7982

8083
Again, just as with the :code:`SimpleDomain`, creating the object specifying the arrays is valid, but not the most readable solution.
8184
The following example shows an alternative way of creation where variables are added along with their cardinality.
8285

8386
.. literalinclude:: ../../src/test/java/ch/idsia/crema/tutorial/DomainsTutorial.java
8487
:start-after: [domain-builder-strides]
8588
:end-before: [domain-builder-strides]
86-
:dedent: 8
89+
:dedent: 2
8790

8891

8992
Alternative ways to create strides are based on operations on them. Generally Domains are considered unmutable objects and any alteration will result in a new instance.
9093

9194
.. literalinclude:: ../../src/test/java/ch/idsia/crema/tutorial/DomainsTutorial.java
9295
:start-after: [strides-remove]
9396
:end-before: [strides-remove]
94-
:dedent: 8
97+
:dedent: 2
9598

9699
A number of common set operations are available:
97100

@@ -100,8 +103,6 @@ A number of common set operations are available:
100103
- remove
101104

102105
.. _Enhanced domain:
106+
103107
Working with Strides
104108
--------------------
105-
106-
107-

docs/tutorials/factors.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
Factors
66
===============
77

8-
Credo supports different ways to represent the probability functions defined over the variables. A structure of different categorization
9-
and abstraction around factors have been implemented. At the top of this all we have the concept of :code:`GenericFactor`.
8+
Crema supports different ways to represent the probability functions defined over the variables. A structure of different categorization
9+
and abstraction around factors have been implemented. At the top of this all we have the concept of :code:`GenericFactor`.

0 commit comments

Comments
 (0)