Added synthetic network generation functions #85

Merged
meliurwen merged 12 commits from 84-feature-synthetic-network-generator into dev 2 years ago
meliurwen commented 2 years ago (Migrated from github.com)
Owner

Description

See the issue related, what is done in the commits and in the changelog below.

Merge into Dev Checklist

  • Tests for the new code
  • Acceptance Testing

Changelog

  • Added structure generator
  • Added parameters (CIM) generator
  • Added tests for structure generator
  • Added tests for parameters (CIM) generator
  • Added tests for structure learning algorithms using strucure and parameters generators
  • Added tests for learning of parameters using strucure and parameters generators
  • Added doctests for structure and parameters generators

(Optional) Extra info

None

<!-- # Pull/Merge Request into dev --> ## Description See the issue related, what is done in the commits and in the changelog below. ## Issues related * #84 ## Merge into Dev Checklist * [x] Tests for the new code * [x] Acceptance Testing ## Changelog * Added structure generator * Added parameters (CIM) generator * Added tests for structure generator * Added tests for parameters (CIM) generator * Added tests for structure learning algorithms using strucure and parameters generators * Added tests for learning of parameters using strucure and parameters generators * Added doctests for structure and parameters generators ## (Optional) Extra info None
AlessandroBregoli (Migrated from github.com) reviewed 2 years ago
meliurwen commented 2 years ago (Migrated from github.com)
Owner

The tolerance limit seems too tight is some cases, i propose to change this line
a077f738ee/reCTBN/src/params.rs (L276)

to

- .any(|x| f64::abs(x.clone()) > f64::EPSILON * domain_size)
+ .any(|x| f64::abs(x.clone()) > f64::EPSILON * 10.0 * domain_size)

A case that triggers this issue is to set nodes_domain_cardinality = 4; here:
f4e3c98c79/reCTBN/tests/tools.rs (L152-L153)

Running tests on different combinations of values of nodes_cardinality and nodes_domain_cardinality raised panics due to precision.

The tolerance limit seems too tight is some cases, i propose to change this line https://github.com/AlessandroBregoli/reCTBN/blob/a077f738eeafc606dd1f791503b0d0c629e97aaa/reCTBN/src/params.rs#L276 to ```diff - .any(|x| f64::abs(x.clone()) > f64::EPSILON * domain_size) + .any(|x| f64::abs(x.clone()) > f64::EPSILON * 10.0 * domain_size) ``` A case that triggers this issue is to set `nodes_domain_cardinality = 4;` here: https://github.com/AlessandroBregoli/reCTBN/blob/f4e3c98c796aea5863f15a9969ca5500eb340f5d/reCTBN/tests/tools.rs#L152-L153 Running tests on different combinations of values of `nodes_cardinality` and `nodes_domain_cardinality` raised panics due to precision.
The pull request has been merged as b7fc23ed8a.
Sign in to join this conversation.
Loading…
There is no content yet.