Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
AugustoPedron
@AugustoPedron

Hi Augusto, even with the simple project with HashTable only, I have very strange errors that I do not understand.

yeah the example with just hashTable runs fine, the problem is if i include <agrum/BN/BayesNet.h>

Pierre-Henri Wuillemin
@phwuill_gitlab

OK, i found it ! :-)

We forgot to add some special flags for visualC++ when installing aGrUM on windows. For now, if you add this lines on your CMakeLists.txt

if (MSVC)
    set (CMAKE_CXX_FLAGS "/DNOMINMAX /bigobj /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /MP ${CMAKE_CXX_FLAGS}")
    set (CMAKE_C_FLAGS "/DNOMINMAX /bigobj /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /MP ${CMAKE_C_FLAGS}")
endif()

Then generate the sln file with

cmake ..  -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 16 2019" -A x64

it should be OK (at least, It works for me :-) ).

image.png

This is fixed and will be in the next release (soon, hopefully) !

image.png

AugustoPedron
@AugustoPedron
It worked perfectly! Thank you
AugustoPedron
@AugustoPedron
I also found out that the documentation describing how to use probabilistic inference is not on par with the latest version of agrum (probably you forgot to update it). it says to use the copy constructor of ShaferShenoyInference that is deleted, while it should be used as "gum::ShaferShenoyInference<double>(&bn)"
AugustoPedron
@AugustoPedron
sorry i wrote it wrong, it should be "gum::ShaferShenoyInference<double> inference (&bn)"
Pierre-Henri Wuillemin
@phwuill_gitlab
Hi @AugustoPedron, you are right. Actually, I think that those copy constructors should be re-activated ... But for now, I will change the snippet. Thanks !
nojhan
@nojhan:matrix.org
[m]
Hi. There's a pyAgrum.lib.ipython module, but it's not documented in the RTD. I'm trying to do something like gip.showBN(bn);plt.show() but it does not dispaly anything, what am I missing?
nojhan
@nojhan:matrix.org
[m]
I don't see any pyAgrum.lib.image module either… what is the recommended way of plotting outside of a notebook?
Pierre-Henri Wuillemin
@phwuill_gitlab
Hi, to use pyAgrum.lib.image, you need to update pyAgrum (0.22.2). And it is somewhat documented here : https://pyagrum.readthedocs.io/en/0.22.2/lib.image.html
nojhan
@nojhan:matrix.org
[m]
@phwuill_gitlab: Thanks, did not noticed that detail. (is it normal that I do not see the pyAgrum.lib.notebook module in 0.22.2?)
Pierre-Henri Wuillemin
@phwuill_gitlab
hi @nojhan:matrix.org , no, it is not normal at all :
image.png
nojhan
@nojhan:matrix.org
[m]
I got puzzled by the import scheme, I guess. Here you can see that one don't see the lib sub-module from the main import, but it still can be imported directly.
Pierre-Henri Wuillemin
@phwuill_gitlab

hum weird. puzzled here too :-)

pyAgrum.lib is a regular package with its own (empty) __init__.py file ...

nojhan
@nojhan:matrix.org
[m]
I'm using 0.22.2, installed with ./act install release pyAgrum
Pierre-Henri Wuillemin
@phwuill_gitlab
I do not think it has to do with the version but with the organization of pyAgrum (?)
image.png
nojhan
@nojhan:matrix.org
[m]
I never saw this kind of behaviour…
with Python in general, I mean.
Pierre-Henri Wuillemin
@phwuill_gitlab
I guess something is not pythonic enough in our codes ... I will check a bit. If you have any clue ... :-)
nojhan
@nojhan:matrix.org
[m]
I'm struggling to find the interface of Potential that would allow to set the scalar probabilities one by one by simply providing the source node of the arc, a state and the related probability, is there a simple way to do that? Something like bn.cpt(node)[{source:0}] = [p1,p2] (which does not work because it seems to expect the full set of source arcs)
Pierre-Henri Wuillemin
@phwuill_gitlab
I do not understand. If you have a function f(X,Y,Z), how to populate this function using f[{X:0}]=[0.1, 0.9] ? There is a clash in the dimension (shape) in this affectation.
nojhan
@nojhan:matrix.org
[m]
Indeed. But I would want to be able to populate it items by items.
Pierre-Henri Wuillemin
@phwuill_gitlab
Could you give an example ?
nojhan
@nojhan:matrix.org
[m]
Actually, I think I understood my mistake, sorry for the noise 🙂
Pierre-Henri Wuillemin
@phwuill_gitlab
:+1: