Genetic Programming: Principles and Applications · 2013. 2. 13. · Introduction:Genetic...

52
Genetic Programming: Principles and Applications Behnam Dezfouli Spring 2007

Transcript of Genetic Programming: Principles and Applications · 2013. 2. 13. · Introduction:Genetic...

  • Genetic Programming:Principles and Applications

    Behnam Dezfouli

    Spring 2007

  • IntroductionIntroductionIntroductionIntroduction

    ا ك ا گ الگ ا ل اا ا برنامه هاي در اصل همان الگوريتم ژنتيگ است كه بر روي جمعيتي از اعمال شده است كامپيوتري

    ازا ه ا نظ ا خ اند ت كه ت ا ه نا ك ا ا هدف ايجاد يك برنامه است كه بتواند خروجي هاي مورد نظر را به ازاي دفوروديهاي خاص توليد كند

    ممكن هاي نامه ب فضاي د نامه ب ين ت ا كا تجوي جستجوي كارا ترين برنامه در فضاي برنامه هاي ممكنجاست LISPهاي symbolic expressionفضاي جستجو همان

    S i T i l d F tiS-expressions: Terminals and Functions

  • IntroductionIntroduction:Genetic programmingمشخصه ي اصلي

    مراتبي ها)(Hierarchicalسلسله برنامه بودن

    IntroductionIntroductionبودن برنامه ها) (Hierarchicalسلسله مراتبي

    Representation as key issueشكل ا ان اك نا ا نا ا ا فضا محدوديت فضاي جستجو و ايجاد برنامه هاي نامناسب:محدود كردن اندازه و شكل

    توليد جواب خوب براي مسئله: آزادي و ديناميك بودن ساختارها

    String-base representation:معايب نمايش رشته ايذات برنامه ها و روال ها سلسله مراتبي است

    اند ن اب ج ه ا ا اي شته ش ا ن از تفاده استفاده از نمايش رشته اي ما را به جواب نمي رساندانمايش رشته اي قادر به نمايش ساختار هاي تكرار و بازگشتي نمي باشد

    محدوديت زياد در ميزان پيچيدگي =تعيين اندازه اوليه. قابليت تغيير ديناميك نداردمحاسباتي

  • IntroductionIntroductionIntroductionIntroduction:مقايسه با الگوريتمهاي ژنتيك

    ا اقا ا كاخ ا را بهينه كندساختارهاي پيچيدهقادر استبرنامه سازي ژنتيكي براي محدوده وسيعتري از مسائل

    :الگوريتم به عنوان يك سيستمافراد موجود درجمعيت فعلي=وضعيت سيستم م يو ر و و رتناسب افراد= ورودي سيستم

  • الگوريتم در رفته بكار الگوريتمساختارهاي در رفته بكار ساختارهاي بكار رفته در الگوريتمساختارهاي بكار رفته در الگوريتمساختارهايHierarchically structured computer programs

    whose size, shape, and complexity can dynamically change during the process.

    آ كا ك ا ا خط ك ا ا .ساختارهاي يك بعدي خطي در برنامه سازي ژنتيك به كار نمي آينداخ

    F = {f1 f2 fn}F {f1, f2, ... , fn}T = {a1, a2, ... , am}.

  • يت الگو د فته بكا هاي يتساختا الگو د فته بكا هاي ساختارهاي بكار رفته در الگوريتمساختارهاي بكار رفته در الگوريتمساختاThe functions may be: standard arithmetic operationsThe functions may be: standard arithmetic operations (such as addition, subtraction, multiplication, and division), standard mathematical functions (such as SIN EXP etc ) Boolean operations domain-specificSIN,EXP, etc.), Boolean operations, domain specificfunctions, logical operators such as If-Then-Else, and iterative operators such as Do-Until, etc

    The terminals may be: variable atomic arguments, such as the state variables of a system; constant atomic

    t h 0 d 1 d iarguments, such as 0 and 1; and, in some cases, may be other atomic entities such as functions with no arguments.

  • يت الگو د فته بكا هاي يتساختا الگو د فته بكا هاي ساختارهاي بكار رفته در الگوريتمساختارهاي بكار رفته در الگوريتمساختا.هر زباني براي برنامه نويسي ژنتيك مي تواند بكار برود

    :استفاده مي كنيم، زيرا LISPما از

    .مانند داده ها GPدستكاري . برنامه ها و داده ها داراي يك فرم مي باشند1.

    .معادل درخت پارس است S-expression. فراهم است parseدسترسي آسان به درخت 2.ند3 دا متغ شكل و اندازه كه هاي ساختا آسان ي دستكا .دستكاري آسان ساختارهايي كه اندازه و شكل متغير دارند3..دستكاري آسان ساختارهاي سلسله مراتبي4.).(Reentrantقابليت بازدخولي بودن 5..وجود محيط نرم افزاري قوي6.

    S-expressionLISP:ساختارهاي بكار رفته

  • الگوريتم در رفته بكار الگوريتمساختارهاي در رفته بكار ساختارهاي بكار رفته در الگوريتمساختارهاي بكار رفته در الگوريتمساختارهاي:1مثال :1مثال

    OR (AND (NOT D0) (NOT D1)) (AND D0 D1))F = {AND, OR, NOT}T = {D0, D1}

    D0 , D1چهار تركيب ممكن از مقادير :محيط

  • الگوريتم در رفته بكار الگوريتمساختارهاي در رفته بكار ساختارهاي بكار رفته در الگوريتمساختارهاي بكار رفته در الگوريتمساختارهايبراي حصول يك نمايش درست كه قادر به حل مسئله باشد، مجموعه توابع و

    :ترمينالها بايد دو مشخصه داشته باشند

    Closure property of the function set and terminal set: each function of the function set must be able to process all possible argument values generated by other functions or the terminal setargument values generated by other functions or the terminal set.

    Sufficiency property of the function and terminal set: the bl b l bl i h ( d) l i fproblem must be solvable using the (proposed) selection of

    functions and terminals.

  • Search SpaceSearch SpaceSearch SpaceSearch Spaceساختارهاي اوليه

    استفاده از مجموعه تركيب ترمينالها و توابع و انتخاب اتفاقي آنها و ساخت. ساختارهاي اوليه

    .كندتوزيع احتمال و تعداد آرگومانهاي توابع، عمق درخت را تعيين ميآ

    تنا تابع تناسبتابا توجه به محيط دارد fitnessهر فرد يك مقدار

    1توجه به محيط مربوط به مثالو نقطه واقعي است S-expressionهمان تفاوت ميان raw fitnessبراي اكثر موارد

  • Search SpaceSearch SpaceSearch SpaceSearch Space:در صورتي كه عبارت از نوع عدد صحيح يا حقيقي باشد

    The raw fitness r(i,t) of an individual LISP S-expression i in the population of size M at any generational time step t is:p p y g p

    S(i,j) is the value returned by S-expression i for environmental case j (of N environmental cases) and where C(j) is the correct value for environmental case jenvironmental case j.Less is better

    b l تعداد اشتباهات= مجموع فواصل داشته باشيم،booleanدر صورتي كه يك عبارت با مقادير

  • Search SpaceSearch SpaceSearch SpaceSearch SpaceAdjusted fitness measureAdjusted fitness measure

    Between 0 and 1Closer to 1 is better

    Normalized fitnessBetween 0 and 1Closer to 1 is bettersum of the normalized fitness values is 1= proportional to fitness = fitness proportionatep p p p

  • Operations in GPOperations in GPOperations in GPOperations in GPPrimary operations:Primary operations:

    ReproductionCrossover (recombination)

    FITNESS PROPORTIONATE REPRODUCTION OPERATION- Asexual operationيك عمل غير جنسي-فقط بر روي يك والد عمل مي كند

    انتقال خودش به نسل بعدي–توليد يك فرزند

    CROSSOVER (RECOMBINATION) OPERATIONCROSSOVER (RECOMBINATION) OPERATIONتوليد حداقل يك فرزند

    - Sexual operationيك عمل جنسي

  • Operations in GPOperations in GPOperations in GPOperations in GP:2مثال ل

    CROSSOVERCROSSOVER

  • OperationsOperationsOperationsOperations

  • Control ParametersControl ParametersControl ParametersControl Parameters1. Population size: A larger population allows for a greater exploration of the problem space at each generation and increases the chance of evolving aproblem space at each generation and increases the chance of evolving a solution. In general, the more complex a problem the greater the population size needed.

    2. Maximum number of generations: The evolutionary process needs to be given time; the greater the maximum number of generations the greater the chance of evolving a solution. further evolution of a population does not guarantee a solution will be found it may be better to start again with aguarantee a solution will be found—it may be better to start again with a different initial population.

    3 Probability of crossover: [Koza 1992] does not change this value from3. Probability of crossover: [Koza, 1992] does not change this value from 0.90—90% of the population undergoes crossover.

    4. Probability of reproduction: Koza’s work this value stays constant, at4. Probability of reproduction: Koza s work this value stays constant, at 0.10—10% of the population undergoes reproduction.

  • Five Major Preparatory Steps for GPFive Major Preparatory Steps for GPFive Major Preparatory Steps for GPFive Major Preparatory Steps for GP

  • Flowchart for Genetic ProgrammingFlowchart for Genetic Programmingg gg g

  • Experimental ResultsExperimental ResultsExperimental ResultsExperimental Results

    GPبا استفاده از machine learningبررسي برخي آزمايشات در زمينه

    Th l ith i b bili ti l t tThe algorithm is probabilistic: we almost never get the precisely same result twice.

    machine learning: The ability of a machine to improve its performance based on previous results.

  • MACHINE LEARNING OF A FUNCTIONMACHINE LEARNING OF A FUNCTION

    توسعه يك تركيب از توابع، كه بتواند مقدار درست يك تابع را پس از مشاهده تنها يك تعداد نسبتاً كوچك از نمونه هاي خاص مقدار آن تابع كه وابسته به تركيب

    داند گ ب باشد گومانها آ از .خاصي از آرگومانها باشد برگرداندخاص

    :مثالي براي اين مورد BOOLEAN 11-MULTIPLEXER FUNCTION

    دازيم پ م د مو اين س ب به ادامه .در ادامه به بررسي اين مورد مي پردازيمد

  • BOOLEANBOOLEAN 1111--MULTIPLEXER FUNCTIONMULTIPLEXER FUNCTIONBOOLEAN BOOLEAN 1111--MULTIPLEXER FUNCTIONMULTIPLEXER FUNCTION

    input to the Boolean multiplexer function consists of k "address" bits ai and 2^k "data" bits di.for the 11-multiplexer (where k = 3)

    و از طرفي اين نمونه فضاي جستجو قابل سنجش مي باشد:مزيت كار بر روي اين مثال ل ين روي بر ر بزي ي جش بل جو ج وي ين ي ر ز و .در شبكه هاي عصبي به عنوان يك تابع تست در نظر گرفته شده است

  • BOOLEANBOOLEAN 1111--MULTIPLEXER FUNCTIONMULTIPLEXER FUNCTIONBOOLEAN BOOLEAN 1111--MULTIPLEXER FUNCTIONMULTIPLEXER FUNCTION. مرحله اول انتخاب مجموعه توابع و ترمينالها است:مجموعه توابع مورد نياز براي انواع عبارات بولي

    F = {AND, OR, NOT, IF}.T = {A0, A1, A2, D0, D1, ... , D7}.{ , , , , , , }

    kk 222+kk 2+ 2

    Number of argumentsk 2+

    Number of possible Boolean Functions

    20482 2211

    3 20482 22 =K = 3

  • BOOLEANBOOLEAN 1111--MULTIPLEXER FUNCTIONMULTIPLEXER FUNCTION.تركيب آرگومانها را به عنوان محيط استفاده مي كنيم 2048براي اين مسئله كل

    با اب ب ا ل ن ه ت ع ي4000ج گ نظ د

    BOOLEAN BOOLEAN 1111--MULTIPLEXER FUNCTIONMULTIPLEXER FUNCTION

    .در نظر مي گيريم 4000جمعيت هر نسل را برابر با

    Raw fitness of a LISP S-expression is the sum of the pdistances (taken over all the environmental cases) between the point returned by the S-expression for a given set of arguments and the correct point.g g p

    The raw fitness of an S-expression can range over 2049 different values between 0 and 2048different values between 0 and 2048.

    The number of hits is simply 2048 minus the raw fitness p y(mismatches).

  • BOOLEAN BOOLEAN 1111--MULTIPLEXER FUNCTIONMULTIPLEXER FUNCTION

    The initial random population includes a variety of highly unfit individuals Some individual S expressions involve logicalindividuals. Some individual S-expressions involve logical contradictions such as (AND A0 (NOT A0)). Others involve inefficiencies such as (OR D7 D7). Some are passive and merely pass an input through as the output, such as (NOT (NOT A1)). Somepass an input through as the output, such as (NOT (NOT A1)). Some of the initial random individuals base their decision on precisely the wrong arguments (i.e. data bits), such as (IF D0 A0 A2).

    Most of the initial random individuals are partially "blind" in that they do not incorporate all 11 arguments that are known to be necessary for a solution to the problem.for a solution to the problem.

    Some S-expressions are just nonsense, such as (IF (IF (IF D2 D2 D2) D2) D2)D2) D2).

  • BOOLEANBOOLEAN 1111--MULTIPLEXER FUNCTIONMULTIPLEXER FUNCTIONBOOLEAN BOOLEAN 1111--MULTIPLEXER FUNCTIONMULTIPLEXER FUNCTION

    نفر با ميزان 25نفر، 4000با وجود تناسب بسيار پايين افراد جمعيت اوليه، در ميانhitوجود دارند1280برابر.

    985.4= نسل اول raw fitnessميانگين ا فا ا اcrossoverreproductionا ا .جمعيت بعدي را مي سازيمreproductionو crossoverبا استفاده از

    Raw fitness 891= در نسل دوماست شده شروع دوم نسل از تناسب بهبود كه شود مي .مشاهده مي شود كه بهبود تناسب از نسل دوم شروع شده است.مشاهده

    :نسل بعدي داريم 9در 382و459و558و 651و731و763و823و845

    برخورد حاصل مي شود جواب مسئله 2048ام فردي با تناسب 9در نسل

  • BOOLEANBOOLEAN 1111--MULTIPLEXER FUNCTIONMULTIPLEXER FUNCTIONBOOLEAN BOOLEAN 1111 MULTIPLEXER FUNCTIONMULTIPLEXER FUNCTION:ام به دست مي آيد 9آنچه در نسل

  • BOOLEANBOOLEAN 1111--MULTIPLEXER FUNCTIONMULTIPLEXER FUNCTIONBOOLEAN BOOLEAN 1111--MULTIPLEXER FUNCTIONMULTIPLEXER FUNCTION:ام مي باشد hتعداد اجداد فردي كه در نسل حد اكثر

    12 +h 12 +h.فرد مي باشد 2بر روي crossoverام، حاصل عمل 9جواب حاصل شده در نسل

    .مي باشد 1792از لحاظ تناسب ميباشد و نرخ برخورد آن 58عضو داراي رتبه4000ام و در ميان8پدر از نسل.است 1920نرخ برخورد آن .عضو مي باشد4000از لحاظ تناسب در ميان1ام و داراي رتبه8مادر از نسل

    پد پدراد مادر

  • BOOLEAN BOOLEAN 1111--MULTIPLEXER FUNCTIONMULTIPLEXER FUNCTION

    :نسل عبارت است از 10در اين حالت تعداد عبارات بررسي شده در ميان 40000 * 2048 = 81920000 = 81.92E+06

    .اين مقدار نسبت به كل تعداد توابع بسيار كمتر است 61610

  • Simple Symbolic RegressionSimple Symbolic RegressionSimple Symbolic RegressionSimple Symbolic Regression.است (sin(xپيدا كردن يك عبارت رياضي براي : هدف

    1800 ≤≤ x 1800 ≤≤ x

    :يك تقريب براي تابع روبرو بدست آوريم symbolic regressionمي خواهيم توسط

    x درجه تغيير خواهد كرد 172تا 0راديان است و لذا عبارت داخل پراتز بين 9تا 0بين..تابع تناسب را به صورت روبرو در نظر مي گيريم كه تفاضل مقدار تقريبي با مقدار پيش فرض مي باشد

    f .متغير خواهد بود200تا0بينfخواهد بود و لذا مقدار20حداكثر ميزان درون قدر مطلق.نزديكتر باشد يعني تناسب باالتر است 200هرچه به

    30= و تعداد نسلها 100= ادازه جمعيت

  • Simple Symbolic RegressionSimple Symbolic RegressionSimple Symbolic RegressionSimple Symbolic Regression:نسل توليد شده اند 30هاي زير در طول S-expressionبهترين

    % th t t d di i i t% the protected division operator

    مروري بر نتايج به دست آمده

    .ميزان پيچيدگي بر اساس تعداد ترمينالها و توابع استفاده شده در هر عبارت است

  • Simple Symbolic RegressionSimple Symbolic RegressionSimple Symbolic RegressionSimple Symbolic Regression:با ساده تر كردن نتايج به دست آمده

  • Simple Symbolic RegressionSimple Symbolic RegressionSimple Symbolic RegressionSimple Symbolic Regressionبلوكهاي سازنده براي تناسب باال مي (x7) , (*xx*)ديده مي شود، E4تا E1همانطوري كه از

    بسازند باالت تناسب با ختهاي د تا اند شده داشته نگه مختلف نسلهاي طول د جمالت اين و .باشند و اين جمالت در طول نسلهاي مختلف نگه داشته شده اند تا درختهايي با تناسب باالتر بسازندباشند.را پديد آورد E4تركيب شده تا ((x(%94*)اين زير عبارت با جمله (E3)ام 11در نسل

    ( ffi i t ) را توسط پياده سازي (sufficiency property)اهميت انتخاب مجموعه درست توابع.با سه مجموعه توابع نشان داده ايم (Sin(xكردن تابع

    .اجرا را تا زماني ادامه داده ايم كه ميزان حداقلي براي تناسب حاصل شود

  • Applying genetic programmingApplying genetic programmingApplying genetic programming Applying genetic programming technique in classification treestechnique in classification trees

    .براي حل مسائل طبقه بندي كردن بكار مي روند.براي جستجوي يك درخت طبقه بندي استفاده مي كنيم GPما از

    د د ن ل د ت ان ق از ا ه ه ا ت ا شد ل ا خت درخت حاصل شده را مي توان به مجموعه اي از قوانين تبديل نمود و در دknowledge base قرار داد.

    .دو عملگر ژنتيكي جديد را معرفي خواهيم كرد.نتايج را براي يك مسئله كارت اعتباري نشان خواهيم داد

    Classification for:Classification for:Knowledge discoveryBusiness decision-making

  • Applying genetic programmingApplying genetic programmingApplying genetic programming Applying genetic programming technique in classification treestechnique in classification trees

    Two main tasksTwo main tasksfinding classifiers: by adopting appropriate learning techniques on training data sets.l if i k d tclassifying unknown data

    knowledgeساخت يك متد كارا براي توليد خودكار قوانين طبقه بندي، نقش مهمي در tmanagementدارد.

    :در اين روش ما از عملگرهاي زير استفاده مي كنيمCrossover

    MutationElimination

    Merge

  • Applying genetic programmingApplying genetic programmingApplying genetic programming Applying genetic programming technique in classification treestechnique in classification trees

    :روش بكار رفته را در شكل روبرو نشان داده ايم

  • Applying genetic programmingApplying genetic programmingApplying genetic programming Applying genetic programming technique in classification treestechnique in classification trees

    The proposed algorithm:Input:

    a set of instances to be classified.Output:

    an appropriate classification tree.

  • Applying genetic programming Applying genetic programming technique in classification treestechnique in classification treesStep 1: Create an initial population of n randomly generated classification trees.

    Step 2: Evaluate the fitness value of each classification tree by an evaluation function and the set of instances.

    Step 3: Select suitable classification trees according to the evaluation results to perform the ffollowing genetic operations.

    Step 3.1: Perform crossover operations on parent trees to generate offspring trees.

    S 3 2 P f i i ff iStep 3.2: Perform mutation operations on parent trees to generate offspring trees.

    Step 3.3: Perform elimination operations on offspring trees to remove redundancy.

    St 3 4 P f ti ff i t t b tiStep 3.4: Perform merge operations on offspring trees to remove subsumption.

    Step 5: If the termination criterion is not satisfied, then go to Step 3; otherwise, do the next step.

    Step 6: Select the best classification tree with the highest fitness value from the population as the final classification tree.

  • Applying genetic programmingApplying genetic programmingApplying genetic programming Applying genetic programming technique in classification treestechnique in classification trees

    پس از مرحله ششم، درخت طبقه بندي نهايي را به مجموعه قوانين تبديل مي كنيم و در knowledge base قرار مي دهيم.

    ولي زمان اجرا . براي كاهش پيچيدگي درخت بكار مي روندeliminationوmergeعملگرهايا ا .افزايش مي يابدا

    جزئيات الگوريتم:توابع استفاده شده

  • Applying genetic programmingApplying genetic programmingApplying genetic programming Applying genetic programming technique in classification treestechnique in classification trees

    :مثال. كاربردي كه مثال مي زنيم در مورد درخواست براي كارت اعتباري است

    Two classes {disapproving, approving} represented as {R0, R1}, are to be distinguished by the three features {Job type, Education, Salary}.

    the feature of Job type has four possible values {laborer, low-level manager, middle-level manager, high-level manager} denoted {J0, J1, J2, J3}the feature of Education has four possible values {High school, College, p { g , g ,Master, Ph.D} denoted {E0, E1, E2, E3}the feature of Salary has four possible values {< 200 thousand (NT dollars), 200−490 thousand, 500−800 thousand, >800 thousand} denoted {S0, S1, S2 S3}S2, S3}.

  • Applying genetic programmingApplying genetic programmingApplying genetic programming Applying genetic programming technique in classification treestechnique in classification trees

    :داراي دو قانون زير باشد RSiبراي نشان دادن نمايش درختي، فرض كنيد كه مجموعه قوانين

    Rule1: If (Job type =middle-level manager) and (Education = Master) andRule1: If (Job type middle level manager) and (Education Master) and (Salary = 500 − 800 thousand) then Class is approving.Rule2: If (Job type = laborer) and (Education = College) and (Salary =

  • Applying genetic programmingApplying genetic programmingApplying genetic programming Applying genetic programming technique in classification treestechnique in classification trees

    :تابع تناسب.نياز به يك تابع تناسب مناسب براي كاركرد صحيح الگوريتم داريم

    ت صالح د تأي اي ب ا آموزش هاي نمونه از اي مجموعه و م كن م يف تع ا تناسب تابع يك تابع تناسب را تعريف مي كنيم و مجموعه اي از نمونه هاي آموزشي را براي تأييد صالحيت يك.كردن درختهاي طبقه بندي بكار مي بريم

    نمونه هاي آموزشي مواردي هستند كه در كاربرد نمونه بكار ميروند و مي توان آنها را از محيط .واقعي جمع آوري نمود و وري ع ج ي و

  • Applying genetic programmingApplying genetic programmingApplying genetic programming Applying genetic programming technique in classification treestechnique in classification trees

    .با استفاده از دو فرمول قبلي، تابع تناسب را به صورت زير تعريف مي كنيم

    :عملگرهاي ژنتيكي استفاده شده عبارتند از

    t ti crossover , mutation:دو عملگر اساسيmerge , elimination: دو عملگر جديد

  • Applying genetic programmingApplying genetic programmingApplying genetic programming Applying genetic programming technique in classification treestechnique in classification trees

    Crossover(1) Select a crossover point in one of the parents at random.

    (2) If the chosen point occurs at a rule boundary (“IF” node), the crossover point in the other parent tree must also be at a rule boundary Otherwise the point may be within a rule Theboundary. Otherwise, the point may be within a rule. The crossover point for the other parent must also be within a rule.

    (3) Exchange the two chosen parent subtrees,which consist of(3) Exchange the two chosen parent subtrees,which consist of the entire set of nodes below the crossover point, to generate two new offspring trees.

  • Applying genetic programmingApplying genetic programmingApplying genetic programming Applying genetic programming technique in classification treestechnique in classification trees

    Crossover

  • Applying genetic programmingApplying genetic programmingApplying genetic programming Applying genetic programming technique in classification treestechnique in classification trees

    MutationThe mutation operation is desired to help the evolving process escape from local optimum.

  • Applying genetic programmingApplying genetic programmingApplying genetic programming Applying genetic programming technique in classification treestechnique in classification trees

    Elimination.براي حذف افزونگي در زماني كه دو يا چند قانون مشابه در يك درخت وجود داشته باشد

    Let the classification tree to be processed be CTr with k rules. The steps for the elimination operation are shown as follows.

    (1) Set i = 1 and j = i + 1, where i and j are used to represent the numbers of the current two selected rules for checking.

    (2) Compare Ruleri with Ruler j for their feature values and classes.

    (3) If the two rules have the same values, they are redundant. Remove the deeper redundant rule from the classification tree CTr .

    (4) Set j = j + 1. (5) If j > k, then do the next step; otherwise, go to step (2).

    (6) Set j = i + 2 and i = i + 1.

    (7) If i = k, then exit the searching process; otherwise, go to step (2).

  • Applying genetic programmingApplying genetic programmingApplying genetic programming Applying genetic programming technique in classification treestechnique in classification trees

    Elimination

  • Applying genetic programmingApplying genetic programmingApplying genetic programming Applying genetic programming technique in classification treestechnique in classification trees

    MergeMerge.براي كاهش پيچيدگي درخت استفاده مي شود

    Let the classification tree to be processed be CTs with q rules. The steps for the merge operation are shown as follows.merge operation are shown as follows.

    (1) Set i = 1 and j = i + 1, where i and j are used to represent the numbers of the current two selected rules for checking.

    (2) C R l i ith R l j f th i f t l d l(2) Compare Rule si with Rule sj for their feature values and classes.

    (3) If the two rules have the same classes and the feature values of a rule is a subset of those in the other one, remove the rule with more features from the classification tree CTs .

    (4) Set j = j + 1.

    (5) If j > q, then do the next step; otherwise, go to step (2).

    (6) Set j = i + 2 and i = i + 1(6) Set j = i + 2 and i = i + 1.

    (7) If i = q, then exit the searching process; otherwise, go to step (2).

  • Applying genetic programmingApplying genetic programmingApplying genetic programming Applying genetic programming technique in classification treestechnique in classification trees

    Merge

  • Applying genetic programmingApplying genetic programmingApplying genetic programming Applying genetic programming technique in classification treestechnique in classification trees

    نتايج عملي.در اين بخش از مجموعه اي از داده ها براي كاربردي كه در آن كارت اعتباري درخواست شده، استفاده شده است

    د687 آ ت د ه ا تا د انك از نه ن د .مورد نمونه از بانكي در تايوان به دست آمده687.مي باشد approve , disapproveو دو كالس feature 14اين موارد شامل

    هدف پيدا كردن يك درخت طبقه مناسب بوده كه بتواند به مجموعه اي از قوانين تبديل بشود كه توسط آنها بتوانيم م كن ن مع ده ك ي ا اعت ت كا خواست د كه دي ف اي ب ا كالس دو از .يكي از دو كالس را براي فردي كه درخواست كارت اعتباري كرده معين كنيميك

    .مورد را ابتدا به دو دسته تقسيم كرده ايم، دسته اول براي پرورش درختها و دومي براي تست كردن 687اين .از دسته اول براي ارزيابي مقدار تناسب درختها استفاده شده است

    شده استفاده نهاي جه نت دن ك ت ت اي ب دوم دسته .از دسته دوم براي تست كردن نتيجه نهايي استفاده شدهاز.از موارد براي تست استفاده شده است% 30موارد براي ارزيابي تناسب و % 70

    .نسل، روش پيشنهاد شده دقتي برابر با جدول زير را به دست آورده است 500پس از

  • Applying genetic programmingApplying genetic programmingApplying genetic programming Applying genetic programming technique in classification treestechnique in classification trees

    .دارد quinlanو روش kozaمشاهده مي شود كه روش ارائه شده، كارايي باالتر از روش

    .پس توانستيم متد كارامدي براي توليد يك درخت طبقه بندي مناسب پبدا كنيم

    اما اين به قيمت. موجب شد كه روابط بين قوانين را نيز در نظر بگيريم merge , eliminationاستفاده از عملگرهاي .زمان پردازش بيشتر است

    .در آينده مي توان بر روي تابع تناسب بهتري كار كرد تا دقت باالتري را به دست آوريم

  • R fR f ReferencesReferences[1] John R. Koza, “GENETIC PROGRAMMING: A PARADIGM FOR GENETICALLY BREEDING POPULATIONS OF COMPUTER PROGRAMS TO SOLVE PROBLEMS”, Computer Science Department, Stanford University, Margaret Jacks Hall Stanford, CA 94305

    [2] S. Settea,, L. Boullart, “Genetic programming: principles and applications” ,Elsevier, Engineering Applications of Artificial Intelligence 14 (2001) 727–736

    [3] Ch Sh K T P i Ch L Ch H “A l[3] Chan-Sheng Kuo, Tzung-Pei, Chuen-Lung Chen Hong, “Applying genetic programming technique in classification trees” Springer-Verlag 2007

    [4] Matthew Walker, “Introduction to Genetic Programming”, October 7, 2001[ ] , g g , ,

    [5] “Executional Steps of Genetic Programming”, http://www.genetic-programming.com/gpanimatedtutorial.html