Replies: 4 comments 4 replies
-
Hi Rainer, Despite being not supported yet, it is very interesting to have this feature in the next release of PyGAD to help you specify a data type for each gene. For now, all genes could be only of a single data type. Thank you at all! |
Beta Was this translation helpful? Give feedback.
-
Hi Rainer, Your requested feature is supported in PyGAD 2.14.1 Tor example, if you have 2 Gene's where the first is int and the second is float, then use: Please try this feature and let me know if there are any problems to be solved or if you have any new features in mind to be included later. |
Beta Was this translation helpful? Give feedback.
-
A general question in this context would be decimal places of float genes. I my opinion (beyond what is going on during mutation) it would be helpful if one could decrease the precision of floats, global and/or individual. If this could also increase the whole workflow performance it would make sense to me, to use this i.e. for a exploratory run or for destinct use cases, where a finer granularity over a certain precision does not make any sense. |
Beta Was this translation helpful? Give feedback.
-
could be possible a gene type of boolean? or maybe a list of possible values? like [0,1] |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm currently making some first steps with pygad and, after some difficulties in the beginning, this question arose.
Is it possible to use mixed data types for genes?
I know about the internal random function using float values, which then are converted to integer if the user sets gene_type=int. Right now I tend to stay with float and to convert these to int later, since I have some genes, which need to be float, others are integer. It confused me a bit regarding the mutation of genes as floating, which become the same integer after conversion (no mutation). Is this covered in some way? Just curious.
Regards,
Rainer
Beta Was this translation helpful? Give feedback.
All reactions