Docstoc

sheet genetic

Document Sample
sheet genetic Powered By Docstoc
					            Alexandria University – Faculty of Science

                Course title : Machine Learning
                Course code : CS324
                Instructors : Dr. Yasser Fouad


                                   Sheet Genetic

1) For the data listed below, use genetic algorithm to estimate an individual’s credit
risk on the basis of such properties as credit history, current debt, collateral and
income. Construct 5 genes randomly in the initial population, and then use
crossover once in 1st generation and mutation operation once in 2nd generation. The
crossover and mutation operation use random individuals. (Do not calculate the
fitness value for any gene)

 No      Credit          Debt      Collateral       Income              RISK
         History
1        Bad             High      None             Low                 High
2        Unknown         High      None             Moderate            High
3        Unknown         Low       None             Moderate            Moderate
4        Unknown         Low       None             Low                 High
5        Unknown         Low       None             High                Low
6        Unknown         Low       Adequate         High                Low
7        Bad             Low       None             Low                 High
8        Bad             Low       Adequate         High                Moderate
9        Good            Low       None             High                Low
10       Good            High      Adequate         High                Low
11       Good            High      None             Low                 High
12       Good            High      None             Moderate            Moderate
13       Good            High      None             High                Low
14       Bad             High      None             Moderate            High

2) For the data listed below, it is for estimating buys computer on the basis of such
properties as age, income, student and credit rating. Construct 10 genes from the data and
5 genes random with the same format of the data. Setup the 15 genes as initial population
for Genetic Algorithm. Derive the new population in generation one and two by applying
Crossover operator with percentage 40% of the best genes according to fitness, and
Mutation operator with percentage 20% of the worst fitness genes. The fitness is
computed by ((the sum of (bit’s value multiply by its position) multiply by 4 and add 2 if
Buys_computer is Yes) mod 100) %.

     No        Age     Income     Student
                                             Credit_rating     Buys_computer
    1         <=30      High        No            Fair               No
    2         <=30      High        No         Excellent             No
    3        31…40      High        No            Fair               Yes
    4          >40     Medium       No            Fair               Yes
    5          >40      Low         Yes           Fair               Yes
    6          >40      Low         Yes        Excellent             No
    7        31…40      Low         Yes        Excellent             Yes
    8         <=30     Medium       No            Fair               No
    9         <=30      Low         Yes           Fair               Yes
    10         >40     Medium       Yes           Fair               Yes
    11        <=30     Medium       Yes        Excellent             Yes
    12       31…40     Medium       No         Excellent             Yes
    13       31…40      High        Yes           Fair               Yes
    14         >40     Medium       No         Excellent             No

				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:11
posted:3/17/2012
language:
pages:2
Description: machine learning lecture