SlideShare a Scribd company logo
1 of 19
10. 진화학습
알고리즘 중심의 머신러닝 가이드
아꿈사 스터디, 정민철(CCC612@GMAIL.COM)
진화학습 개요
▸ 진화: 탐색문제
▸ 적자생존 법칙 - 더 오래살고, 자손을 많이 남긴다.
▸ 유전알고리즘
▸ 진화를 일으키는 유전 과정을 모델링 (교배, 돌연변이 등)
▸ 탐험과 탐색을 동시 수행
▸ 탐험: 새로운 해를 얻기위해 임의의 위치를 시도해보는 것
▸ 탐색: 최적해를 얻기위해 해가 있으리라 생각되는 부분으로 가는 것
▸ 확률 알고리즘 (Stochastic algorithm)
유성생식 과정
유전 알고리즘
▸ 진화 프로세스를 통해 탐색을 수행하는 알고리즘
▸ 문제의 해결 방법을 염색체로 표현
▸ 각 개체의 적합성 평가 기준 설정 => 개체 우수성 검증
▸ 여러가지 방법으로 부모를 선택
▸ 선택된 부모들의 교배를 통해 자손 생성
▸ 여러가지 방법을 통해 개체 수 유지 방법 적용
기본 유전 알고리즘
예제 - 배낭 문제 (KNAPSACK PROBLEM)
▸ 크기가 제한된 배낭에 효율을 극대화 해서 물건을 넣는 방법은?
▸ NP-complete 문제: 컴퓨터로 유한 시간안에 풀기 어려움
▸ 유전 알고리즘 해법: 최적은 아니지만 쓸만한 결과를 도출
유전 알고리즘을 이용한 배낭 문제 해결
▸ 표현: 가방에 집어넣을 물건을 2진수로 표현 (e.g. 1 0 1 1 0 0)
▸ 적합성 평가 방법
▸ 배낭에 들어간 가치의 합
▸ 배낭의 크기를 넘치면 넘친 양의 두배를 제외
▸ 초기화: 무작위로 개체 생성
▸ 개체수: 얼마나 자손을 남길 것 인가?
부모 선택
▸ 토너먼트 선택법: 가장 적합성이 큰 2개를 선택
▸ 절단 선택법: 적합도가 높은것을 기준으로 정렬하여 상위 X% 선택
▸ 적합도 비례 선택법: 확률적으로 적합성이 높은 부모가 더 자주 선택되
도록 설정
▸ 룰렛 선택법: 룰렛 영역의 크기를 빈도수에 비례하게 설정
자손 만들기
▸ 부모를 어떻게 합성해서 자손을 만들것인가?
▸ 크로스오버 기법: 무작위로 선정한 위치를 기준으로 교배
▸ 단일점 크로스오버, 다점 크로스오버, 유니폼 크로스오버
▸ 문제에 따라 적절하지 않을 경우가 있음 (세일즈맨 문제)
돌연변이
▸ 목적: 지역 무작위 탐색
▸ 자손 생성 후 확률적으로 요소가 변경되게 함
▸ 지역 최적화에서 빠져나올 수 있는 실마리 제공
개체수 유지 방법
▸ 자녀만 다음세대로 만들기: 좋은 부모 개체를 놓칠 위험이 있음
▸ 정예주의: 적합도가 높은 개체를 다음 세대에 바로 적용
▸ 토너먼트: 부모와 자녀 중 적합도가 가장 높은 2명 생존
▸ 둘다 조기수렴의 위험이 있음 (다양성이 줄어든다)
▸ 조기수렴 방지 기법
▸ 틈새: 몇개의 독립 그룹을 만들어 진화를 수행하고 서로 개체 교환
▸ 적합공유: 적합도를 개체 평균에 멀수록 높게 설정
멈춤조건
▸ 주어진 최대 시간 초과
▸ 주어진 최대 세대 초과
▸ 여러 세대에 걸쳐 새로운 해가 발생하지 않음
▸ 여러 세대에 걸쳐 평균 적합도가 향상되지 않음
예제 - 지도색칠
▸ 문제 정의: k개의 색을 가지고 지도를 색칠, 인접한 칸은 서로 다른색
▸ 코드화: 각 지역의 색을 string으로 표현 (예 - bdblbb)
▸ 적합도 함수: 근접한 두 지역이 같은/다른 색을 갖는 갯수
▸ 유전자 선택: 크로스오버와 돌연변이 이용
예제 - 지도색칠
▸ 돌연변이와 교배
▸ 자손 남기기
GA의 장단점
▸ 장점
▸ 적당한 시간에 적당한 수준의 해를 기대할 수 있음
▸ 문제에 대한 제약 조건이 적고 응용 범위가 넓음
▸ 기존 알고리즘 대비 성능이 좋음 (탐색공간이 커질수록 우수함)
▸ 단점
▸ 수행할 때마다 다른 해를 낼 수 있음 (확률적 알고리즘)
▸ 실시간 환경에서는 활용이 어려움 (오프라인 학습)
▸ 얼마나 잘 수행되고 있는지 알 수 없다.
▸ 수렴한다고 보장할 수 없음
GA를 사용한 NN 트레이닝
▸ MLP(Multi-layer Perceptron)에서 사용가능
▸ weight string으로 유전자를 표현
▸ 제곱합 오류를 이용해 유전자 평가
▸ 단점
▸ 네트워크 출력의 유용한 정보를 잃게 만듬
▸ 기울기 정보를 무시
▸ 합리적 활용 방법: GA를 사용해 네트워크의 위상 선택
유전 프로그래밍
▸ 컴퓨터 프로그램을 트리로 표현 (보통 Lisp 으로 구현)
▸ 돌연변이: 무작위 트리와 교체됨
▸ 크로스오버: 특정 지점의 child노드를 교환
▸ 단점
▸ 탐색 공간이 넓다
▸ 돌연변이 연산자가 유용하지 않다.
▸ 초기 개체수에 많은 사항이 종속된다.
유전 프로그래밍
▸ 돌연변이
▸ 크로스오버
샘플링과 유전학습 접합하기
▸ PBIL (Population-Based Incremental Learning)
▸ 개체를 유지하는 대신 각 요소가 0/1의 값을 갖게 함
▸ 각 요소에 확률벡터를 적용해 0 또는 1이 될 확률을 기반으로 개체
를 생성함
▸ 생성된 개체를 기반으로 확률벡터를 조정함
▸ 각 요소간 체인을 만들어 변수간의 관련성을 고려하게 만들 수 있음
▸ 장점: 동작을 해석하기 쉽게 만들어줌

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

10장 진화학습

  • 1. 10. 진화학습 알고리즘 중심의 머신러닝 가이드 아꿈사 스터디, 정민철(CCC612@GMAIL.COM)
  • 2. 진화학습 개요 ▸ 진화: 탐색문제 ▸ 적자생존 법칙 - 더 오래살고, 자손을 많이 남긴다. ▸ 유전알고리즘 ▸ 진화를 일으키는 유전 과정을 모델링 (교배, 돌연변이 등) ▸ 탐험과 탐색을 동시 수행 ▸ 탐험: 새로운 해를 얻기위해 임의의 위치를 시도해보는 것 ▸ 탐색: 최적해를 얻기위해 해가 있으리라 생각되는 부분으로 가는 것 ▸ 확률 알고리즘 (Stochastic algorithm)
  • 4. 유전 알고리즘 ▸ 진화 프로세스를 통해 탐색을 수행하는 알고리즘 ▸ 문제의 해결 방법을 염색체로 표현 ▸ 각 개체의 적합성 평가 기준 설정 => 개체 우수성 검증 ▸ 여러가지 방법으로 부모를 선택 ▸ 선택된 부모들의 교배를 통해 자손 생성 ▸ 여러가지 방법을 통해 개체 수 유지 방법 적용
  • 6. 예제 - 배낭 문제 (KNAPSACK PROBLEM) ▸ 크기가 제한된 배낭에 효율을 극대화 해서 물건을 넣는 방법은? ▸ NP-complete 문제: 컴퓨터로 유한 시간안에 풀기 어려움 ▸ 유전 알고리즘 해법: 최적은 아니지만 쓸만한 결과를 도출
  • 7. 유전 알고리즘을 이용한 배낭 문제 해결 ▸ 표현: 가방에 집어넣을 물건을 2진수로 표현 (e.g. 1 0 1 1 0 0) ▸ 적합성 평가 방법 ▸ 배낭에 들어간 가치의 합 ▸ 배낭의 크기를 넘치면 넘친 양의 두배를 제외 ▸ 초기화: 무작위로 개체 생성 ▸ 개체수: 얼마나 자손을 남길 것 인가?
  • 8. 부모 선택 ▸ 토너먼트 선택법: 가장 적합성이 큰 2개를 선택 ▸ 절단 선택법: 적합도가 높은것을 기준으로 정렬하여 상위 X% 선택 ▸ 적합도 비례 선택법: 확률적으로 적합성이 높은 부모가 더 자주 선택되 도록 설정 ▸ 룰렛 선택법: 룰렛 영역의 크기를 빈도수에 비례하게 설정
  • 9. 자손 만들기 ▸ 부모를 어떻게 합성해서 자손을 만들것인가? ▸ 크로스오버 기법: 무작위로 선정한 위치를 기준으로 교배 ▸ 단일점 크로스오버, 다점 크로스오버, 유니폼 크로스오버 ▸ 문제에 따라 적절하지 않을 경우가 있음 (세일즈맨 문제)
  • 10. 돌연변이 ▸ 목적: 지역 무작위 탐색 ▸ 자손 생성 후 확률적으로 요소가 변경되게 함 ▸ 지역 최적화에서 빠져나올 수 있는 실마리 제공
  • 11. 개체수 유지 방법 ▸ 자녀만 다음세대로 만들기: 좋은 부모 개체를 놓칠 위험이 있음 ▸ 정예주의: 적합도가 높은 개체를 다음 세대에 바로 적용 ▸ 토너먼트: 부모와 자녀 중 적합도가 가장 높은 2명 생존 ▸ 둘다 조기수렴의 위험이 있음 (다양성이 줄어든다) ▸ 조기수렴 방지 기법 ▸ 틈새: 몇개의 독립 그룹을 만들어 진화를 수행하고 서로 개체 교환 ▸ 적합공유: 적합도를 개체 평균에 멀수록 높게 설정
  • 12. 멈춤조건 ▸ 주어진 최대 시간 초과 ▸ 주어진 최대 세대 초과 ▸ 여러 세대에 걸쳐 새로운 해가 발생하지 않음 ▸ 여러 세대에 걸쳐 평균 적합도가 향상되지 않음
  • 13. 예제 - 지도색칠 ▸ 문제 정의: k개의 색을 가지고 지도를 색칠, 인접한 칸은 서로 다른색 ▸ 코드화: 각 지역의 색을 string으로 표현 (예 - bdblbb) ▸ 적합도 함수: 근접한 두 지역이 같은/다른 색을 갖는 갯수 ▸ 유전자 선택: 크로스오버와 돌연변이 이용
  • 14. 예제 - 지도색칠 ▸ 돌연변이와 교배 ▸ 자손 남기기
  • 15. GA의 장단점 ▸ 장점 ▸ 적당한 시간에 적당한 수준의 해를 기대할 수 있음 ▸ 문제에 대한 제약 조건이 적고 응용 범위가 넓음 ▸ 기존 알고리즘 대비 성능이 좋음 (탐색공간이 커질수록 우수함) ▸ 단점 ▸ 수행할 때마다 다른 해를 낼 수 있음 (확률적 알고리즘) ▸ 실시간 환경에서는 활용이 어려움 (오프라인 학습) ▸ 얼마나 잘 수행되고 있는지 알 수 없다. ▸ 수렴한다고 보장할 수 없음
  • 16. GA를 사용한 NN 트레이닝 ▸ MLP(Multi-layer Perceptron)에서 사용가능 ▸ weight string으로 유전자를 표현 ▸ 제곱합 오류를 이용해 유전자 평가 ▸ 단점 ▸ 네트워크 출력의 유용한 정보를 잃게 만듬 ▸ 기울기 정보를 무시 ▸ 합리적 활용 방법: GA를 사용해 네트워크의 위상 선택
  • 17. 유전 프로그래밍 ▸ 컴퓨터 프로그램을 트리로 표현 (보통 Lisp 으로 구현) ▸ 돌연변이: 무작위 트리와 교체됨 ▸ 크로스오버: 특정 지점의 child노드를 교환 ▸ 단점 ▸ 탐색 공간이 넓다 ▸ 돌연변이 연산자가 유용하지 않다. ▸ 초기 개체수에 많은 사항이 종속된다.
  • 19. 샘플링과 유전학습 접합하기 ▸ PBIL (Population-Based Incremental Learning) ▸ 개체를 유지하는 대신 각 요소가 0/1의 값을 갖게 함 ▸ 각 요소에 확률벡터를 적용해 0 또는 1이 될 확률을 기반으로 개체 를 생성함 ▸ 생성된 개체를 기반으로 확률벡터를 조정함 ▸ 각 요소간 체인을 만들어 변수간의 관련성을 고려하게 만들 수 있음 ▸ 장점: 동작을 해석하기 쉽게 만들어줌