Bayes Search C#

The engine.
Post Reply
lablonsk
Posts: 32
Joined: Sat Jun 29, 2019 12:13 pm

Bayes Search C#

Post by lablonsk » Sat Sep 07, 2019 7:14 pm

Hi
Can you learn an RB without using a file?
Like for example a data vector?
Because the process is getting too slow ...
I need one exemple pls.

shooltz[BayesFusion]
Site Admin
Posts: 1241
Joined: Mon Nov 26, 2007 5:51 pm

Re: Bayes Search C#

Post by shooltz[BayesFusion] » Mon Sep 09, 2019 1:43 pm

The speed of learning does not depend on the origin of the data. If you have data in a file and use DataSet.ReadFile, the file content will be loaded into the memory.

lablonsk
Posts: 32
Joined: Sat Jun 29, 2019 12:13 pm

Re: Bayes Search C#

Post by lablonsk » Thu Sep 12, 2019 5:08 pm

shooltz[BayesFusion] wrote:
Mon Sep 09, 2019 1:43 pm
The speed of learning does not depend on the origin of the data. If you have data in a file and use DataSet.ReadFile, the file content will be loaded into the memory.
2 questions
Is BayesSearch working for .NET?
Second is: The problem is that the file is generated in memory so I would have to save to file to read and my files at least have 8000 lines some 80000 more, this is slow reading maybe because I am using a dll that I made in C to run in C #.
Thank you.

shooltz[BayesFusion]
Site Admin
Posts: 1241
Joined: Mon Nov 26, 2007 5:51 pm

Re: Bayes Search C#

Post by shooltz[BayesFusion] » Thu Sep 12, 2019 7:00 pm

Is BayesSearch working for .NET?
It is available in version 1.4.1 (not yet available on our download site). I can send you a private download link if you need Bayesian Search in your .NET program.
Second is: The problem is that the file is generated in memory so I would have to save to file to read and my files at least have 8000 lines some 80000 more, this is slow reading maybe because I am using a dll that I made in C to run in C #
I would not worry about time required to save/load the file. Note that you can build a DataSet in memory using DataSet's methods which add variables/records and set values (AddIntVariable, AddFloatVariable, AddEmptyRecord, SetInt, SetFloat).

lablonsk
Posts: 32
Joined: Sat Jun 29, 2019 12:13 pm

Re: Bayes Search C#

Post by lablonsk » Sat Sep 14, 2019 6:00 pm

shooltz[BayesFusion] wrote:
Thu Sep 12, 2019 7:00 pm
Is BayesSearch working for .NET?
It is available in version 1.4.1 (not yet available on our download site). I can send you a private download link if you need Bayesian Search in your .NET program.
Second is: The problem is that the file is generated in memory so I would have to save to file to read and my files at least have 8000 lines some 80000 more, this is slow reading maybe because I am using a dll that I made in C to run in C #
I would not worry about time required to save/load the file. Note that you can build a DataSet in memory using DataSet's methods which add variables/records and set values (AddIntVariable, AddFloatVariable, AddEmptyRecord, SetInt, SetFloat).
I want, it would be of great use. If there are any bugs I can help reporting.
Thank you very much

lablonsk
Posts: 32
Joined: Sat Jun 29, 2019 12:13 pm

Re: Bayes Search C#

Post by lablonsk » Sun Sep 15, 2019 8:16 pm

There is one more problem. Since I am working with an evolutionary algorithm, every time I perform a certain number of inference I have to generate a new RB. This takes a while, but I'll try your tip.

shooltz[BayesFusion]
Site Admin
Posts: 1241
Joined: Mon Nov 26, 2007 5:51 pm

Re: Bayes Search C#

Post by shooltz[BayesFusion] » Mon Sep 16, 2019 11:46 am

I am working with an evolutionary algorithm, every time I perform a certain number of inference I have to generate a new RB.
In such case, I recommend using DataSet's methods to initialize its content in memory (without going through DataSet.ReadFile).

lablonsk
Posts: 32
Joined: Sat Jun 29, 2019 12:13 pm

Re: Bayes Search C#

Post by lablonsk » Thu Sep 19, 2019 12:55 pm

lablonsk wrote:
Sat Sep 14, 2019 6:00 pm
shooltz[BayesFusion] wrote:
Thu Sep 12, 2019 7:00 pm
Is BayesSearch working for .NET?
It is available in version 1.4.1 (not yet available on our download site). I can send you a private download link if you need Bayesian Search in your .NET program.
could you send me in private the download link?

shooltz[BayesFusion]
Site Admin
Posts: 1241
Joined: Mon Nov 26, 2007 5:51 pm

Re: Bayes Search C#

Post by shooltz[BayesFusion] » Thu Sep 19, 2019 7:13 pm

Check your PM inbox on this forum.

lablonsk
Posts: 32
Joined: Sat Jun 29, 2019 12:13 pm

Re: Bayes Search C#

Post by lablonsk » Fri Sep 20, 2019 7:48 pm

shooltz[BayesFusion] wrote:
Thu Sep 19, 2019 7:13 pm
Check your PM inbox on this forum.
Thank you very much.
It will help me a lot.

lablonsk
Posts: 32
Joined: Sat Jun 29, 2019 12:13 pm

Re: Bayes Search C#

Post by lablonsk » Fri Sep 27, 2019 2:25 pm

I would not worry about time required to save/load the file. Note that you can build a DataSet in memory using DataSet's methods which add variables/records and set values (AddIntVariable, AddFloatVariable, AddEmptyRecord, SetInt, SetFloat).
I didn't understand much when you said to use it. And I looked in the manual and found no example. Could you give a brief example? I have a String vector that would be the names of the nodes and a data array that represents the RB information. I tried to use but I'm trying syntax error

shooltz[BayesFusion]
Site Admin
Posts: 1241
Joined: Mon Nov 26, 2007 5:51 pm

Re: Bayes Search C#

Post by shooltz[BayesFusion] » Fri Sep 27, 2019 2:35 pm

I have a String vector that would be the names of the nodes and a data array that represents the RB information.
Assuming that your Bayesian network will include only CPT nodes:

1. start with an empty DataSet object.
2. in a loop call AddIntVariable for each node (using node name from String vector)
3. for each row in a data array
a. call AddEmptyRecord
b. in the loop, call SetInt (using an element from your data array)

Post Reply