brunch

You can make anything
by writing

C.S.Lewis

by 라인하트 Sep 22. 2020

앤드류 응의 머신러닝 (1-2) : 머신러닝의 정의

   온라인 강의 플랫폼 코세라의 창립자인 앤드류 응 (Andrew Ng) 교수는 인공지능 업계의 거장입니다. 그가 스탠퍼드 대학에서 머신 러닝 입문자를 위한 강의를 그대로 코세라 온라인 강의 (Coursera.org)에서 무료로 배울 수 있습니다. 이 강의는 머신러닝 입문자들의 필수코스입니다. 인공지능과 머신러닝을 혼자 공부하면서 자연스럽게 만나게 되는 강의입니다. 강의를 간략하게 정리합니다. 


Welcome

환영


Introduction (소개)


What is Learning Machine? (머신 러닝이란 무엇인가?)


   What is machine learning? In this video, we will try to define what it is and also try to give you a sense of when you want to use machine learning. Even among machine learning practitioners, there isn't a well accepted definition of what is and what isn't machine learning. But let me show you a couple of examples of the ways that people have tried to 

define it.


   머신러닝(기계학습)이란 무엇일까요? 이번 강의에서 우리는 머신러닝을 정의하고 언제 머신러닝을 사용하면 좋을지를 알아볼 것입니다. 머신러닝 전문가들 사이에서 무엇이 머신 러닝이고, 무엇이 머신 러닝이 아닌 지 합의가 이루어지지 않았습니다. 하지만, 몇몇 전문가들이 머신러닝을 정의하였습니다. 



   Here's a definition of what is machine learning as due to Arthur Samuel. He defined machine learning as the field of study that gives computers the ability to learn without being explicitly learned. Samuel's claim to fame was that back in the 1950, he wrote a checkers playing program and the amazing thing about this checkers playing program was that Arthur Samuel himself wasn't a very good checkers player. But what he did was he had to programmed maybe tens of thousands of games against himself, and by watching what sorts of board positions tended to lead to wins and what sort of board positions tended to lead to losses, the checkers playing program learned over time what are good board positions and what are bad board positions. And eventually learn to play checkers better than the Arthur Samuel himself was able to. This was a remarkable result. Arthur Samuel himself turns out not to be a very good checkers player. But because a computer has the patience to play tens of thousands of games against itself, no human has the patience to play that many games. By doing this, a computer was able to get so much checkers playing experience that it eventually became a better checkers player than Arthur himself. This is a somewhat informal definition and an older one.


   우선, 아서 사무엘은 머신러닝을 다음과 같이 정의하였습니다. "머신러닝이란 컴퓨터가 명시적인 프로그램이 없어도 스스로 학습할 수 있는 능력을 연구하는 학문이다." 사무엘은 1950년에 체커 게임을 하는 프로그램을 개발하면서 유명해졌습니다. 놀라운 점은 아서 사무엘은 체커 게임을 잘하지 못했지만 잘하는 방법을 설계하였습니다. 그러나, 그는 프로그램이 스스로 게임을 수 만 번 반복 수행하도록 프로그래밍하였습니다. 프로그램은 칩이 어떤 위치에 있으면 지는 경향이 있고 칩이 어떤 위치에 있으면 이기는 경향이 있는 지를 알게 되었습니다. 체커 게임 프로그램은 반복을 거듭하면서 무엇이 좋은 위치고 무엇이 나쁜 위치인지를 배웠습니다. 그리고, 결국 체커 게임 프로그램은 아서보다 더 잘하게 되었습니다. 정말 놀라운 결과입니다. 아서 사무엘은 체커 게임을  잘하지 못했습니다. 그러나, 컴퓨터는 인간이 없는 수 만 번 게임을 반복할 끈기가 있었습니다. 컴퓨터는 수많은 체커 게임 경험을 축적하였기 때문에 결국 아서 보다 더 나은 체커 플레이어가 되었습니다. 사무엘의 정의는 다소 비공식적이고 오래된 정의입니다. 


머신러닝이란 컴퓨터가 명시적인 프로그램이 없어도 스스로 학습할 수 있는 능력을 연구하는 학문이다.



    Here's a slightly more recent definition by Tom Mitchell who's a friend of Carnegie Melon. So Tom defines machine learning by saying that a well-posed learning problem is defined as follows. He says, a computer program is said to learn from experience E with respect to some task T and some performance measure P, if its performance on T, as measured by P, improves with experience E. I actually think he came out with this definition just to make it rhyme. For the checkers playing examples, the experience E would be the experience of having the program play tens of thousands of games itself. The task T would be the task of playing checkers, and the performance measure P will be the probability that wins the next game of checkers against some new opponent.


   여기 카네기 멜론 대학교의 톰 미셀 교수가 내린 좀 더 최근의  정의가 있습니다. 톰은 머신 러닝을 다음과 같이 정의했습니다. 그는 머신러닝을 학습 과제 중심으로 정의합니다. "프로그램은 경험(E)으로부터 학습한다.  프로그램이 일정 수준의 성능 측정(P)을 가지고 작업(T)을 수행한다고 했을 때, 경험(E)이 증가함에 따라 작업(T)을 수행하는 성능(P)이 향상될 수 있다" 제 생각에 그는 이 정의에 운율을 맞추려고 했던 것 같습니다. 체커 게임 예를 보면, 경험 E는 프로그램이 수만 번의 게임을 반복하는 경험이고, 작업 T는 체커 게임을 하는 작업이고, 성능 측정 P는 프로그램이 다음 판에서 이길 확률입니다. 



 "프로그램은 경험(E)으로부터 학습한다.  프로그램이 일정 수준의 작업 성능(P)을 가지고 작업(T)을 수행한다고 했을 때, 경험(E)이 증가함에 따라 작업(T)을 수행하는 성능(P)이 향상될 수 있다"



   Throughout these videos, besides me trying to teach you stuff, I'll occasionally ask you a question to make sure you understand the content. Here's one.


   이 강의에서 여러분을 가르치는 것 외에도, 여러분들이 콘텐츠를 이해하고 있는지 확인하기 위해 때때로 문제를 낼 것입니다. 여기 문제가 있네요


   On top is a definition of machine learning by Tom Mitchell. Let's say your email program watches which emails you do or do not mark as spam. So in an email client like this, you might click the Spam button to report some email as spam but not other emails. And based on which emails you mark as spam, say your email program learns better how to filter spam email. What is the task T in this setting? 

In a few seconds, the video will pause and when it does so, you can use your mouse to select one of these four radio buttons to let me know which of these four you think is the right answer to this question.


   상단에는 머신 러닝에 대한 톰 미셀의 정의가 있습니다.  이메일 프로그램은 당신이 어떤 이메일을 스팸으로 마크하는지 안 하는 지를 지켜본다고 가정합시다. 이런 이메일 클라이언트가 있을 때, 여러분은 이메일을 스팸으로 처리하는 버튼을 클릭하여 신고합니다. 여러분이 스팸으로 마크한 이메일들에 기반하여 이메일 프로그램은 스팸 이메일을 더 잘 제거하는 법을 배웁니다. 이 설정에서 작업 T는 무엇일까요? 몇 초안에 영상이 멈출 때, 마우스를 이용하여 4개의 라디오 버튼 중에 하나를 선택하시기 바랍니다. 어떤 예제가 정답인지 저에게 알려주세요


   So hopefully you got that this is the right answer, classifying emails is the task T. In fact, this definition defines a task T performance measure P and some experience E. And so, watching you label emails as spam or not spam, this would be the experience E and and the fraction of emails correctly classified, that might be a performance measure P. And so on the task of systems performance, on the performance measure P will improve after the experience E.


   여러분이 정답을 찾으셨길 바랍니다. 이메일을 스팸으로 분류하는 것이 작업 T입니다. 경험 E와 성능 측정 T도 찾아봅시다. 컴퓨터가 당신이 이메일을 스팸 및 정상으로 분류하는 것을 관찰하는 것은 경험 E입니다.  올바르게 스팸으로 분류된 이메일의 수는 성능 측정 P입니다.  따라서, 이메일 시스템은 경험 E가 증가함에 따라 작업 T를 수행하는 성능 측정 P가 향상될 것입니다.



   In this class, I hope to teach you about various different types of learning algorithms. There are several different types of learning algorithms. The main two types are what we call supervised learning and unsupervised learning. I'll define what these terms mean more in the next couple videos. It turns out that in supervised learning, the idea is we're going to teach the computer how to do something. Whereas in unsupervised learning, we're going to let it learn by itself. Don't worry if these two terms don't make sense yet. In the next two videos, I'm going to say exactly what these two types of learning are.


   이 강의에서, 여러분에게 다양한 타입의 학습 알고리즘을 가르치길 바랍니다. 주요한 두 가지는 지도 학습과 비지도 학습입니다. 이 용어들이 정확히 무엇을 의미하는지는 나중에 다루겠습니다. 지도 학습은 작업을 수행하는 방법을 가르는 것이고, 반면에 비지도 학습은 인공지능이 스스로 학습하게 합니다. 두 용어를 잘 몰라도 걱정하지 마세요. 다음 두 개의 영상에서 지도 학습과 비지도 학습에 대해 자세히 설명할 것입니다. 



    You might also hear other ghost terms such as reinforcement learning and 

recommender systems. These are other types of machine learning algorithms that we'll talk about later. But the two most use types of learning algorithms are probably supervised learning and unsupervised learning. And I'll define them in the next two videos and we'll spend most of this class talking about these two types of learning algorithms.


   강화 학습과 추천 시스템과 같은 용어들도 들어 보셨을 것입니다. 이것들도 우리가 배울 학습 알고리즘입니다. 그러나, 가장 많이 사용되는 두 가지 학습 알고리즘은 아마도 지도 학습과 비지도 학습입니다. 지도 학습과 비지도 학습 알고리즘은 다음 두 강의에서 자세히 정의하겠습니다.


    It turns out what are the other things to spend a lot of time on in this class is practical advice for applying learning algorithms. This is something that I feel pretty strongly about. And exactly something that I don't know if any other university teachers. Teaching about learning algorithms is like giving a set of tools. And equally important or more important than giving you the tools as they teach you how to apply these tools. I like to make an analogy to learning to become a carpenter. Imagine that someone is teaching you how to be a carpenter, and they say, here's a hammer, here's a screwdriver, here's a saw, good luck. Well, that's no good. You have all these tools but the more important thing is to learn how to use these tools properly.


   이 강의에서 학습 알고리즘을 적용하기 위한 실무를 다룰 것입니다. 저는 실무를 강조합니다. 다른 대학의 교수들도 그렇게 하는지 아닌지는 정확히 모르겠습니다. 학습 알고리즘을 가르치는 것은 여러분에게 도구를 주는 것과 같습니다. 어쩌면 도구 그 자체보다 더 중요한 것은 도구를 잘 사용하는 방법을 가르치는 것입니다. 배움은 목수가 되는 것과 같습니다. 누군가 당신에게 목수가 되는 법을 가르친다고 상상해 봅시다. 그들은 당신에게 '여기 망치, 드라이버, 톱이 있다. 행운을 빈다'라고 말한다면, 좋지 않습니다. 당신은 모든 도구가 있지만 더 중요한 것은 그것을 적절하게 사용하는 법을 배우는 것입니다. 




   There's a huge difference between people that know how to use these machine 

learning algorithms, versus people that don't know how to use these tools well. 

Here, in Silicon Valley where I live, when I go visit different companies even at the top Silicon Valley companies, very often I see people trying to apply machine learning algorithms to some problem and sometimes they have been going at for six months. But sometimes when I look at what they're doing, I say, I could have told them like, gee, I could have told you six months ago that you should be taking a learning algorithm and applying it in like the slightly modified way and your chance of success will have been much higher. 


   머신 러닝 알고리즘을 사용하는 법을 아는 사람과 모르는 사람들 간에는 엄청난 차이가 있습니다. 제가 살고 있는 여기 실리콘 밸리에는 유명한 회사가 많습니다. 제가 여러 회사를 방문할 때마다 저는 어떤 문제에 머신 러닝 알고리즘을 적용하려고 6개월이나 별다른 성과 없이 고민하는 사람들을 봅니다. 제가 그들이 하는 것을 볼 때 답답하기도 합니다. 제가 6개월 전에 그들이 학습 알고리즘을 고민할 때 약간 변형된 방법으로 적용했어야만 했다고 말했어야만 했을지도 모릅니다.  그렇다면 성공할 확률이 훨씬 높았을 것입니다. 


   So what we're going to do in this class is actually spend a lot of the time talking about how  if you're actually trying to develop a machine learning system, how to make those best practices type decisions about the way in which you build your system. So that when you're finally learning algorithim, you're less likely to end up one of those people who end up persuing something after six months that someone else could have figured out just a waste of time for six months. So I'm actually going to spend a lot of time teaching you those sorts of best practices in machine learning and AI and how to get the stuff to work and how the best people do it in Silicon Valley and around the world. I hope to make you one of the best people in knowing how to design and build serious machine learning and AI systems. 


   그래서, 우리 강의에서는 실무를 더 많이 다루려고 합니다. 만일 머신 러닝 시스템을 개발하려고 한다면, 어떻게 접근해야 최적화된 시스템을 만들 수 있을지 고민해야 합니다. 그래서, 당신이 실무를 시작했을 때, 다른 사람이 순식간에 해결할 수 있는 문제를 6개월 동안 붙잡고 있는 참사가 일어나지 않을 것입니다. 저는 머신러닝과 인공지능 분야의 모범 사례와 실리콘 밸리를 비롯한 전 세계에서 최고의 인재들이 어떻게 일하는 지를 알려드리겠습니다. 여러분이 중요한 머신러닝과 인공지능 시스템을 구축 및 설계 분야에서 최고 중에 하나가 되길 바랍니다.  


   So that's machine learning, and these are the main topics I hope to teach. In the next video, I'm going to define what is supervised learning and after that what is unsupervised learning. And also time to talk about when you would use each of them.


   이것이 제가 가르치길 바라는 머신 러닝의 주요 주제입니다. 다음 강의에서는 지도 학습과 비지도 학습을 정의할 것입니다. 그리고, 여러분이 그것을 언제 사용할 수 있을지를 이야기하겠습니다. 




정리하며 


  머신러닝을 다음과 같이 정의합니다.  


1) 아서 사무엘의 정의 

     "the filed of study that gives computers the ability to learn without being explicitly programmed


      "머신러닝이란 컴퓨터가 명시적인 프로그램이 없어도 스스로 학습할 수 있는 능력을 연구하는 학문"


   아서 사무엘은 1950년에 체커 게임 프로그램을 만들었습니다. 체커 게임 프로그램은 스스로 수만 번의 게임을 하면서 이길 수 있는 위치와 질 수 있는 위치를 계산하였습니다. 사람은 수 만 번을 반복하면서 게임하는 끈기 없지만, 컴퓨터는 있습니다. 체커 게임 프로그램은 수많은 체커 게임 경험을 축적하면서 아서보다 뛰어난 체커 게임 플레이어가 되었습니다. 



2) 탐 미셀의 정의

    " A compter program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E"


     "프로그램은 경험(E)으로부터 학습한다.  프로그램이 일정 수준의 성능 측정(P)을 가지고 작업(T)을 수행한다고 했을 때, 경험(E)이 증가함에 따라 작업(T)을 수행하는 성능(P)이 향상될 수 있다"


   이메일 클라이언트의 스팸 필터를 탐 미셀의 정의대로 구분해 봅시다. 

    경험 E : 스팸 필터가 당신이 이메일을 스팸 및 정상으로 분류하는 것을 관찰하는 것

    작업 T : 스팸 필터가 이메일을 분류하는 것

    성능 P :  올바르게 스팸으로 분류된 이메일의 수는 성능을 측정하는 P



   체커 게임 프로그램을 탐 미셀의 정의대로 구분해 봅시다. 

     - 경험 E : 프로그램이 수만 번의 체커 게임을 하는 것 

     - 작업 T : 체커 게임을 하는 것

     - 성능 P : 프로그램이 다음 게임에서 이길 확률



정리하며 - 다양한 종류의 학습 알고리즘 개요  

   주요 학습 알고리즘은 크게 세 가지로 나눌 수 있습니다.

 

1) 지도 학습 (Supervised Learning)

   지도 학습은 인공 지능이 정답을 가지고 있는 데이터 셋을 통해 학습합니다. 예를 들어, 고양이와 개의 사진을 구분하는 프로그램은 고양이와 개 사진 수만 장으로 배웁니다. 그리고 실제로 사진을 보면서 구분합니다. 



2) 비지도 학습(Unsupervised Learning)

   비지도 학습은 인공지능이 정답이 없는 데이터 셋을 통해 스스로 학습합니다. 


3) 강화 학습(Reinforcement Learning)
   강화 학습은 인공지능이 데이터 없이 시행착오를 통해 학습합니다. 행동에 따른 보상이 최대화가 되는 방향으로 학습이 진행됩니다.

  

   앤드류 응은 머신 러닝 강의를 설명하기 위해 목수를 가르치는 법에 대해 이야기합니다. 머신 러닝을 배우는 것은 목수가 되는 것과 같습니다. 목수가 되고자 하는 사람에게 망치와 톱을 주는 것보다 더 중요한 것은 망치와 톱을 사용하는 법을 가르치는 것입니다. 이 강의는 알고리즘만을 가르치는 것이 아니라 알고리즘을 잘 사용하는 법을 가르칠  설명할 것입니다.



문제풀이


   탐 미셀의 정의에 따라 이메일 프로그램은 스팸으로 표시한 이메일과 표시하지 않은 이메일을 관측합니다. 이메일 프로그램은 학습을 통해 더 나은 스팸 필터링을 할 것입니다. 다음 중 작업  T는 무엇입니까?



정답은 1번입니다. 

매거진의 이전글 앤드류 응의 머신러닝 (1-1) : 머신러닝 사례
작품 선택
키워드 선택 0 / 3 0
댓글여부
afliean
브런치는 최신 브라우저에 최적화 되어있습니다. IE chrome safari