遗传算法代码 [英] code for genetic algorithm

查看:74
本文介绍了遗传算法代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

古德傍晚先生,
我是g.vijay bhasker在hyderabab求学的技术人员.我正在做我的学术项目使用遗传算法挖掘频繁项集".先生,我想针对非二进制数据集执行该项目.但是我不知道该怎么做,如果您知道plz向我的邮件建议我的解决方案和代码,我的邮件ID为xxxxx@gmail.com

[edit]带电子邮件屏蔽的[/edit]

gud evening sir,
i am g.vijay bhasker purcieving mtech in hyderabab.i am doing my academic project ''mining frequent itemset using genetic algorithm".sir, i want to do that project for non-binary datasets.but i am not understanding how to do,if u know plz suggest me solution and code for this one to my mail.my mail id is xxxxx@gmail.com

[edit] email masked [/edit]

推荐答案

CP也有一些关于遗传算法的好文章,而其中只有一篇: ^ ].
请随时使用本网站右上方的搜索字段.

问候,

-MRB
CP also has some great articles on genetic algorithms and this only one of them: Genetics Dot Net - The Basics[^].
Please feel free to use the search field top right side of this site.

Regards,

-MRB


我几个学期前为我的硕士做了一次遗传算法分配,我从字面上接受了Wikipedia的文章,并将其用作食谱".对于遗传算法而言,实现起来确实并不难.最难的部分是提出适合度函数,以评估解决方案的好坏.

您需要做的是:

1.定义解决方案的遗传图谱.这可以是一串位或某种整数的数组.您的程序将能够将映射解码为解决方案,以解决您要解决的任何问题.就我而言,这是"n皇后问题",我有一个整数数组,其中每个元素是一行,值是一列.

2.定义适应度函数.就我而言,我将计算可以捕获其他皇后的皇后数量.分数越低,适合度越高.

有关算法的详细信息,请参见Wikipedia:
http://en.wikipedia.org/wiki/Genetic_algorithm [
I did a genetic algorithm assignment a couple of semesters ago for my Masters and I literally took the Wikipedia article and used it as a "recipe". The implementation is really not that hard for genetic algorithms. The hardest part is coming up with a fitness function that rates how good the solution is.

What you need to do is:

1. Define a genetic mapping for the solution. This can be either a string of bits or an array of some kind of integer. Your program will be able to decode the mapping into a solution for whatever problem you''re trying to solve. In my case, it was the "n-queens problem", and I had an array of integers where each element was a row and the value was a column.

2. Define a fitness function. In my case, I would count the number of queens that could capture other queens. The lower the score the higher the fitness.

For the specifics on the algorithm, see Wikipedia:
http://en.wikipedia.org/wiki/Genetic_algorithm[^]


此处无法正常运行.抱歉,这里没有快速提问.这听起来像是您的大学项目/作业,您应该付出一些努力.

我们希望您花一些时间来尝试解决您面临的问题,然后再花一些时间在此处发布问题时提出问题.此外,您发布您的电子邮件ID,并要求在其中发布代码. :doh:

这是询问者的期望:
1. 先尝试您要做什么!
2.制定看起来像问题/无法解决的问题.

试试看,告诉他们是否遇到问题.
成员将很乐意为您提供帮助.
It does not work like this here. I am sorry but there is no quick question here. This sounds like your college project/assignment, you should put some effort.

We expect you to put some time in trying the issue that you are facing and then some time in formulating the question while posting here. Further, you post your email id and ask for code to be posted there. :doh:

Here is what is expected by enquirers:
1. TRY first what you want to do!
2. Formulate what was done by you that looks like an issue/not working.

Try them and tell if you face issues.
Members will be more than happy to help like this.


这篇关于遗传算法代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆