[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [recommenders-dev] [Jayes] Any Suggestions to Solve Heap Space Problem

Hi Ekin,
BayesNet has no API for using floats, you will have to subclass BayesNode and make a version of setProbabilities that uses a FloatArrayWrapper instead of DoubleArrayWrapper, and use the deprecated BayesNet.addNode to add it to the network (instead of BayesNet.createNode)

Regards, Michael

Am 05.10.2016 10:37 schrieb "Ekincan Ufuktepe" <ekincanufuktepe@xxxxxxxxx>:

>

> Hi Michael,
>
> Thanks for the quick response :)
>
> The problem appears while I'm trying to create the BayesNet. There is no problem during the node creation and parent creation. However, it occurs while I am trying to set the probabilities. Also I must note that my CPT used to have a lot of zeros, but to handle that problem I tried to set them to a smaller value such as 0.01. But still there might be some zeros as well. Unfortunately, my project cannot make to theÂJunctionTreeAlgorithm.
>
> Normally I am using Double. using Float makes a lot of sense. I will try to see how far it can go.
>
> Best Regards,
>
> Ekin
>
>
>
>
> 2016-10-04 14:57 GMT+03:00 Michael Kutschke <kutschke.michael@xxxxxxxxxxxxxx>:

>>

>> Hi Ekin,
>>
>> Thank you for the praise :-)
>>
>> Does the problem appear when you create the BayesNet or when you create the JunctionTreeAlgorithm? Are your CPTs sparse (lots of zeroes) or not?
>>
>> Sadly the best way to deal with the problem is probably to change the model - for example, our models have lots of nodes, but we get away by modeling them as children instead of parents because they are conditionally independent given the "main" node.
>>
>> If it's not possible to change the model, you could try using floats instead of doubles. Refer to the Jayes blog post linked on the code recommenders homepage.
>>
>> Regards, Michael
>>
>>
>> Am 04.10.2016 13:19 schrieb "Ekincan Ufuktepe" <ekincanufuktepe@xxxxxxxxx>:

>>>

>>> Hi Everyone,
>>>
>>> First I would like to say that I really appreciate the work and effort on "Jayes".
>>>
>>> I have been working on Bayesian Networks for a while and among most of the Bayesian Network libraries, Jayes is one of the best. However, I am working on a project that includes a lot of nodes and on occasions I might have some nodes with more the 10 parent nodes, with makes 2^n+1 size of a node probabilistic table (n = number of parent nodes). Therefore, it is quite usual to encounter "java.lang.OutOfMemoryError: Java heap space" errors sometimes.
>>>
>>> I was wondering if there are any suggestions that you might give to overcome this problem.
>>>
>>> So far, I have tried to configure my eclipse.ini file, by modifying -Xms, -Xmx andÂXX:MaxPermSize
>>>
>>> But it seems that it is not effected by any changes that I have made on eclipse.ini. Furthermore, I have also tried to use the parameter through "Run Configurations". However, that trial has also let me down as well.
>>>
>>> Please let me know if anything is unclear.
>>>
>>> Thanks in advance,
>>>
>>> Ekin
>>>
>>>
>>>
>>> _______________________________________________
>>> recommenders-dev mailing list
>>> recommenders-dev@xxxxxxxxxxx
>>> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
>>> https://dev.eclipse.org/mailman/listinfo/recommenders-dev
>>
>>
>> _______________________________________________
>> recommenders-dev mailing list
>> recommenders-dev@xxxxxxxxxxx
>> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
>> https://dev.eclipse.org/mailman/listinfo/recommenders-dev
>
>
>
> _______________________________________________
> recommenders-dev mailing list
> recommenders-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/recommenders-dev