Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Anders L Madsen

Pages: [1] 2 3 ... 20
RHUGIN / Problem running RHugin using latest version of HUGIN
« on: April 20, 2020, 10:40:31  »
The RHugin plugin ( searches for the HUGIN installation is a specific location. This location is no longer used to install HUGIN software.

Here is how to solve the issue on the Windows platform:

RHugin tries to locate the Hugin installation, but fails because the naming of the Hugin directory has changed.  Try the following workaround:
  • Start a “Command Prompt” with “Run as Administartor” privileges.
  • CD to the directory that contains the Hugin installation ("C:\Program Files\Hugin Expert").
  • Run this command: mklink /D "Hugin Researcher 8.8 (x64)" "HUGIN 8.8 (x64)"

Notice the Hugin/HUGIN distinction in the mklink-command.

Then follow the instructions for installing the RHugin package.

P(e) is the probability of the evidence. E.g., if you have entered X=x and Y=y (assuming discrete nodes), then P(e)=P(X=x,Y=y).

It is calculated as the normalization constant after propagation of evidence in the junction tree.


FAQ / Re: How can I use HUGIN in Matlab?
« on: February 06, 2020, 20:08:03  »
Due to an update in Matlab (version 2018a), the access to enums has changed. The above code should be updated to something like this:

Code: [Select]

ghapi = NET.addAssembly ('C:\Program Files\Hugin Expert\HUGIN 8.8 (x64)\HDE8.8CS\Lib\hugincs-8.8-2.0-x64.dll');
myEquilibirumEnumHandle = ghapi.AssemblyHandle.GetType('HAPI.Domain+Equilibrium');
myEvidenceModeEnumHandle2 = ghapi.AssemblyHandle.GetType('HAPI.Domain+EvidenceMode');

d = HAPI.Domain ('C:\Program Files\Hugin Expert\HUGIN 8.8 (x64)\Samples\', HAPI.DefaultClassParseListener);
L = d.GetNodeByName ('L');
d.Compile ();
L.GetBelief (0)
%ans =
%    0.0550
L.GetBelief (1)
%ans =
%    0.9450

X = d.GetNodeByName ('X');
X.SelectState (0);
d.Propagate (myEquilibirumEnumHandle.GetEnumValues().Get(1), myEvidenceModeEnumHandle2.GetEnumValues().Get(0));
L.GetBelief (0)
% %ans =
% %    0.4887
 L.GetBelief (1)
% %ans =
% %    0.5113

FAQ / CLI install documentation HUGIN 8.7
« on: October 18, 2019, 09:59:10  »
The following command-line is known to work (April 2019):

msiexec /i HuginDist87(x64).msi /L*v SilentInstallation.log /quiet PATH_LICENSE="C:\TMP\LICENSE-8.7"

A couple of words on the installation:
  • The PATH_LICENSE is of course the path to the location of the HUGIN License file.
  • The .MSI file does not perform a cryptographic check of the License Key - only a shallow sanity check. The deep check is performed every time HUGIN is launched. Therefore you must launch HUGIN to be sure that everything is working properly.
  • The .MSI file will write the license to the location: C:\ProgramData\Hugin Expert. If anything goes wrong, the file can be manually copied to this location.

HUGIN GUI Discussion / Re: Temporal Nodes
« on: October 08, 2019, 21:38:31  »
Dear Marco,

The number of time slices is set under "Network->Network Properties->DBN".

Hope this helps

Hello Raymond,

I assume that you by now have realised that "our" HUGIN is a tool for probabilistic graphical models and not images.

Sorry for the belated reply.


General Discussion / Re: Expressing Fault Tree Analysis in BBN
« on: June 06, 2018, 07:09:52  »
Hi Mel,

The "generalization" of OR / AND is MAX / MIN. If you encode false/correct as 0, true/failure as 1, and defective as 2 using Numbered nodes and use MIN/MAX instead of AND/OR, then you should be able to encode the desired CPTs.

The idea is that there must be an order on the states and this is enforced by the use of the Numbered node where 0 would reflect the absence of a cause and higher values reflect a more significant presence of the cause.

Let me know if this works for you.

FAQ / Re: How can I use HUGIN in Matlab?
« on: May 16, 2018, 10:00:09  »
The method
Code: [Select]
enterFindingis used for entering evidence on a node. There is also a selectState method to set the node to a specific state.

To change the CPT of the a node you need access the table for the node and manipulate its content. The documentation has a complete example building a network (here referring to the .NET API documentation):
Hope this helps

FAQ / Re: How can I use HUGIN in Matlab?
« on: May 05, 2018, 19:10:51  »
Is it possible to assign multiple nodes into an array in MATLAB and then call them from there instead of "one-by-one" method?

Yes, this should not be a problem. I'm not certain of the exact syntex, but using the HUGIN .NET API it should be something like this:

Code: [Select]
Node []array;
array = new Node[2];
hope this helps

General Discussion / Re: Expressing Fault Tree Analysis in BBN
« on: April 07, 2018, 20:53:23  »

If you want P(C1=true|P2=true,P3=true)=0.3*0.3=0.09, then you can achieve this using a "noisy-add" gate as demonstrated in the attached model. You set P2_input=true and P3_input=true to get the desire result.

Hope this helps.

FAQ / Re: How can I use HUGIN in Matlab?
« on: February 17, 2018, 22:02:54  »

This line of code is not correct:
Code: [Select]
A_table=d.GetTable ('A');
You should invoke GetTable on A as in:
Code: [Select]
A_table=A.GetTable ();
The node A has a table (a representation of its CPT).

hope this helps

FAQ / Re: How can I use HUGIN in Matlab?
« on: February 09, 2018, 19:50:57  »

Domain does not have a table. You need to access the node. Can you send the code that produces the error?

HUGIN GUI Discussion / Re: Align Pics for Focus Stacking
« on: January 03, 2018, 10:06:30  »

Are you aware that our HUGIN is a tool for probabilistic graphical models?

Best regards

General Discussion / Re: Problems while creating HDR images
« on: October 17, 2017, 17:31:59  »
Our HUGIN is a tool for probabilistic graphical models (see

C# / Re: Run-time error 429: Active X component can't create object
« on: October 17, 2017, 16:32:11  »
Hi Olivia,

Good to hear from you.

It seems like the HUGIN version and MS Excel version are misaligned. You need to make sure that both are either 32-bit or 64-bit. They cannot be mixed.

If your MS Excel is 32-bit, then you need to use HUGIN Deverloper 32-bit. You should be able to install HUGIN Developer 32-bit next to your 64-bit. They should not conflict.

Hope this helps.

Pages: [1] 2 3 ... 20