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 - novaczkisz

Pages: [1]
1
HUGIN GUI Discussion / Re: Check the results of an expression
« on: April 03, 2010, 11:34:56  »
Hi!

Ok, i get it! Thx for the explanation.

Br,
Szabolcs

2
HUGIN GUI Discussion / Re: Check the results of an expression
« on: April 02, 2010, 07:33:14  »
Hi!

Thx for the quick answer!

If it should work like you say than there is a bug here or (most probably) i still dont get it :)

After compiling the network i have the following code in the .net file:

Code: [Select]
potential (C | B A)
{
    model_nodes = ();
    model_data = ( A + B );
    data
     = ((( 1 0 0 0 0 ) %  B=0  A=0
( 0 1 0 0 0 ) %  B=0  A=1
( 0 0 1 0 0 )) %  B=0  A=2
(( 0 1 0 0 0 ) %  B=1  A=0
( 0 0 1 0 0 ) %  B=1  A=1
( 0 0 0 1 0 )) %  B=1  A=2
(( 0 0 1 0 0 ) %  B=2  A=0
( 0 0 0 1 0 ) %  B=2  A=1
( 0 0 0 0 1 ))); %  B=2  A=2
}

This does not fit in your explanation, doesn't it?

Thx and br,
Szabolcs

3
HUGIN GUI Discussion / Check the results of an expression
« on: April 01, 2010, 17:15:46  »
Hi!

I built up a very simple network:
Three nodes (A,B,C). Node A nd B are the parents of C. The CPT values of node A and B are added manually and the CPT of node C should be filled by a simple expression: A+B. I can build the network, set the CPTs manually and configure the expression for node C. The network can be comlied an runned. The belief values of each node is showed in run mode.

Thats nice but: My question is that where do the belief values come from for node C (i do not mean here marginalization, but the input for it)? In edit mode i try to get the CPT of node C but instead of probability vaues (that should be the input for marginalizationj) i see only question-marks (?). A further question arises than: what exaxtly does the A+B expression? Or put it in an other way: What does the CPT of node C look like if the CPT of node A and B looks like this and the expressin for node C is A+B:

A:
   0: 0.1
   1: 0.2
   2: 0.7

B:
   0: 0.2
   1: 0.2
   2: 0.6

C: ???

Thx and br.
Szabolcs

4
C++ / Re: C++ API on Linux
« on: April 01, 2010, 14:34:16  »
Hi All!

The problem has been solved. There were three problems in the hugin cpp header file:

No1: The INFINITY function of the NetworkModel class:

Code: [Select]
        /** The infinity value used by Hugin
            @return infinity, represented as a double
        */
        double INFINITY () const;

The problem here is that INFINITY is already declared: it is the built in function of gcc __builtin_inff. Thus the compiler indicates the following error:
‘__builtin_inff’ declared as function returning a function   hugin.h   HuginAPI/src   369   C/C++ Problem

The solution is to undef infinity right at the beginning of the header:

Code: [Select]
#endif /* _WIN32 */
#endif /* H_DLL */

#ifdef INFINITY
#undef INFINITY
#endif

#include <string>
#include <vector>


No 2: H_DLL bool evidenceModeIs (EvidenceMode ev) const; in class Domain

Gcc has some problem with EvidenceMode ev

The solution is to change ev to anything you like (ev -> em):

Code: [Select]
H_DLL bool evidenceModeIs (EvidenceMode em) const;
No3:
The same problem as No 2 with function propagate of class Domain:
The solution again:

Code: [Select]
        H_DLL void propagate (Equilibrium eq = H_EQUILIBRIUM_SUM,
            EvidenceMode em = H_MODE_NORMAL);



Br,
Szabolcs




5
C++ / C++ API on Linux
« on: March 31, 2010, 20:10:29  »
Hi Hugin C++ API Users!

I have a project in which i run into a task to integrate OMNeT++ with a bayesian network engine. I am testing the Hugin (Lite) C++ API for this purpose right now and am stucked in a problem: as soon as i include the API header file (hugin) in my project it wont compile any more. The reason is that the compiler (gcc version 4.4.1) stops at several syntax errors found in that header. I have copied one of the errors found. Has anyone meet a problem like this?

#########################################
/home/szabi/Desktop/HUGIN_LITE.linux/include/hugin expected ‘;’   HuginAPI      1033   C/C++ Problem
#########################################

Br,
Szabolcs

Pages: [1]