반응형
블로그 이미지
개발자로서 현장에서 일하면서 새로 접하는 기술들이나 알게된 정보 등을 정리하기 위한 블로그입니다. 운 좋게 미국에서 큰 회사들의 프로젝트에서 컬설턴트로 일하고 있어서 새로운 기술들을 접할 기회가 많이 있습니다. 미국의 IT 프로젝트에서 사용되는 툴들에 대해 많은 분들과 정보를 공유하고 싶습니다.
솔웅

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함

카테고리


반응형

제 블로그의 IoT - AI 섹션에 Elements of AI 로 시작하는 모든 글들은 헬싱키 대학의 인공지능 온라인 수업을 번역해 놓은 겁니다.


이 온라인 수업은 무료이고 핀란드에 있는 대학에서는 정식 학점으로 인정되는 코스입니다. 코스를 완료해서 Certification을 따면 말이죠.


핀란드에 있지 않아도 LinkedIn 의 자격증 란에 넣을 수 있으니까 구직 활동시 조금이라도 도움이 되지 않을까요?


이 코스를 다 마치면 아래와 같은 자격증을 받게 됩니다.






모두 영어로 되어 있어서 영어를 모르면 따라가기 힘들 수 있습니다.

그럴 때 제가 번역해 놓은 글들을 읽으시면서 이해하시면 도움이 될 겁니다.


그 글들만 이해 된다면 수업을 따라가는데는 크게 어려움은 없습니다.

그리고 수업을 다 끝마치면 인공지능에 대해 어느 정도 이해력이 올라갈 겁니다.

물론 강좌 수준은 전문가용이 아니라 일반 대중에게 필요한 인공지능 지식을 쉽게 설명하는 내용들 입니다.


6주 동안 공부하면서 제가 이해하기 위해 번역해서 하나 하나 올렸습니다.

올리고 나니 이 강좌를 수강을 원하는 다른 분들에게도 도움이 될 것 같아서 이렇게 소개 글을 추가해서 올리게 됐습니다.


총 6개 챕터가 있고 각 챕터당 3개의 강좌가 있으니까 총 18개의 강좌가 있습니다.

그리고 각 강좌 마지막에 한 두개 많게는 4개의 문제가 있습니다.


전체 강좌 중 90%를 완료하고 전체 문제 중 50% 이상을 맞추면 자격증을 받게 됩니다.


서술형 주관식이 있는데 딱히 어느 언어로 작성하라는 얘기는 없지만 영어로 작성하는게 좋을 겁니다.

(핀란드어로 작성한 사람도 봤습니다.)

이 주관식 문제는 학생들이 서로서로 평가하도록 돼 있습니다.

웬만큼 성의있게 쓰면 다 정답으로 인정합니다. 

그러니까 전체 문제 중 50% 이상 맞추는 건 아주 쉽습니다.


아래 링크를 클릭하시면 해당 강좌에 등록할 수 있습니다.




Elements of AI




한번 도전하셔서 외국 대학 과목도 수료해 보시고 헬싱키 대학 과목 수료증도 받아 보시고 인공지능에 대한 이해도 높여 보세요.





내용들은 전부 이론적인 것들이라 실제 인공지능 관련한 어플리케이션을 개발해 보시고 싶은 분들은 아마존의 DeepLens 를 추천합니다. 








이 DeepLens는 아마존의 인공지능 API를 사용해 Deep Learning 어플리케이션 개발을 직접 해 볼 수 있도록 하는 제품입니다. 


일반 소비자를 대상으로 하는게 아니라 인공지능을 배우고 싶어하는 개발자들을 대상으로 한 상품입니다.


이 DeepLens를 이용해 물체를 인식하는 앱, 개인지 고양이인지 구분하는 앱, 사람의 얼굴을 감지하는 앱 등 여러가지 응용 프로그램을 쉽게 개발하실 수 있습니다.  





가격은 $249 이고 아래 링크를 통해서 구입하시면 제게 도움이 됩니다. :)




AWS DeepLens - Deep learning enabled video camera for developers


아마존 AWS DeepLens는 Deep learning을 배울 수 있는 개발자용 비디오 카메라 입니다.
2018년 6월부터 판매하고 있습니다. 구매를 원하시면 위 이미지 링크를 클릭하세요.



저도 이 온라인 강좌를 들으면서 알게 된 건데 외국 대학에서 인공지능 관련 무료 온라인 수업을 진행하는 경우가 많이 있더라구요.


시간 나는대로 다른 강좌도 도전해 볼 생각입니다.


이 헬싱키 대학 강좌는 인공지능에 관심은 있지만 별로 알지는 못하고 실제 개발 경험도 없지만 인공지능에 대해 알고 싶고 여건이 되면 그쪽에서 일하고 싶은 분들에게 적극 추천드립니다.


반응형

Elements of AI - Summary

2018. 6. 29. 05:25 | Posted by 솔웅


반응형

Elements of AI




III.Summary



The most important decisions that determine how well our society can adapt to the changes brought by AI aren’t technological. They are political.


AI가 가져올 변화에 우리 사회가 얼마나 잘 적응할 수 있는지를 결정하는 가장 중요한 결정은 기술적 인 것이 아닙니다. 그것은 정치적인 것입니다.



Everything that we have learned about AI suggests that the future is bright. We will get new and better services and increased productivity will lead to positive overall outcomes - but only on the condition that we carefully consider the societal implications and ensure that the power of AI is used for the common good.



AI에 관해 우리가 배운 모든 것은 미래가 밝다는 것을 알려 줍니다. 우리는 새롭고 더 나은 서비스를 얻게 될 것이며 생산성이 향상되면 전반적인 결과가 긍정적이 될 것입니다. 그러나 우리가 사회에 미치는 영향을 신중하게 고려하고 AI의 힘이 공동선에 사용되도록 보장해야만합니다.






What we need to do to ensure a positive outcome


Still, we have a lot of work to do.

우리는 아직 해야 될 일들이 많이 있습니다.


  • We need to avoid algorithmic bias to be able to reduce discrimination instead of increasing it.
  • We also need to learn to be critical about what we see, as seeing is no longer the same as believing - and develop AI methods that help us detect fraud rather than just making it easier to fabricate more real-looking falsehoods.
  • We need to set up regulation to guarantee that people have the right to privacy, and that any violations of this right are strictly penalized.
- algorithmic bias를 피해 차별을 늘리지 않고 줄일 수 있도록 노력해야 합니다. 
- 우리는 우리가 무엇을 보고 있는지에 대해 좀 더 비판적이 될 수 있게 노력하는 것이 필요합니다. 보이는 것 그대로 믿을 수 있지 않습니다. 거짓을 그럴듯 하게 진짜로 보이도록 하는 것 보다 거짓을 탐지하는데 도움이 되는 AI methods를 개발해야 합니다. 
- 우리는 사람들이 사생활 침해에 대한 권리를 갖도록 보장하고 이 권리 침해에 대해 엄격하게 처벌해야한다는 규정을 마련해야합니다.


We also need to find new ways to share the benefits to everyone, instead of creating an AI elite, those who can afford the latest AI technology and use it to access unprecedented economic inequality. This requires careful political judgment. (Note that by political judgment, we mean decisions about policy, which has little to do with who votes for whom in an election or the comings and goings of individual politicians and political parties.)


우리는 모두에게 인공지능을 통한 발전의 혜택을 공유할 수 있는 새로운 방법을 찾을 필요가 있습니다. 최신 인공 지능 기술을 사용할 수 있고 전례없는 경제적 불평등을 만들어 나갈 AI 엘리트를 만들어 내는 대신에 말이죠. 이를 위해서는 신중한 정치적 판단이 필요합니다. (정치적 판단이란 선거에서 누구에게 투표했는지 혹은 어떤 정치인이나 정당이 출현해야 되는지와 관련된 것이 아니라 정책 결정을 의미하는 겁니다.)



Note

The importance of policy

The most important decisions that determine how well our society can adapt to the evolution of work and to the changes brought by AI aren’t technological. They are political.


우리 사회가 인공지능이 불러올 일의 진화나 변화에 어떻게 잘 적응해 나갈것인지와 관련해 가장 중요한 것은 기술적인 측면이 아니라 정치적인 문제 입니다. 

The regulation of the use of AI must follow democratic principles, and everyone must have an equal say about what kind of a society we want to live in in the future. The only way to make this possible is to make knowledge about technology freely available to all. Obviously there will always be experts in any given topic, who know more about it than the rest of us, but we should at least have the possibility to critically evaluate what they are saying.


인공 지능의 사용에 대한 규제는 민주주의 원칙을 따라야하며 모든 사람들이 앞으로 어떤 종류의 사회에 살기를 바라는 가에 대한 의견을 평등하게 담아야 합니다. 이를 가능하게 하는 유일한 방법은 기술에 대한 지식을 모든 사람이 자유롭게 이용할 수 있게하는 것입니다. 분명히 주어진 주제에 대한 전문가가 있을 것이며 그들은 우리보다 더 많이 알고있을 것입니다. 하지만 우리는 적어도 그들이 말하는 것을 비판적으로 평가할 수있는 가능성(능력)이 있어야합니다.



What you have learned with us supports this goal by providing you the basic background about AI so that we can have a rational discussion about AI and its implications.


우리와 함께 배운 것은 인공 지능에 대한 기본 배경을 제공함으로써 우리가 인공지능과 그 의미에 대해 합리적으로 토론할 수 있도록 돕기 위해서 입니다.




Our role as individuals


As you recall, we started this course by motivating the study of AI by discussing prominent AI applications that affect all our lives. We highlighted three examples: self-driving cars, recommendation systems, and image and video processing. During the course, we have also discussed a wide range of other applications that contribute to the current technological transition.


여러분이 공부한 것들은, 우리 삶 전체에 영향을 미치는 중요한 AI applications를 논의함으로써 AI 연구에 동기를 부여하기 위해 이 코스를 시작했습니다. 우리는 세 가지 예를 살펴 보았습니다 :자율 주행 차량, 추천 시스템, 이미지 및 비디오 프로세싱. 그 과정에서 우리는 현재의 기술 전환에 기여하는 다양한 응용 프로그램에 대해서도 논의했습니다.


Note

Hidden agenda

We also had a hidden agenda. We wanted to give you an opportunity to experience the thrill of learning, and the joy of heureka moments when something that may have been complicated and mysterious, becomes simple and if not self-evident, at least comprehensible. These are moments when our curiosity is satisfied. But such satisfaction is temporary. Soon after we have found the answer to one question, we will ask the next. What then? And then?


우리에게는 숨겨진 의제도 있었습니다. 우리는 당신에게 학습의 스릴을 경험할 수 있는 기회를 드리고 싶었습니다. 그리고 복잡하고 미스테리한 어떤 문제를 단순화하고 뚜렷하게 알지는 못하더라도 적어도 이해는 할 수 있는 그런 heureka moments의 즐거움을 드리고 싶었습니다. 그것들은 바로 호기심이 만족되는 순간일 겁니다. 그러나 그러한 만족은 일시적입니다. 한 가지 질문에 대한 답을 얻은 후에 우리는 그 다음 질문을 할 것입니다.

If we have been successful, we have whetted your appetite for learning. We hope you will continue your learning by finding other courses and further information about AI, as well as other topics of your interest. To help you with your exploration, we have collected some pointers to AI material that we have found useful and interesting.


우리가 성공을 했다면, 당신은 더 배우고 싶은 마음이 들었을 겁니다. 우리는 당신이 인공지능에 대한 다른 과목 (코스)나 더 진전된 정보를 찾는 배움의 과정을 계속 이어 나가기를 바랍니다. 여러분의 탐험을 돕기 위해 우리는 유용하고 흥미로운 AI 자료에 대한 몇 가지 pointer들을 수집했습니다.



Now you are in a position where you can find out about what is going on in AI, and what is being done to ensure its proper use. You should do so, and whenever you feel like there are risks we should discuss, or opportunities we should go after, don't wait that someone else reacts


이제 AI에서 무슨 일이 일어나고 있는지, 올바른 사용을 위해 무엇이 이루어지고 있는지 알게 되었습니다. 여러분은 그렇게해야 합니다, 그리고 언제든지 리스크가 있다고 느껴지면 그것에 대해 논의해야 합니다. 그리고 더 발전할 기회가 있다고 생각할 때마다 다른 사람이 어떻게 반응하는지 기다리지 말고 앞으로 나아가고 논의해 나가야 합니다.



아마존 AWS DeepLens는 Deep learning을 배울 수 있는 개발자용 비디오 카메라 입니다.
2018년 6월부터 판매하고 있습니다. 구매를 원하시면 위 이미지 링크를 클릭하세요.





Exercise 26: AI in your life


How do you see AI affecting you in the future, both at work and in everyday life? Include both the positive and possible negative implications.


AI가 직장과 일상 생활에서 미래에 어떻게 영향을 미치는가? 가능한 긍정적 , 부정적 영향을 모두를 포함해 답하시오.



This is not the end. This is the beginning.



That's it for now. We thank you for joining us. This has been a great adventure for us, and we really hope that you enjoyed it too. We are not yet finished with the course, and I believe we will never be. We will keep doing our best updating and improving it, and making it the best AI MOOC in the world.


현재로서는 여기까지 입니다. 우리와 함께 해 주셔서 감사합니다.  이것은 우리에게 커다란 모험이었습니다. 우리는 당신이 이 과정을 즐겼기를 정말로 희망합니다. 우리는 아직 코스를 마친 것이 아니며, 결코 그렇게 될 수 없다고 생각합니다. 기 세계 최고의 AI MOOC로 만들 것입니다.


Like the course isn't finished, you shouldn't think that your exploration of AI is finished either. The progress is quite rapid and it may seem too much to keep track of, but the comforting news is that the basic principles have stayed more or less the same decade after decade. As long as you know the basics about problem-solving strategies, handling uncertainty, and learning from data, you should be able to easily put new things into perspective. This is why you had to draw diagrams with chickens crossing rivers, Towers of Hanoi, why you had to calculate the probability of rain in Helsinki, or detect detect happy faces by a neural network. Knowing the fundamentals, or the elements of AI, is much longer lasting knowledge than learning the technical details of a particular AI solution.


과정이 끝나지 않은 것처럼, AI 탐구가 끝났다고 생각하지 않아야합니다. 진행 상황이 매우 빠르며 추적하기에는 너무 많은 것처럼 보일 수 있지만 여러분에게 들려드릴 좋은 소식은 인공지능의 기본 원칙이 10 년 이 지나는 동안에도 거의 동일하게 유지되었다는 것입니다. 문제 해결 전략, 불확실성 처리 및 데이터 학습에 대한 기본 사항을 알고있는 한 새로운 관점을 쉽게 파악할 수 있게 됩니다. 그래서 하노이의 Towers of Hanoi, 헬싱키에서 비가 올 확률 계산, 신경망으로 행복한 얼굴을 탐지하기 등의 공부를 한 이유가 그것입니다. 


Below we give a few pointers that we have found useful. Keep learning, stay curious.

아래에서는 유용하다고 생각되는 몇 가지 지침을 제공합니다. 계속 배우고 항상 호기심을 가지세요.


"The future has not been written. There is no fate but what we make for ourselves." (John Connor)


"미래는 기록되지 않았다. 정해진 운명이란 없다 우리가 스스로 만들어 나가는 것이다." (존 코너)




After completing Chapter 6 you should be able to:



  • Understand the difficulty in predicting the future and be able to better evaluate the claims made about AI
  • Identify some of the major societal implications of AI including algorithmic bias, AI-generated content, privacy, and work







반응형

Elements of AI - The societal implications of AI

2018. 6. 29. 00:25 | Posted by 솔웅


반응형

Elements of AI




II.The societal implications of AI





In the very beginning of this course, we briefly discussed the importance of AI in today’s and tomorrow’s society but at that time, we could do so only to a limited extent because we hadn’t introduced enough of the technical concepts and methods to ground the discussion on concrete terms.


이 과정의 초반부에 우리는 현재와 미래 사회에서의 AI의 중요성에 대해 간략히 논의 했었지만 그 때 우리는 기술적 인 개념과 방법을 충분히 학습하지 않았기 때문에 제한된 범위 내에서만 이야기 할 수 있었습니다. 확실한 용어 (terms)를 사용하면서 튼실한 토론을 하지는 못했습니다.



Now that we have a better understanding of the basic concepts of AI, we are in a much better position to take part in rational discussion about the implications of already the current AI.



이제 우리는 AI의 기본 개념을 더 잘 이해 했으므로 현재 AI의 의미에 대한 합리적 토론에 참여하는 것이 가능해 졌습니다.




Implication 1: Algorithmic bias


AI, and in particular, machine learning, is being used to make important decisions in many sectors. This brings up the concept of algorithmic bias. What it means is the embedding of a tendency to discriminate according ethnicity, gender, or other factors when making decisions about job applications, bank loans, and so on.



인공 지능, 특히 machine learning은 많은 부문에서 중요한 결정을 내리는 데 사용되고 있습니다. 이것은 알고리즘 바이어스의 개념을 불러옵니다. 이것이 의미하는 바는 구직활동이나 은행 대출등을 할 때 인종, 성별 혹은 다른 요소에 근거해 차별하는 경향이 영향을 미치고 있다는 것입니다. 




Note

Once again, it’s all about the data

The main reason for algorithmic bias is human bias in the data. For example, when a job application filtering tool is trained on decisions made by humans, the machine learning algorithm may learn to discriminate against women or individuals with a certain ethnic background. Notice that this may happen even if ethnicity or gender are excluded from the data since the algorithm will be able to exploit the information in the applicant’s name or address.


algorithmic bias (알고리즘 편향) 의 주요 이유는 데이터내의 human bias (인간의 편견) 입니다. 예를 들어, 구직 프로그램 필터링 도구가 사람이 내린 결정에 대해 교육을 받는 경우, machine learning algorithm 이 여성이나 특정 인종적 배경을 가지고 있는 개인들을 차별하는 것도 배우고 있을 거라는 겁니다. 알고리즘이 신청자의 이름이나 주소에 있는 정보를 통해서 유추할 수 있기 때문에 인종이나 성별이 데이터에서 제외 된 경우에도 이러한 일이 발생할 수 있습니다.



Algorithmic bias isn't a hypothetical threat conceived by academic researchers. It's a real phenomenon that is already affecting people today.


알고리즘 편향은 학술 연구자가 생각해 낸 가상의 위협이 아닙니다. 그것은 오늘날 사람들에게 이미 영향을 미치고있는 실제 현상입니다.



Online advertising


It has been noticed that online advertisers like Google tend to display ads of lower-pay jobs to women users compared to men. Likewise, doing a search with a name that sounds African American may produce an ad for a tool for accessing criminal records, which is less likely to happen otherwise.



Google과 같은 온라인 광고주는 남성보다 여성 사용자에게 저임금 광고를 게재하는 경향이 있음을 알게되었습니다. 마찬가지로 아프리카 계 미국인이라고 추정할 수 있는 이름으로 검색하면 범죄 기록에 접근하기 위한 도구에 대한 광고가 생성 될 수 있습니다.



Social networks


Since social networks are basing their content recommendations essentially on other users’ clicks, they can easily lead to magnifying existing biases even if they are very minor to start with. For example, it was observed that when searching for professionals with female first names, LinkedIn would ask the user whether they actually meant a similar male name: searching for Andrea would result in the system asking “did you mean Andrew”? If people occasionally click Andrew’s profile, perhaps just out of curiosity, the system will boost Andrew even more in subsequent searched.



소셜 네트워크는 본질적으로 다른 사용자의 클릭을 기반으로 컨텐츠 추천을하기 때문에 처음 시작한 초보자에게도 현재 존재하는 편견이 있는 정보를 우선 전달하게 되어 기존의 편견이 쉽게 확대 재생산 될 수 있습니다. 예를 들어, 여성 이름을 가진 전문가를 검색 할 때 LinkedIn은 사용자에게 실제로 유사한 남성 이름을 의미하는지 여부를 묻습니다. Andrea를 검색하면 시스템에서 "Andrew를 의미 했습니까?"라고 묻습니다. 그래서 만약 사람들이 Andrew의 프로파일을 클릭한다면 (아마 호기심 때문이라도...) 시스템은 사람들이 간혹 앤드류의 프로필을 클릭하는 경우가 있습니다. 아마 호기심 때문에 시스템은 Andrew를 연관 검색어로 나올 확률을 더욱 향상 시킬 것입니다.



There are numerous other examples we could mention, and you have probably seen news stories about them. The main difficulty in the use of AI and machine learning instead of rule-based systems is their lack of transparency. Partially this is a consequence of the algorithms and the data being trade secrets that the companies are unlikely to open up for public scrutiny. And even if they did this, it may often be hard to identify the part of the algorithm or the elements of the data that lead to discriminating decisions.



우리가 언급 할 수있는 수많은 다른 예가 있으며, 당신은 아마 그것들에 대한 뉴스 기사를 보았을 것입니다. 규칙 기반 시스템(rule-based systems) 대신 인공 지능과 machine learning을 사용하는 데 있어 가장 큰 어려움은 투명성 부족입니다. 회사들은 자신들의 알고리즘과 자신들이 사용했던 데이터에 대한 정보를 비밀로 분류해 public scrutiny (공개조사)에 오픈하는 것을 꺼립니다. 그들이 공개조사에 응하더라도 차별을 유도하는 알고리즘이나 데이터들을 구분해 내는 작업은 어려운 작업입니다. 



Note

Transparency through regulation?

A major step towards transparency is the European General Data Protection Regulation (GDPR). It requires that all companies that either reside within the European Union or that have European customers must: 

  • Upon request, reveal what data they have collected about any individual (right of access)
  • Delete any such data that is not required to keep with other obligations when requested to do so (right to be forgotten)
  • Provide an explanation of the data processing carried out on the customer’s data (right to explanation)

투명성을 향한 가장 메이저한 움직임은 uropean General Data Protection Regulation (GDPR) -유럽 일반 데이터 보호 규정- 입니다. 유럽 연합 내에 거주하거나 유럽 고객이있는 모든 회사는 다음을 수행해야합니다.

- 요청이있을 때, 어떤 개인에 대해 수집 한 데이터를 공개해야한다. (접근 권리)

- 요청이 있을 시 다른 의무조항을 지키는 데 위배가 되지 않은 경우 요청한 데이터를 삭제해야 한다 (잊혀질 권리)

- 고객의 데이터에 대해 수행 된 데이터 처리에 대한 설명을 제공 해야 한다 (설명을 들을 권리)



The last point means, in other words, that companies such as Facebook and Google, at least when providing services to European users, must explain their algorithmic decision making processes. It is, however, still unclear what exactly counts as an explanation. Does for example a decision reached by using the nearest neighbor classifier (Chapter 4) count as an explainable decision, or would the coefficients of a logistic regression classifier be better? How about deep neural networks that easily involve millions of parameters trained using terabytes of data? The discussion about the technical implementation about the explainability of decisions based on machine learning is currently intensive. In any case, the GDPR has potential to improve the transparency of AI technologies.



마지막으로, 페이스북이나 구글과 같은 회사는 적어도 유럽 사용자에게 서비스를 제공 할 때 알고리즘 결정 과정을 설명해야한다는 것을 의미합니다. 그러나 정확히 무엇이 설명인지는 아직 불분명합니다. 예를 들어 nearest neighbor classifier (4 장)를 사용하여 그 결론에 도달했다 라는 설명이 충분한 걸까요? 혹은 logistic regression classifier 의 계수를 사용한 경우가 더 좋은 경우일까요? 테라 바이트의 데이터를 사용하여 trained 된 수백만 개의 매개 변수를 포함하는 deep neural networks는 어떻습니까? machine learning에 기반한 의사 결정의 설명 가능성에 대한 기술적 구현에 대한 논의는 현재 집중적으로 이루어지고 있습니다. 어쨌든 GDPR은 인공 지능 기술의 투명성을 향상시킬 잠재력이있습니다.




Implication 2: Seeing is believing — or is it?


We are used to believing what we see. When we see a leader on the TV stating that their country will engage in a trade-war with another country, or when a well-known company spokesperson announces an important business decision, we tend to trust them better than just reading about the statement second-hand from the news written by someone else.



우리는 우리가 보는 것을 믿는 데 익숙합니다. TV에서 국가에서 다른 나라와의 무역 전쟁에 관여 할 것이라는 지도자를 보거나 잘 알려진 회사 대변인이 중요한 비즈니스 결정을 발표 할 때 우리는 그 성명서를 다른사람에 의해 걸려져서 나온 뉴스를 읽는 것보다 더 잘 신뢰하는 경향이 있습니다 



Similarly, when we see photo evidence from a crime scene or from a demonstration of a new tech gadget, we put more weight on the evidence than on written report explaining how things look.



마찬가지로 우리가 범죄 현장에서 사진 증거를 보거나 새로운 기술 장치를 시연 할 때, 우리는 사물이 어떻게 보이는지에 대한 서면 보고서 보다는 실제 증거에 더 많은 비중을 두고 있습니다.



Of course, we are aware of the possibility of fabricating fake evidence. People can be put in places they never visited, with people they never met, by photoshopping. It is also possible to change the way things look by simply adjusting lighting or pulling one’s stomach in in cheap before–after shots advertising the latest diet pill.



물론, 우리는 가짜 증거를 만들 수 있다는 것을 알고 있습니다. 한번도 만난 적이 없는 사람들과 결코 만나지 않은 장소에서 찍은 사진을 뽀샵으로 만들 수 있습니다.  가장 최근의 다이어트 알약을 광고하는 싸구려  before–after 촬영 시 조명을 조절하거나 뱃살을 잡아 당김으로써 변화된 것처럼 보이게 할 수 있습니다. 




Note

AI is taking the possibilities of fabricating evidence to a whole new level:


Face2Face is a system capable of identifying the facial expressions of a person and putting them on another person’s face in a Youtube video.

Lyrebird is a tool for automatic imitation of a person’s voice from a few minutes of sample recording. While the generated audio still has a notable robotic tone, it makes a pretty good impression.


Face2Face는 사람의 얼굴 표정을 식별하고 Youtube 비디오에 다른 사람의 얼굴에 넣을 수있는 시스템입니다.


Lyrebird는 몇 분동안의 샘플 녹음을 토대로 사람의 목소리를 자동으로 모방하는 도구입니다. 생성 된 오디오는 여전히 로봇 목소리라는 것을 알아 차릴 수 있을 정도이긴 하지만 꽤 잘 모방합니다.




AWS DeepLens - Deep learning enabled video camera for developers

아마존 AWS DeepLens는 Deep learning을 배울 수 있는 개발자용 비디오 카메라 입니다.
2018년 6월부터 판매하고 있습니다. 구매를 원하시면 위 이미지 링크를 클릭하세요.

Implication 3: Changing notions of privacy



It has been long known that technology companies collect a lot of information about their users. Earlier it was mainly grocery stores and other retailers that collected buying data by giving their customers loyalty cards that enable the store to associate purchases to individual customers.



technology companies가 사용자에 관한 많은 정보를 수집한다는 것은 오래 전부터 알려져 왔습니다. 이전에는 주로 식료품점 및 기타 소매 업체가 멤버쉽 카드를 통해 고객의 구매 데이터를 수집했습니다. 



Note

Unprecedented data accuracy

The accuracy of the data that tech companies such as Facebook, Google, Amazon and many others is way beyond the purchase data collected by conventional stores: in principle, it is possible to record every click, every page scroll, and the time you spend viewing any content. Websites can even access your browsing history, so that unless you use the incognito mode (or the like) after browsing for flights to Barcelona on one site, you will likely get advertisements for hotels in Barcelona.


페이스북, 구글, 아마존 그리고 다른 많은 tech 회사 에서 기존 구매 데이터를 통한 데이터 수집을 훨씬 웃도는 데이터의 정확성을 가지고 있습니다. :   모든 클릭, 모든 페이지 스크롤 및 콘텐츠를 보고 있는 시간 등을 수집하고 있습니다. 웹 사이트는 인터넷 사용 기록(browsing history)에도 액세스 할 수 있으므로 한 사이트에서 바르셀로나로 항공편을 탐색 한 후에 시크릿 모드 (또는 이와 유사한 방식)를 사용하지 않으면 바르셀로나에 있는 호텔에 대한 광고가 표시 될 수 있습니다.



However, as such the above kind of data logging is not yet AI. The use of AI leads new kinds of threats to our privacy, which may be harder to avoid even if you are careful about revealing your identity.



그러나 이러한 종류의 데이터 logging은 아직 AI가 아닙니다. AI를 사용하면 개인 정보에 대한 새로운 종류의 위협이 생기고 신원을 밝히지 않도록 주의를 기울여도 피하기가 어려울 수 있습니다.




Using data analysis to identify individuals



A good example of a hard-to-avoid issue is de-anonymization, breaking the anonymity of data that we may have thought to be safe. The basic problem is that when we report the results of an analysis, the results may be so specific that they make it possible to learn something about individual users whose data is included in the analysis. A classic example is asking for the average salary of people born in the given year and having a specific zip code. In many cases, this could be a very small group of people, often only one person, so you’d be potentially giving data about a single person’s salary.



피할 수없는 문제 (hard-to-avoid)의 좋은 예로는 익명성이 없어지는 것입니다. 데이터의 익명성을 없앰으로서 안전하다고 생각할 수 있을 것입니다. 기본적인 문제는 분석 결과를 보고 할 때 결과가 너무 구체적이어서 분석에 데이터가 포함 된 개별 사용자에 대해 뭔가를 알아 낼 수 있다는 것입니다. 전형적인 예는 해당 연도에 출생 하고 특정 우편번호에 주소지가 있는 사람들의 평균 급여를 물어보는 것입니다. 많은 경우, 이렇게 하면 매우 작은 그룹의 사람들이 그 대상이 될 수 있고, 종종 한 사람 만이 해당 될 수 있으므로 한 사람의 급여에 대한 데이터를 잠재적으로 제공 할 수 있는 겁니다.



An interesting example of a more subtle issue was pointed out by researchers at the University of Texas at Austin. They studied a public dataset made available by Netflix containing 10 million movie ratings by some 500,000 anonymous users, and showed that many of the Netflix users can actually be linked to user accounts on the Internet Movie Database because they had rated several movies on both applications. Thus the researchers were able to de-anonymize the Netflix data. While you may not think it's big deal whether someone else knows how you rated the latest Star Wars movie, some movies may reveal aspects of our lives (such as politics or sexuality) which we should be entitled to keep private.



더 미묘한 문제에 대한 재미있는 예가 텍사스 오스틴 대학 (University of Texas)의 연구원들에 의해 지적되었습니다. 그들은 50만명의 익명 사용자들이 영화에 대해 매긴 1천만개의 등급 자료를 포함한 Netflix의 공개 데이터세트들에 대해 연구했습니다. 연구 결과 Internet Movie Database를 통해 많은 Netflix 사용자 들의 user accounts 로 링크가 가능했습니다. 그 이유는 그들은 그 두개의 어플리케이션에서 여러 영화에 대해 등급을 매겼기 때문입니다. 그렇게 해서 연구원들은 Netflix 데이터의 익명성을 깨뜨릴 수 있었습니다. 아마 당신은 스타워즈 최신작에 대한 당신의 평가 등릅 자료가 다른 사람들에게 알려진다는 것을 그렇게 대수롭지 않게 생각할 수 있습니다. 그렇지만 어떤 종류의 영화들에 대한 평가 등급은 (예를 들어 정치나 sexuality에 관한 영화) 지키고 싶은 사적 비밀이 밝혀질 수 있습니다. 




Other methods of identification


A similar approach could in principle used to match user accounts in almost any service that collects detailed data about user behaviors. Another example is typing patterns. Researchers at the University of Helsinki have demonstrated that users can be identified based on their typing patterns: the short intervals between specific keystrokes when typing text. This can mean that if someone has access to data on your typing pattern (maybe you have used their website and registered by entering your name), they can identify you the next time you use their service even if you’d refuse to identify yourself explicitly. They can also sell this information to whoever wants to buy it.



비슷한 방식을 사용하여 원칙적으로 사용자 행동에 대한 상세한 데이터를 수집하는 거의 모든 서비스에서 사용자 계정을 일치시킬 수 있습니다. 또 다른 예는 타이핑 패턴입니다. 헬싱키 대 (University of Helsinki)의 연구원들은 사용자가 타이핑 패턴에 의해 식별 될 수 있음을 보여주었습니다. 텍스트를 입력 할 때 특정 키들 입력 사이의 짧은 간격을 측정함으로서 타이핑 패턴을 규정하게 됩니다. 즉, 누군가 자신의 웹 사이트를 사용하고 자신의 이름을 입력하여 등록한 입력 패턴의 데이터에 액세스 할 수있는 경우 다음에 그 사용자가 명시적으로 자신의 신원을 밝히기를 거부하더라도 서비스를 사용할 때 그 사용자를 식별 할 수 있는겁니다. 또한 이 정보를 구매하려는 사람에게이 정보를 판매 할 수도 있습니다.



While many of the above examples have come as at least in part as surprises — otherwise they could have been avoided — there is a lot of ongoing research trying to address them. In particular, an area called differential privacy aims to develop machine learning algorithms that can guarantee that the results are sufficiently coarse to prevent reverse engineering specific data points that went into them.



위의 사례 들은 놀라움으로 다가왔을 겁니다. 다른 사례들에 대한 많은 연구들이 진행되고 있습니다. 특히 machine learning algorithms 개발을 위한 차등 개인 정보 보호 ( differential privacy aims)라고하는 영역에서는 that can guarantee that the results are sufficiently coarse to prevent reverse engineering specific data points that went into them.





Implication 4: Changing work


When an early human learned to use a sharp rock to crack open bones of dead animals to access a new source of nutrition, time and energy was released for other purposes such as fighting, finding a mate, and making more inventions. The invention of the steam engine in the 1700s tapped into an easily portable form of machine power that greatly improved the efficiency of factories as well as ships and trains. Automation has always been a path to efficiency: getting more with less. Especially since the mid 20th century, technological development has lead to a period of unprecedented progress in automation. AI is a continuation of this progress.



초기 인간은 날카로운 돌을 사용하여 죽은 동물의 뼈를 해체해 새로운 영양 공급원에 접근하는 것을 배웠고, 그러고 난 후의 시간과 에너지로 싸우거나 배우자를 찾고 또는 새로운 발명품을 만드는 그런 목적을 이루는 데 사용했습니다. 1700 년대 증기 엔진의 발명은 선박 및 열차뿐만 아니라 공장의 효율성을 크게 향상시킨 쉽게 운반 할 수 있는 형태의 기계 동력을 활용했습니다. 자동화는 항상 효율성을 위한 길이었습니다. 특히 20 세기 중반 이래로 기술 개발은 자동화 분야에서 전례없는 발전의 시기로 이어졌습니다. 인공 지능은 이러한 진보의 연속선 상에 있는 것입니다. 



Each step towards better automation changes the working life. With a sharp rock, there was less need for hunting and gathering food; with the steam engine, there was less need for horses and horsemen; with the computer, there is less need for typists, manual accounting, and many other data processing (and apparently more need for watching cat videos). With AI and robotics, there is even less need for many kinds of dull, repetitive work.



더 나은 자동화를 향한 각 단계는 working life를 변화시킵니다. 날카로운 돌로 인해 사냥하거나 음식을 모으는 일의 노동력이 줄었습니다. 증기기관으로 인해 말과 마부의 필요성도 줄어 들었습니다. 컴퓨터로 인해 타이피스트나 수동으로 계산하는 회계 업무 그리고 다른 많은은 데이터 처리 업무량도 줄었습니다. (대신 고양이 비디오를 보는 수요가 커졌죠). 인공지능과 로봇으로 단순하고 반복적인 업무 같은 노동량이 줄어들고 있습니다. 



Note

A history of finding new things to do

In the past, every time one kind of work has been automated, people have found new kinds to replace it. The new kinds of work are less repetitive and routine, and more variable and creative. The issue with the current rate of advance of AI and other technologies is that during the career of an individual, the change in the working life might be greater than ever before. It is conceivable that some jobs such as driving a truck or a taxi, may disappear within a few years’ time span. Such an abrupt change could lead to mass unemployment as people don’t have time to train themselves for other kinds of work.


과거에는 한 종류의 작업이 자동화 될 때마다 사람들은 그 일을 대체할 수 있는 새로운 종류의 작업을 발견했습니다. 새로운 종류의 일은 반복적이고 일상적이지 않으며, 더 다양하고 창조적입니다. AI 및 기타 기술의 발전 속도에 관한 현안은 개인 경력에 있어 근무 환경의 변화가 과거 어느 때보다 커질 수 있다는 것입니다. 트럭이나 택시 운전과 같은 일부 직업은 몇 년 내에 사라질 수 있습니다. 이러한 급격한 변화는 사람들이 다른 종류의 일을 위해 스스로 훈련 할 시간이 없기 때문에 대량 실업을 초래할 수 있습니다.

The most important preventive action to avoid huge societal issues such as this is to help young people obtain a wide-ranging education. This that provides a basis for pursuing many different jobs and which isn’t in high risk of becoming obsolete in the near future.


이와 같은 거대한 사회적 문제를 피하기 위한 가장 중요한 예방 조치는 청소년들이 폭 넓은 교육을 받을 수 있도록 돕는 것입니다. 그렇게 함으로서 가까운 장래에 사라지게 될 위험이 적지 않은 여러 직업들에 대한 판단을 할 수 있는 근거를 제공합니다.

It is equally important to support life-long learning and learning at work, because there are going to be few of us who will do the same job throughout their entire career. Cutting the hours per week would help offer work for more people, but the laws of economics tend to push people to work more rather than less unless public policy regulating the amount of work is introduced.


평생 학습과 일하면서 배우는 것 두가지 모두 똑같이 중요합니다. 왜냐하면 일생동안 한가지 일만 할 사람은 앞으로 별로 없을 것이기 때문입니다.   주당 노동 시간을 줄이는 것은 더 많은 사람들을 위한 일자리를 제공하는 데 도움이되지만, 경제 법칙은 일의 양을 규제하는 공공 정책이 도입되지 않으면 사람들이 노동보다 더 많이 일하도록 압박하는 경향이 있습니다.





Because we can’t predict the future of AI, predicting the rate and extent of this development is extremely hard. There have been some estimates about the extent of job automation, ranging up to 47% of US jobs being at risk reported by researchers at the University of Oxford. The exact numbers such as these – 47%, not 45% or 49% –, the complicated-sounding study designs used to get them, and the top universities that report them tend to make the estimates sounds very reliable and precise. (Recall the point about estimating life expectancy using a linear model based on a limited amount of data.) The illusion of accuracy to one percentage is a fallacy. The above number, for example, is based on looking at a large number of job descriptions – perhaps licking the tip of your finger and putting it up to feel the wind – and using subjective grounds to decide which tasks are likely to be automated. It is understandable that people don't take the trouble to read a 79 page report that includes statements such as "the task model assumes for tractability an aggregate, constant-returns to-scale, Cobb-Douglas production function." However, if you don't, then you should remain somewhat sceptical about the conclusions too. The real value in this kind of analysis is that it suggests which kinds of jobs are more likely to be at risk, not in the actual numbers such as 47%. The tragedy is that the headlines reporting that "nearly half of US jobs at risk of computerisation" are remembered and the rest is not.



우리는 인공 지능의 미래를 예측할 수 없으므로 그 개발의 속도와 범위를 예측하는 것은 극히 어렵습니다. 옥스포드 대학 (University of Oxford)의 연구팀이 보고한 바에 따르면 미국 직업의 최대 47%가 자동화 될 수 있다는 예측이 있습니다. 45%도 아니고 49%도 아니고 47%라고 딱 집어 얘기 했으니 뭔가 굉장히 복잡한 과정을 통해서 이 수치가 나온 것 같습니다. 그리고 유명한 대학교의 보고서이니 사람들은 믿을만하고 값어치가 있다고 믿는 경향이 있습니다. (제한된 양의 데이터에 근거해 linear model을 사용해 얻은 기대수명 예상하기에서의 요점을 상기해 보세요.)  정확도가 1 %라는 착각은 잘못된 것입니다. 예를 들어, 위의 숫자는 많은 수의 job descriptions을 기반으로합니다. - 아마도 손가락 끝에 침을 바른 다음에 손을 들어 바람을 느끼는 방법을 사용했을 수도....- 그 기반 하에 주관적인 판단이 가미 돼 어떤 일들이 자동화 될 것인가를 결정하게 되죠. 아마 사람들이 그 79 페이지나 되는 보고서 안에 있는 "the task model assumes for tractability an aggregate, constant-returns to-scale, Cobb-Douglas production function." 라는 문장을 읽는데는 문제가 없다는 것은 사실입니다. 어쨌든 당신이 그 문장을 보지 않았다면 그 결론에 대해 회의적이어야 합니다. 이런 유형의 분석에서 실제 가치는 47 %와 같은 실제 수치가 아니라 어떤 종류의 일자리가 위험에 노출 될 가능성이 더 높다는 것입니다. 실제 일어난 비극은 이 논문을 보도한 기사의 제목이 "미국 직업의 거의 절반을 컴퓨터가 대체하게 될 것이다" 였습니다. 사람들에게는 이 부분만 기억되고 나머지는 잊혀지겠죠. 



So what are then the tasks that are more likely to be automated. There are some clear signs concerning this that we can already observe:


그러면 자동화 될 가능성이 더 큰 작업은 무엇입니까? 우리가 이미 관찰 할 수있는 몇 가지 분명한 징후가 있습니다.



  • Autonomous robotics solutions such as self-driving vehicles, including cars, drones and boats or ferries, are just at the verge of a major commercial applications. The safety of autonomous cars is hard to estimate, but the statistics suggests that it is probably not yet quite at the required level (the level of an average human driver). However, the progress has been incredibly fast and it is accelerating due to the increasing amount of available data.

- 자동차, drones, boats or ferries를 포함한 자율 주행 운송수단인 Autonomous robotics solutions는 주요 상업용 어플리케이션의 초입단계일 뿐입니다.  자율 주행 차량의 안전성은 예측하기가 어렵지만 통계에 따르면 아직 평균 수준의 인간 운전자 수준은 아닙니다. 그러나 진행 속도는 엄청나게 빠르며 사용 가능한 데이터의 양이 증가함에 따라 가속화되고 있습니다.



  • Customer-service applications such as helpdesks can be automated in a very cost-effective fashion. Currently the quality of service is not always to be cheered, the bottle-necks being language processing (the system not being able to recognize spoken language or to parse the grammar) and the logic and reasoning required to provide the actual service. However, working applications in constrained domains (such as making restaurant or haircut reservations) sprout up constantly.

- 헬프 데스크와 같은 고객 서비스 응용 프로그램은 매우 비용 효율적인 방식으로 자동화 될 수 있습니다. 현재 서비스의 품질은 모든 면에서 좋은 평가를 받는 것은 아닙니다. 언어 처리에 있어서의 병목현상 (시스템이 음성 언어를 인식하지 못하거나 문법을 해석하지 못 하는 것)이나 논리나 추론이 요구되는 상황에서의 지연 등이 그것입니다. 그러나 제한된 영역 (예 : 레스토랑이나 이발소 예약 등)에서 작동하는 응용 프로그램은 끊임없이 발전하고 있습니다.



For one thing, it is hard to tell how soon we’ll have safe and reliable self-driving cars and other solutions that can replace human work. In addition to this, we mustn’t forget that a truck or taxi driver doesn’t only turn a wheel: they are also responsible for making sure the vehicle operates correctly, they handle the goods and negotiate with customers, they guarantee the safety of their cargo and passengers, and take care of a multitude of other tasks that may be much harder to automate than the actual driving.



우선, 우리가 얼마나 빨리 안전하고 신뢰할 수있는 자율 주행 자동차 및 인간의 작업을 대체할 수 있는 솔루션들을 현실화 할 수 있는지 말하기가 어렵습니다. 그리고 우리가 잊지 말아야 할 것은 트럭이나 택시 운전사들이 단지 방향만 바꾸는 일은 하는 것이 아니라 자동차의 다른 기능들이 제대로 작동하는지 확인하고 기타 관련된 물품들을 관리하며 고객들과 협상도 진행하고 cargo와 승객의 안전에 대한 보장도 하는 등 다른 일들도 하고 있다는 겁니다. 그리고 단지 운전만이 아닌 자동화 하기 어려운 다른 많은 작업들도 동시에 수행하고 있습니다.



As with earlier technological advances, there will also be new work that is created because of AI. It is likely that in the future, a larger fraction of the workforce will focus on research and development, and tasks that require creativity and human-to-human interaction. If you'd like to read more on this topic, see for example Abhinav Suri's nice essay on Artificial Intelligence and the Rise of Economic Inequality.



초기 기술 진보와 마찬가지로 인공 지능으로 인해 새로운 일이 생겨 날 겁니다. 미래에는 인력의 상당 부분이 창의력과 인간과 인간의 상호 작용을 필요로하는 연구 개발 및 업무에 집중할 가능성이 높습니다. 이 주제에 대해 더 자세히 알고 싶다면 인공 지능과 경제적 불평등의 부상 (Artificial Intelligence and the Rise of Economic Inequality.)에 대한 Abhinav Suri의 훌륭한 글을 참고하십시오.




Exercise 25: Implications of AI


What kind of articles are being written about AI - and do you think they are realistic? Do an online search about AI related to one of your interests. Choose one of the articles and analyze it.

Explain the central idea in the article in your own words using about a paragraph of text (multiple sentences.) Based on your understanding, how accurate are the AI-related statements in the article? Explain your answer. Are the implications (if any) realistic? Explain why or why not.



AI에 관해 어떤 종류의 기사가 쓰여지고 있는지 알아보세요, 그것이 현실적이라고 생각합니까? 관심 분야 중 하나와 관련된 AI에 대한 온라인 기사를 검색해 보세요. 그 기사들 중 하나를 선택하고 분석해 보세요.


기사의 핵심 아이디어를 한 문단 (여러 문장)으로 그리고 여러분의 논리로 설명하십시오. 그 기사의 AI 관련 진술은 얼마나 정확합니까? 당신의 생각을 설명하세요. 그 의미가 현실적입니까? 왜 그런지 혹은 왜 그렇지 않은지 설명하세요.



반응형

Elements of AI - About predicting the future

2018. 6. 27. 21:37 | Posted by 솔웅


반응형

Elements of AI



I.About predicting the future



We will start by addressing what is known to be one of the hardest problems of all: predicting the future.

우리는 가장 어려운 문제라고 알려진 것에 대해 addressing 하면서 시작하겠습니다. : 미래를 예언하는 것


You may be disappointed to hear this, but we don't have a crystal ball that would show us what the world will be like in the future and how AI will transform our lives.


아마 이것을 들으면 당신은 실망할 수도 있을겁니다. 미래의 세계와 인공 지능이 우리 삶을 변화시킬 방법을 우리에게 보여 줄 수정 구슬은 없습니다.


As scientists, we are often asked to provide predictions, and our refusal to provide any is faced with a roll of the eyes (“boring academics”). But in fact, we claim that anyone who claims to know the future of AI and the implications it will have on our society, should be treated with suspicion.


과학자로서, 우리는 종종 예측을 제공하라는 요청을 받고, 어떤 것을 제공하기를 거부하는 것은 roll of the eyes ( "boring academics")에 직면하게됩니다. 그러나 우리는 AI의 미래와 이것이 우리 사회에 미칠 영향을 알고 있다고 주장하는 사람은 모두 의심 받아야한다고 주장합니다.


The reality distortion field


Not everyone is quite as conservative about their forecasts, however. In the modern world where big headlines sell, and where you have to dissect news into 280 characters, reserved (boring?) messaged are lost, and simple and dramatic messages are magnified. In the public perception of AI, this is clearly true.


그러나 모든 사람들이 그들의 예측에 대해 보수적 인 것은 아닙니다. 큰 headlines이 판매되는 현대 세계에서 280 자로 뉴스를 분석해야 하는 곳에서는 예약 된 (boring?) 메시지를 잃어 버리고 단순하고 극적인 메시지가 확대됩니다. AI에 대한 대중의 인식에서 이것은 분명히 사실입니다.




Note

From utopian visions to grim predictions


The media sphere is dominated by the extremes. We are beginning to see AI celebrities, standing for one big idea and making oracle-like forecasts about the future of AI. The media love their clear messages. Some promise us a utopian future with exponential growth and trillion-dollar industries emerging out of nowhere, true AI that will solve all problems we cannot solve by ourselves, and where humans don’t need to work at all.

It has also been claimed that AI is a path to world domination. Others make even more extraordinary statements according to which AI marks the end of humanity (in about 20-30 years from now), life itself will be transformed in the “Age of AI“, and that AI is a threat to our existence.


미디어 영역은 극단에 의해 지배됩니다. 우리는 인공 지능 celebrities를 만나기 시작했습니다. 하나의 큰 아이디어를 내고 AI의 미래에 대한 오라클과 유사한 예측(oracle-like forecasts)을하는 것입니다. 언론은 그들의 명백한 메시지를 좋아합니다. 어떤 사람들은 우리가 스스로 해결할 수 없는 모든 문제를 해결하고, 인간이 전혀 일할 필요가 없는 곳에서 기하 급수적으로 성장하고 수조 달러의 산업이 나타나지 않는 유토피아 적 미래를 약속합니다.


인공 지능은 세계 지배의 길임을 주장 해 왔습니다. 다른 사람들은 AI가 (지금부터 약 20-30 년 후에) 인류의 종말을 표명하는 더욱 특별한 성명서를 작성하고, "AI의 시대"에서 삶 자체가 변형 될 것이며, AI는 우리의 존재에 대한 위협이라고 말합니다.


While some forecasts will probably get at least something right, others will likely be useful only as demonstrations of how hard it is to predict, and many don’t make much sense. What we would like to achieve is for you to be able to look at these and other forecasts, and be able to critically evaluate them.


일부 예측은 아마도 적어도 적절한 것을 얻게 될 것이지만, 다른 예측은 예측하기가 얼마나 어려운지에 대한 시연으로 만 유용 할 것이고, 많은 것은 별로 의미가 없습니다. 우리가 달성하고자하는 것은 이러한 예측과 다른 예측을 보고 비판적으로 평가할 수있는 것입니다.



AWS DeepLens - Deep learning enabled video camera for developers

아마존 AWS DeepLens는 Deep learning을 배울 수 있는 개발자용 비디오 카메라 입니다.
2018년 6월부터 판매하고 있습니다. 구매를 원하시면 위 이미지 링크를 클릭하세요.

On hedgehogs and foxes


The political scientist Philip E. Tetlock, author of Superforecasting: The Art and Science of Prediction, classifies people into two categories: those who have one big idea (“hedgehogs”), and those who have many small ideas (“foxes”). Tetlock has carried out an experiment between 1984 and 2003 to study factors that could help us identify which predictions are likely to be accurate and which are not. One of the significant findings was that foxes tend to be clearly better at prediction than hedgehogs, especially when it comes to long-term forecasting.


Superforecast : The Art and Science of Prediction의 저자 인 Philip E. Tetlock은 사람들을 하나의 큰 아이디어 (고슴도치)가 많거나 와 작은 아이디어 ( "여우")가 많은 사람들로 분류합니다. Tetlock은 1984 년과 2003 년 사이에 어떤 예측이 정확하고 그렇지 않은지 파악하는 데 도움이되는 요인을 연구하기 위해 실험을 수행했습니다. 중요한 발견 중 하나는 여우가 고슴도치보다 예측에서 더 나은 경향이 있다는 것입니다. 특히 장기 예측에 있어서는 그렇습니다.


Probably the messages that can be expressed in 280 characters are more often big and simple hedgehog ideas. Our advice is to pay attention to carefully justified and balanced information sources, and to be suspicious about people who keep explaining everything using a single argument.


아마도 280 자로 표현할 수 있는 메시지는 크고 단순한 고슴도치 아이디어 일 수 있습니다. 우리의 조언은 신중하고 정당하고 균형 잡힌 정보원에 주의를 기울여야 하며, 하나의 논점을 사용하여 모든 것을 계속 설명하는 사람들에 대해 의심을 품는 것입니다.


Predicting the future is hard but at least we can consider the past and present AI, and by understanding them, hopefully be better prepared for the future, whatever it turns out to be like.


미래를 예측하는 것은 어렵지만 최소한 우리는 과거와 현재의 인공 지능을 생각해 볼 수 있습니다. 그리고 그것을 이해함으로써 미래에 대한 준비가 더 되었으면 좋겠습니다.


AI winters


The history of AI, just like many other fields of science, has witnessed the coming and going of various different trends. In philosophy of science, the term used for a trend is paradigm. Typically, a particular paradigm is adopted by most of the research community and optimistic predictions about progress in the near-future are provided. For example, in the 1960s neural networks were widely believed to solve all AI problems by imitating the learning mechanisms in the nature, the human brain in particular. The next big thing was expert systems based on logic and human-coded rules, which was the dominant paradigm in the 1980s.


인공 지능의 역사는 다른 많은 과학 분야와 마찬가지로 다양한 경향의 출현을 목격했습니다. 과학 철학에서 추세에 사용되는 용어는 패러다임입니다. 일반적으로 특정 패러다임은 대부분의 연구 커뮤니티에서 채택하고 있으며 가까운 장래에 진행에 대한 낙관적 인 예측이 제공됩니다. 예를 들어, 1960 년대 신경망은 자연의 학습 메커니즘, 특히 인간의 두뇌를 모방하여 모든 AI 문제를 해결하는 것으로 널리 믿어졌습니다. 다음으로 큰 것은 논리와 인간 규범에 기반을 둔 전문가 시스템이었는데, 1980 년대 지배적 인 패러다임이었습니다.


The cycle of hype


In the beginning of each wave, a number of early success stories tend to make everyone happy and optimistic. The success stories, even if they may be in restricted domains and in some ways incomplete, become the focus on public attention. Many researchers rush into AI — or at least calling their research AI — in order to access the increased research funding. Companies also initiate and expand their efforts in AI in the fear of missing out (FOMO).


각 웨이브가 시작될 때 초기 성공 사례가 많아서 모든 사람들을 행복하고 낙관적으로 만드는 경향이 있습니다. 성공 사례는 제한된 영역에 있거나 어떤면에서 불완전하더라도 대중의 관심을 끌기 위한 것입니다. 많은 연구자들이 연구 자금 지원을 늘리기 위해 인공 지능을 연구하거나 적어도 자신의 연구를 AI 연구라고 명명합니다. 회사들은 자신들이 기회를 놓칠까봐 (FOMO fear of missing out) 두려워 AI 관련 사업을 시작하고 또 확장합니다.


So far, each time an all-encompassing, general solution to AI has been said to be within reach, progress has ended up running into insurmountable problems, which at the time were thought to be minor hiccups. In the case of neural networks in the 1960s, the hiccups were related to handling nonlinearities and to solving the machine learning problems associated with the increasing number of parameters required by neural network architectures. In the case of expert systems in the 1980s, the hiccups were associated with handling uncertainty and common sense. As the true nature of the remaining problems dawned after years of struggling and unsatisfied promises, pessimism about the paradigm accumulated and an AI winter followed: interest in the field faltered and research efforts were directed elsewhere.


지금까지 AI에 대한 포괄적이고 일반적 인 해결책이 나올 때 마다 또 다른 극복하기 어려운 문제점에 직면해 왔습니다. (그 당시에는 그것이 그렇게 심각한 문제라고 생각하지 않고 그냥 마이너한 문제 -minor hiccups- 라고 생각 했었습니다.)  1960 년대의 neural networks의 경우, hiccups은 nonlinearities 처리와 관련됐고 neural network architectures에 필요한 매개 변수의 숫자를 증가시킴으로서 machine learning 문제를 해결하는 것과 관련돼 있었습니다. 1980 년대의 전문가 시스템의 경우, hiccups은 불확실성과 상식을 다루는 것과 연관되어있었습니다. 수년간의 고군분투와 unsatisfied promises로 인해 남아있는 문제의 진정한 본질이 쌓여 감에 따라 패러다임에 대한 비관론과 AI 겨울이 뒤 따랐습니다. 이 분야에 대한 관심이 줄어들고 연구 노력이 다른 곳으로 향했습니다.


Modern AI


Currently, roughly since the turn of the millennium, AI has been on the rise again. Modern AI methods tend to focus on breaking a problem into a number of smaller, isolated and well-defined problems and solving them one at a time. Modern AI is bypassing grand questions about meaning of intelligence, the mind, and consciousness, and focusing on building practically useful solutions in real-world problems. Good news for us all who can benefit from such solutions!


현재 밀레니엄 시대가 시작된 이래로 인공 지능에 대한 관심은 다시 상승하고 있습니다. 현대 인공 지능 방법론은 문제를 다수의 작고 고립되고 잘 정의 된 문제로 분해하고 한 번에 하나씩 해결하는 데 초점을 맞추는 경향이 있습니다. 현대 인공 지능은 지능, 정신 및 의식의 의미에 대한 거창한 질문을 우회하고 실제 문제에서 실제적으로 유용한 솔루션을 구축하는 데 중점을 둡니다. 그러한 해결책을 누릴 수있는 모든 사람들에게 좋은 소식입니다!


Another characteristic of modern AI methods, closely related to working in the complex and “messy” real world, is the ability to handle uncertainty, which we demonstrated by studying the uses of probability in AI in Chapter 3. Finally, the current upwards trend of AI has been greatly boosted by the come-back of neural networks and deep learning techniques capable of processing images and other real-world data better than anything we have seen before.


복잡하고 지저분한 현실 세계에서 일하는 것과 밀접한 관련이있는 현대 인공 지능 방법의 또 다른 특징은 불확실성을 다루는 능력이며, 우리는 3 장에서 AI에서 확률의 사용을 연구함으로써 이것을 증명했습니다. 마지막으로, 현재의 인공 지능은 이전에 보았던 것보다 이미지 및 기타 실제 데이터를 처리 할 수있는 neural networks 및 deep learning 기술의 등장으로 크게 향상되었습니다.



Note

So are we in a hype cycle?

Whether the history will repeat itself, and the current boom will be once again followed by an AI winter, is a matter that only time can tell. Even if it does, and the progress towards better and better solutions slows down to a halt, the significance of AI in the society is going to stay. Thanks to the focus on useful solutions to real-world problems, modern AI research yields fruit already today, rather than trying to solve the big questions about general intelligence first — which was where the earlier attempts failed.


역사가 반복 될 지, 현재의 붐이 다시 AI 겨울이 뒤따를 지 여부는 시간 만 알 수있는 문제입니다. 그것이 더 좋고 더 나은 해결책을 향한 진전이 멈추더라도, 사회에서 AI의 중요성은 계속 남아있게 될 것입니다. 실제 문제에 대한 유용한 솔루션에 중점을 두어 현대 인공 지능 연구는 먼저 초기 시도가 실패한 일반적인 지능에 대한 커다란 질문을 해결하기보다는 오늘의 열매를 맺고 있습니다.



Prediction 1: AI will continue to be all around us



As you recall, we started by motivating the study of AI by discussing prominent AI applications that affect all ours lives. We highlighted three examples: self-driving vehicles, recommendation systems, and image and video processing. During the course, we have also discussed a wide range of other applications that contribute to the ongoing technological transition.


당신이 기억 하듯이, 우리는 우리의 모든 삶에 영향을 미치는 중요한 AI 응용 프로그램을 논의함으로써 AI 연구에 동기를 부여하기 시작했습니다. 우리는 세 가지 예를 강조했습니다 :자율 주행 차량, 추천 시스템, 이미지 및 비디오 프로세싱. 이 과정에서 진행중인 기술 전환에 기여하는 다양한 응용 프로그램에 대해서도 논의했습니다.


Note

AI making a difference

As a consequence of focusing on practicality rather than the big problems, we live our life surrounded by AI (even if we may most of the time be happily unaware of it): the music we listen to, the products we buy online, the movies and series we watch, our routes of transportation, and even the news and information that we have available, are all influenced more and more by AI. What is more, basically any field of science, from medicine and astrophysics to medieval history, is also adopting AI methods in order to deepen our understanding of the universe and of ourselves.


큰 문제보다는 실용성에 중점을 두는 결과로, 우리는 인공 지능으로 둘러싸인 삶을 살고 있습니다. 우리가 듣는 음악, 온라인으로 구매하는 제품, 영화 우리가보고있는 시리즈, 운송 경로, 심지어 우리가 이용할 수 있는 뉴스와 정보는 AI에 의해 점점 더 많은 영향을 받고 있습니다. 게다가 의학과 천체 물리학부터 medieval history에 이르기까지 기본적으로 과학 분야는 우주와 우리 자신에 대한 이해를 깊게하기 위해 AI 방법을 채택하고 있습니다.





Prediction 2: the Terminator isn't coming


One of the most pervasive and persistent ideas related to the future of AI is the Terminator. In case you should have somehow missed the image of a brutal humanoid robot with a metal skeleton and glaring eyes... well, that’s what it is. The Terminator is a 1984 film by director James Cameron. In the movie, a global AI-powered defense system called Skynet becomes conscious of its existence and wipes most of the humankind out of existence with nukes and advanced killer robots.


AI의 미래와 관련된 가장 보편적이고 지속적인 아이디어 중 하나는 터미네이터입니다. 당신이 어떻게 든 금속 골격과 눈부신 눈을 가진 잔인한 휴머노이드 로봇의 이미지를 놓쳐 버렸어야했다면 ... 그렇습니다. 터미네이터는 1984 년 James Cameron 감독의 영화입니다. 영화에서 Skynet이라고 불리는 글로벌 인공 지능 동력 방어 시스템은 그 존재를 의식하게되고 핵무기와 진보 된 킬러 로봇으로 대부분의 인류를 없애 버립니다.



Note

Two doomsday scenarios

There are two alternative scenarios that are suggested to lead to the coming of the Terminator or other similarly terrifying forms of robot uprising. In the first, which is the story from the 1984 film, a powerful AI system just becomes conscious and decides that it just really, really dislikes humanity in general.


터미네이터 또는 유사하게 무서운 형태의 로봇 반란으로 이어질 수 있다고 제안되는 두 가지 시나리오가 있습니다. 1984 년 영화의 첫 번째 이야기에서 강력한 인공 지능 시스템은 의식이 생겨서 인류가 정말로 정말로 싫다는 결정을 내립니다.

In the second alternative scenario, the robot army is controlled by an intelligent but not conscious AI system that is in principle in human control. The system can be programmed, for example, to optimize the production of paper clips. Sounds innocent enough, doesn’t it?


두 번째 대안 시나리오에서, 로봇 군대는 원칙적으로 인간의 통제하에 있는 지능형이지만 의식이 없는 인공 지능 시스템에 의해 제어됩니다. 예를 들어 종이 클립의 생산을 최적화하기 위해 시스템을 프로그래밍 할 수 있습니다. 이것은 별로 범죄적이지는 않죠?

However, if the system possesses superior intelligence, it will soon reach the maximum level of paper clip production that the available resources, such as energy and raw materials, allow. After this, it may come to the conclusion that it needs to redirect more resources to paper clip production. In order to do so, it may need to prevent the use of the resources for other purposes even if they are essential for human civilization. The simplest way to achieve this is to kill all humans, after which a great deal more resources become available for the system’s main task, paper clip production.


그러나 시스템이 우수한 지능을 보유하고 있다면 곧 에너지 및 원자재와 같은 가용 자원이 허용하는 최대 수준의 종이 클립 생산에 도달하게됩니다. 이 후에 종이 클립 제작에 더 많은 리소스를 필요로 한다는 결론에 도달 할 수 있습니다. 그렇게하기 위해서는 인간 문명에 필수적이라 할지라도 자원을 다른 용도로 사용하지 못하게 해야 할 수도 있습니다. 이것을 달성하는 가장 간단한 방법은 모든 인간을 죽이는 것입니다. 그 후에 많은 양의 자원이 시스템의 주요 작업 인 종이 클립 제작에 사용할 수 있게됩니다.



Why these scenarios are unrealistic


There are a number of reasons why both of the above scenarios are extremely unlikely and belong to science fiction rather than serious speculations of the future of AI.


위 시나리오가 모두 AI의 미래에 대한 심각한 추측 이라기보다는 과학 소설에 속하는 것이 극히 비현실적인 것이라는 여러가지 근거들이 있습니다.





Reason 1:

Firstly, the idea that a superintelligent, conscious AI that can outsmart humans emerges as an unintended result of developing AI methods is naive. As you have seen in the previous chapters, AI methods are nothing but automated reasoning, based the combination of perfectly understandable principles and plenty of input data, both of which are provided by humans or systems deployed by humans. To imagine that the nearest neighbor classifier, linear regression, the AlphaGo game engine, or even a deep neural network could become conscious and start evolving into a superintelligent AI mind requires a (very) lively imagination.


첫째, 인간보다 현명 할 수있는 지능적이고 의식이 있는 인공 지능이 인공 지능 방법을 개발 한 의도하지 않은 결과로 나타난다는 생각은 순진합니다. 이전 장에서 보았 듯이 인공 지능 방법은 사람이 배포 한 시스템이나 인간이 제공하는 완벽하게 이해할 수있는 원칙과 많은 입력 데이터의 조합을 기반으로하는 자동화 된 추론 일뿐입니다. nearest neighbor classifier, linear regression, AlphaGo 게임 엔진 또는 심지어 deep neural network가 의식을 갖게 되고 초능력 인공 지능 사고로 진화하는 것을 상상하기 위해서는 (매우) 활기찬 상상력이 필요합니다.


Note that we are not claiming that building human-level intelligence would be categorically impossible. You only need to look as far as the mirror to see a proof of the possibility of a highly intelligent physical system. To repeat what we are saying: superintelligence will not emerge from developing narrow AI methods and applying them to solve real-world problems. (Recall the narrow vs general AI from the section on the philosophy of AI in Chapter 1.)


우리는 인간 수준의 지능을 구축하는 것이 명백히 불가능하다고 주장하지는 않습니다. 고도로 지능적인 물리적 시스템의 가능성에 대한 증거를 보기 위해서는 거울까지만 봐야합니다. 다시 말하자면 : superintelligence은 narrow AI methods에서 나오지 않으며 단지 현실 세계의 문제를 해결하기 이해 적용될 뿐입니다. (제 1 장에서 인공 지능의 철학에 관한 섹션에서 narrow vs general AI를 생각해 보세요.)


Reason 2:


econdly, one of the favorite ideas of those who believe in superintelligent AI is the so called singularity: a system that optimizes and “rewires“ itself so that it can improve its own intelligence at an ever accelerating, exponential rate. Such superintelligence would leave humankind so far behind that we become like ants that can be exterminated without hesitation. The idea of exponential intelligence increase is unrealistic for the simple reason that even if a system could optimize its own workings, it would keep facing more and more difficult problems that would slow down its progress, quite like the progress of human scientists requires ever greater efforts and resources by the whole research community and indeed the whole society, which the superintelligent entity wouldn’t have access to. The human society still has the power to decide what we use technology, even AI technology, for. Much of this power is indeed given to us by technology, so that every time we make progress in AI techonology, we become more powerful and better at controlling any potential risks due to it.


둘째, superintelligent AI를 믿는 사람들이 좋아하는 아이디어 중 하나는 소위 특이성 (singularity)입니다. 즉, 가속화되고 기하 급수적 인 속도로 자체 지능을 향상시킬 수 있도록 최적화하고 스스로 "rewires"하는 시스템입니다. 그러한 superintelligent은 인류를 초월하게 되고 우리는 개미같은 존재가 되서 망설임 없이 제거되는 존재가 된다는 생각입니다. 기하 급수적 인 지능 증가에 대한 아이디어는 비현실적이라는 것을 간단하게 증명할 수 있습니다. 시스템이 자체적으로 최적화 할 수 있다고 하더라도 점점 단계가 진행 될 수록 점점 더 어려운 문제에 직면하게 되고 그 진행 속도는 점점 더 느려지게 될 겁니다. 인간 과학자들이 점점 더 많은 노력을 기울여야 하는것과 마찬가지로 전체 연구 기관에서도 더 많은 자원이 필요로 하게 되고 결국은 전체 사회의 더 많은 자원과 노력이 필요하게 됩니다. 결국 그러한 needs는 superintelligent entity가 접근할 수 없는 지점에 도달하게 됩니다. 그렇기 때문에 비 현실적이라는 겁니다. 

인간 사회는 아직 어떤 기술을 사용할 것인가에 대한 결정 권한이 있습니다. AI 기술에 대한 결정권한도 마찬가지죠. 이 파워의 상당부분은 결국 기술로서 우리에게 주어질 겁니다. 그리고 우리가 인공지능 기술에 대해 어떤 진전을 이룰 때마다 우리의 그러한 권한은 점점 더 강력해지고 그로 인해 잠재적인 리스크를 통제하는데 있어서도 더 많은 발전이 이루어지게 될 겁니다.



Note

The value alignment problem

The paper clip example is known as the value alignment problem: specifying the objectives of the system so that they are aligned with our values is very hard. However, suppose that we create a superintelligent system that could defeat humans who tried to interfere with its work. It’s reasonable to assume that such a system would also be intelligent enough to realize that when we say “make me paper clips”, we don’t really mean to turn the Earth into a paper clip factory of a planetary scale.


종이 클립 예제는 가치 정렬(value alignment) 문제로 알려져 있습니다. 시스템의 목표를 지정하여 우리의 가치대로 정렬되도록하는 것은 매우 어렵습니다. 우리가 우리의 일을 방해하고 결국은 인간을 패배시킬 수 있는 superintelligent system을 만들었다 고 가정 해보십시오. 그러한 시스템은 우리가 "make me paper clips"라고 말했을 때 이것이 지구를 행성 규모의 종이 클립 공장으로 바꾸는 것을 의미하지 않는다는 것을 깨닫기에 충분히 지능적이라고 가정하는 것이 합리적입니다.


Separating stories from reality


All in all, the Terminator is a great story to make movies about but hardly a real problem worth panicking about. The Terminator is a gimmick, an easy way to get a lot of attention, a poster boy for journalists to increase click rates, a red herring to divert attention away from perhaps boring, but real, threats like nuclear weapons, lack of democracy, environmental catastrophes, and climate change. In fact, the real threat the Terminator poses is the diversion of attention from the actual problems, some of which involve AI, and many of which don’t. We’ll discuss the problems posed by AI in what follows, but the bottom line is: forget about the Terminator, there are much more important things to focus on.


결국, 터미네이터는 영화를 만들기에는 아주 훌륭한 스토리이지만 그걸 현실적으로 받아들여 두려워 할 정도의 문제는 아닙니다. 터미네이터는 눈길을 끌기에 쉬운 방법이며, 저널리스트들에게 클릭률을 높이기 위한 좋은 소재이며 지루한 것에서 부터 주위를 끌 수 있는 빨간 청어 같은 것이죠. 하지만 실제 생활에서는 핵무기 같은 위협, 민주주의의 부재, 환경 재앙, 그리고 기후 변화 같은 것들이 주위를 끄는 이슈입니다. 사실, 터미네이터가 제기하는 진정한 위협은 이러한 실제 문제에서 관심을 돌리게 만드는 겁니다. 그러한 실제문제에는 실제 고민해야할 AI 관련 토픽도 있습니다. AI와 관련 한 실제 고민해야할 문제에 대해서는 다음에서 논의 할 것입니다. 이 글의 결론은 터미네이터를 잊어 버리고, 훨씬 더 중요한 것에 집중하자는 것입니다.



Exercise 24: What is the perception of AI?

For this exercise, we want you to think about how AI is portrayed. Do an online image search for the term “AI” and see what kinds of pictures come up. If you are using Google search, you should choose "Images" in the top of the screen.

What's the general impression you get about AI from the image search results? Is this an accurate representation of AI? Why or why not?


이 연습문제 에서는 AI가 어떻게 묘사되는지 생각해보기를 바랍니다. "AI"라는 용어에 대한 온라인 이미지 검색을 수행하고 어떤 종류의 그림이 나타나는지 봅니다. Google 검색을 사용하는 경우 화면 상단에서 '이미지'를 선택해야합니다.


이미지 검색 결과에서 AI에 대해 얻는 일반적인 인상은 무엇입니까? 이것이 AI의 정확한 표현입니까? 왜 그렇습니까?



반응형

Elements of AI - Advanced neural network techniques

2018. 6. 25. 04:12 | Posted by 솔웅


반응형

Elements of AI





III.Advanced neural network techniques





In the previous section, we have discussed the basic ideas behind most neural network methods: multilayer networks, non-linear activation functions, and learning rules such as the backpropagation algorithm.


이전 섹션에서는 neural network 방법의 기본 아이디어 인 multilayer networks, non-linear activation functions 및 backpropagation algorithm 과 같은 것들을 알아 보았습니다.




They power almost all modern neural network applications. However, there are some interesting and powerful variations of the theme that have lead to great advances in deep learning in many areas.


그들은 거의 모든 modern neural network applications을 지원합니다. 그것과 관련해 흥미롭고 강력한 여러 다양한 변형들이 나타남으로서 많은 분야에서 deep learning의 큰 진보를 이끌었습니다. 





Convolutional neural networks (CNNs)


One area where deep learning has achieved spectacular success is image processing. The simple classifier that we studied in detail in the previous section is severely limited – as you noticed it wasn't even possible to classify all the smiley faces correctly. By adding more layers in the network and using backpropagation to learn the weights does in principle solve the problem, but another one emerges: the number of weights becomes extremely large and consequently, the amount of training data required to achieve satisfactory accuracy can become too large to be realistic.



deep learning이 큰 성공을 거둔 분야 중 하나는 image processing 분야 입니다. 이전 섹션에서 자세히 공부 한 simple classifier는 굉장히 제한적입니다. 여러분도 모든 웃는 얼굴을 올바르게 분류 할 수는 없다는 것을 눈치 채셨을 겁니다. 네트워크에 더 많은 레이어를 추가하고 backpropagation을 사용하여 weights를 학습하면 원칙적으로 문제가 해결되지만, weights 수가 극도로 커지고 결과적으로 만족할만한 정확도를 달성하는 데 필요한 교육 데이터의 양이 구현하기에는 너무 커질 수 있습니다.



Fortunately, a very elegant solution to the problem of too many weights exists: a special kind of neural networks, or rather, a special kind of layer that can be included in a deep neural network. This special kind of layer is a so called convolutional layer. Networks including convolutional layers are called convolutional neural networks (CNNs). Their key property is that they can detect image features such as bright or dark (or specific color) spots, edges in various orientations, patterns, and so on. These form the basis for detecting more abstract features such as a cat’s ears, a dog’s snout, a person’s eye, or the octagonal shape of a stop sign. It would normally be hard to train a neural network to detect such features based on the pixels of the input image, because the features can appear in different positions, different orientations, and in different sizes in the image: moving the object or the camera angle will change the pixel values dramatically even if the object itself looks just the same to us. In order to learn to detect a stop sign in all these different conditions would require vast of amounts of training data because the network would only detect the sign in conditions where it has appeared in the training data. So, for example, a stop sign in the top right corner of the image would be detected only if the training data included an image with the stop sign in the top right corner. CNNs can recognize the object anywhere in the image no matter where it has been observed in the training images.



다행스럽게도, 너무 많은 weights 문제에 대한 매우 우아한 해결책이 있습니다. 특수한 종류의 neural networks 또는 심층 신경 네트워크에 포함될 수있는 특별한 종류의 계층이 있습니다. 이 특별한 종류의 레이어는 소위 convolutional layer입니다. convolutional 계층을 포함한 네트워크를 convolutional neural networks, CNN 이라고합니다. 그들의 핵심 속성은 밝거나 어두운 (또는 특정 색) 반점, 다양한 방향의 모서리, 패턴 등과 같은 이미지 피처를 감지 할 수 있다는 것입니다. 이들은 고양이의 귀, 개 주둥이, 사람의 눈 또는 정지 신호의 팔각형 모양과 같은 보다 추상적 인 특징을 탐지하기 위한 기초를 형성합니다. 피쳐가 다른 위치, 다른 방향 및 이미지의 다른 크기로 나타날 수 있기 때문에 일반적으로 입력 이미지의 픽셀을 기반으로 이러한 피쳐를 감지하도록 neural networks을 학습하는 것이 어려울 것입니다. 객체 또는 카메라 각도 이동 객체 자체가 우리에게 똑같이 보일지라도 픽셀 값을 극적으로 바꿀 것입니다. 이러한 모든 조건에서 정지 신호를 감지하는 것을 배우려면 네트워크가 교육 데이터에 나타난 징후 만 감지하기 때문에 엄청난 양의 교육 데이터가 필요합니다. 따라서 예를 들어, 오른쪽 상단 모서리에 정지 신호가 있는 이미지가 교육 데이터에 포함 된 경우에만 이미지 오른쪽 상단의 정지 신호가 감지됩니다. CNN은 트레이닝 이미지에서 관찰 된 위치에 관계없이 이미지의 어느 곳에서나 오브젝트를 인식 할 수 있습니다.




AWS DeepLens - Deep learning enabled video camera for developers


아마존 AWS DeepLens는 Deep learning을 배울 수 있는 개발자용 비디오 카메라 입니다.
2018년 6월부터 판매하고 있습니다. 구매를 원하시면 위 이미지 링크를 클릭하세요.




Note

Why we need CNNs

CNNs use a clever trick to reduce the amount of training data required to detect objects in different conditions. The trick basically amounts to using the same input weights for many neurons — so that all of these neurons are activated by the same pattern — but with different input pixels. We can for example have a set of neurons that are activated by a cat’s pointy ear. When the input is a photo of a cat, two neurons are activated, one for the left ear and another for the right. We can also let the neuron’s input pixels be taken from a smaller or a larger area, so that different neurons are activated by the ear appearing in different scales (sizes), so that we can detect a small cat's ears even if the training data only included images of big cats.


CNN은 다른 조건에서 개체를 탐지하는 데 필요한 교육 데이터의 양을 줄이기 위해 영리한 트릭을 사용합니다. 트릭은 기본적으로 많은 뉴런에 대해 동일한 입력 가중치를 사용하므로 모든 뉴런이 동일한 패턴으로 활성화되지만 입력 픽셀은 다릅니다. 우리는 예를 들어 고양이의 뾰족한 귀로 활성화되는 일련의 뉴런을 가질 수 있습니다. 입력 사진이 고양이의 사진 인 경우 두 개의 뉴런이 활성화됩니다. 하나는 왼쪽 귀에, 다른 하나는 오른쪽에 활성화됩니다. 또한 뉴런의 입력 픽셀을 작거나 큰 영역에서 가져 와서 다른 뉴런이 다른 크기 (크기)로 나타나는 귀에 의해 활성화되도록하여 훈련 데이터만으로도 작은 고양이의 귀를 감지 할 수 있습니다 큰 고양이의 이미지가 포함되어 있습니다.



The convolutional neurons are typically placed in the bottom layers of the network, which processes the raw input pixels. Basic neurons (like the perceptron neuron discussed above) are placed in the higher layers, which process the output of the bottom layers. The bottom layers can usually be trained using unsupervised learning, without a particular prediction task in mind. Their weights will be tuned to detect features that appear frequently in the input data. Thus, with photos of animals, typical features will be ears and snouts, whereas in images of buildings, the features are architectural components such as walls, roofs, windows, and so on. If a mix of various objects and scenes is used as the input data, then the features learned by the bottom layers will be more or less generic. This means that pre-trained convolutional layers can be reused in many different image processing tasks. This is extremely important since it is easy to get virtually unlimited amounts of unlabeled training data - images without labels - which can be used to train the bottom layers. The top layers are always trained by supervised machine learning techniques such as backpropagation.



convolutional neurons은 일반적으로 raw input 픽셀을 처리하는 네트워크의 맨 아래 계층에 배치됩니다. 위에서 언급 한 퍼셉트론 뉴런과 같은 기본 뉴런은 상위 계층에 배치되며 하위 계층의 출력을 처리합니다. 맨 아래 계층은 일반적으로 특정 예측 작업을 염두에 두지 않고 unsupervised learning을 사용하여 학습 할 수 있습니다. weights는 입력 데이터에 자주 나타나는 피쳐를 감지하도록 조정됩니다. 따라서 동물의 사진과 함께 전형적인 특징은 귀와 주둥이 일 것이고 건물의 이미지에서는 벽, 지붕, 창 등과 같은 건축 적 구성 요소입니다. 다양한 오브젝트와 장면의 혼합이 입력 데이터로 사용되면 하단 레이어에서 학습 한 기능이 다소 일반적인 것입니다. 이것은 미리 훈련 된 convolutional 레이어가 많은 다른 이미지 처리 작업에서 재사용 될 수 있음을 의미합니다. 분류되지 않은 교육 데이터 (레이블이없는 이미지)를 사실상 무제한으로 쉽게 얻을 수 있기 때문에 이는 매우 중요합니다.이 이미지는 맨 아래 계층을 교육하는 데 사용할 수 있습니다. 최상위 레이어는 항상 역 전파와 같은 supervised machine learning 기술에 의해 교육됩니다.





Do neural networks dream of electric sheep? Generative adversarial networks (GANs)


Having learned a neural network from data, it can be used for prediction. Since the top layers of the network have been trained in a supervised manner to perform a particular classification or prediction task, the top layers are really useful only for that task. A network trained to detect stop signs is useless for detecting handwritten digits or cats.



데이터로부터 neural network를 학습하면 prediction에 사용할 수 있습니다. 네트워크의 최상위 계층이 특정 분류 또는 예측 작업을 수행하기 위해 supervised manner로 교육 되었기 때문에 최상위 계층은 해당 작업에만 유용합니다. 정지 신호를 탐지하도록 훈련 된 네트워크는 handwritten digits 나 고양이를 탐지하는 데 쓸모가 없습니다.



A fascinating result is obtained by taking the pre-trained bottom layers and studying what the features they have learned look like. This can be achieved by generating images that activate a certain set neurons in the bottom layers. Looking at the generated images, we can see what the neural network “thinks” a particular feature looks like, or what an image with a select set of features in it would look like. Some even like to talk about the networks “dreaming” or “hallucinating” images (see Google’s DeepDream system).



매혹적인 결과는 사전 훈련 된 최하층을 취하고 그들이 배운 기능이 어떻게 생겼는지 연구함으로써 얻을 수 있습니다. 이것은 최하위 계층에서 특정 set neurons을 활성화하는 이미지를 생성하여 얻을 수 있습니다. 생성 된 이미지를 살펴보면, 신경망이 특정 기능을 어떻게 보는지, 또는 특정 기능 세트가 있는 이미지가 어떤 모습인지를 알 수 있습니다. 일부는 심지어 "꿈꾸는 dreaming"또는 "환각적인 hallucinating" 이미지 (Google의 DeepDream 시스템 참조)에 대해 이야기하기를 좋아합니다.



Note

Be careful with metaphors

However, we’d like to once again emphasize the problem with metaphors such as dreaming when simple optimization of the input image is meant — remember the suitcase words discussed in Chapter 1. The neural network doesn’t really dream, and it doesn’t have a concept of a cat that it would understand in a similar sense as a human understands. It is simply trained to recognize objects and it can generate images that are similar to the input data that it is trained on.


그러나 우리는 입력 이미지의 단순한 optimization이 의미하는 은유적인 문제가 의미하는 것을 다시한번 강조하고자 합니다. 1 장에서 논의 된 suitcase 단어를 생각해 보세요. neural network은 실제로 꿈도 꾸지도 못합니다. 인간이 이해하는 것과 비슷한 의미로 이해할 수있는 고양이 개념을 가지고 있지 않습니다. 그것은 단순히 물체를 인식하도록 훈련되었으며 훈련 된 입력 데이터와 유사한 이미지를 생성 할 수 있습니다.





To actually generate real looking cats, human faces, or other objects (you’ll get whatever you used as the training data), Ian Goodfellow who currently works at Google Brain, proposed a clever combination of two neural networks. The idea is to let the two networks compete against each other. One of the networks is trained to generate images like the ones in the training data. The other network’s task is to separate images generated by the first network from real images from the training data — it is called the adversarial network, and the whole system is called generative adversarial network or a GAN.



진짜로 보이는 고양이, 인간의 얼굴 또는 다른 객체 (당신이 훈련 데이터로 사용한 것은 무엇이든지)를 생성하기 위해, 현재 Google Brain에서 일하고있는 Ian Goodfellow는 두 개의 신경 네트워크를 영리하게 조합 할 것을 제안했습니다. 아이디어는 두 네트워크가 서로 경쟁하게 하는 것입니다. 네트워크 중 하나는 training data에 있는 것과 같은 이미지를 생성하도록 교육되었습니다. 다른 네트워크의 임무는 첫 번째 네트워크에서 생성 된 이미지를 훈련 데이터의 실제 이미지와 분리하는 것입니다.이 이미지를 adversarial network라고 하며, 전체 시스템을 generative adversarial network 또는 GAN이라고합니다.



The system trains the two models side by side. In the beginning of the training, the adversarial model has an easy task to tell apart the real images from the training data and the clumsy attempts by the generative model. However, as the generative network slowly gets better and better, the adversarial model has to improve as well, and the cycle continues until eventually the generated images are almost indistinguishable from real ones. The GAN tries to not only reproduce the images in the training data: that would be a way too simple strategy to beat the adversarial network. Rather, the system is trained so that it has to be able to generate new, real-looking images too.



이 시스템은 두 모델을 나란히 훈련시킵니다. 훈련이 시작될 때, adversarial 모델은 훈련 데이터로부터 실제 이미지를 분리하고 생성 모델에 의한 서투른 (clumsy) 시도를 쉽게 구분할 수 있습니다. 그러나 generative 네트워크가 서서히 향상되면서 adversarial 모델도 개선되어야 하고 결국 생성 된 이미지가 실제 이미지와 거의 구별되지 않을 때까지 사이클이 계속됩니다. GAN은 훈련 데이터에서 이미지를 재현하는 것뿐만 아니라 adversarial 네트워크를 이길 수 있는 간단한 전략이기도합니다. 오히려 시스템은 새로운 실제 이미지를 생성 할 수 있도록 훈련되어 있습니다.






The above images were generated by a GAN developed by NVIDIA in a project led by Prof Jaakko Lehtinen (see this article for more details).

Could you have recognized them as fakes?



위 이미지는 Jaakko Lehtinen 교수가 이끄는 프로젝트에서 NVIDIA가 개발 한 GAN에 의해 생성되었습니다 (자세한 내용은이 기사 참조).


여러분은 이게 가짜인지 알아 차리실 수 있습니까?






After completing Chapter 5 you should be able to:

  • Explain what a neural network is and where they are being successfully used
  • Understand the technical methods that underpin neural networks




반응형

Elements of AI - How neural networks are built

2018. 6. 25. 00:30 | Posted by 솔웅


반응형



Elements of AI



II.How neural networks are built





As we said earlier, neurons are very simple processing units. Having discussed linear and logistic regression in Chapter 4, the essential technical details of neural networks can be seen as slight variations of the same idea.


앞서 말했듯이 뉴런은 매우 간단한 처리 단위입니다. 4 장에서 선형 및 로지스틱 회귀에 대해 배웠습니다., 신경망(neural networks)의 핵심 기술의 세부 사항은 그것들과 같은 아이디어에서 약간의 변형을 한 것일 뿐이라는 것을 아시게 될 겁니다.




Note

Weights and inputs

The basic artificial neuron model involves a set of adaptive parameters, called weights like in linear and logistic regression. Just like in regression, these weights are used as multipliers on the inputs of the neuron, which are added up. The sum of the weights times the inputs is called the linear combination of the inputs. You can probably recall the shopping bill analogy: you multiply the amount of each item by its price per unit and add up to get the total.


기본 artificial neuron 모델은 linear 및 logistic regression에서 사용되는 weights 라고하는 adaptive parameters의 세트를 포함합니다. regression와 마찬가지로, 이러한 weights는 더 해지는 뉴런의 입력에 승수로 사용됩니다. weights에 입력 값을 곱한 값의 합을 linear combination이라고합니다. 우리는 shopping bill analogy를 떠 올릴 수 있습니다. 각 항목당 가격에 그 갯수를 곱한 다음 그것들을 합하여 청구금액을 구했습니다. 





If we have a neuron with six inputs (analogous to the amounts of the six shopping items: potatoes, carrots, and so on), input1, input2, input3, input4, input5, and input6, we also need six weights. The weights are analogous to the prices of the items. We’ll call them weight1, weight2, weight3, weight4, weight5, and weight6. In addition, we’ll usually want to include an intercept term like we did in linear regression. This can be thought of as a fixed additional charge due to processing a credit card payment, for example.



우리가 여섯 개의 입력에 한개의 뉴런을 가지고 있다고 합시다. (6개의 쇼핑 아이템들의 amounts와 유사합니다: 감자, 당근 등등), input1, input2, input3, input4, input5 및 input6과 같은 여섯 개의 입력을 갖는 뉴런을 가지고 있다면 여섯 개의 weights도 필요합니다. weights는 품목 가격과 유사합니다. 우리는 그것을 weight1, weight2, weight3, weight4, weight5 및 weight6이라고합니다. 또한 linear regression에서 했던것과 같은 intercept term을 포함하기를 원합니다. 이것은 예를 들어 신용 카드 지불 처리로 인해 생기는 고정 된 추가 비용이라고 생각할 수 있습니다.




We can then calculate the linear combination like this: linear combination = intercept + weight1 × input1 + ... + weight6 × input6 (where the ... is a shorthand notation meaning that the sum include all the terms from 1 to 6).



그 다음 우리는 다음과 같이 linear combination을 계산할 수 있습니다.

linear combination = intercept + weight1 × input1 + ... + weight6 × input6 

(여기서 ...는 합계에 1에서 6까지의 모든 항이 포함되어 있음을 의미하는 약식 표기입니다.)



With some example numbers we could then get:


숫자로 하면 다음과 같이 됩니다.



10.0 + 5.4 × 8 + (-10.2) × 5 + (-0.1) × 22 + 101.4 × (-5) + 0.0 × 2 + 12.0 × (-3) = -543.0




AWS DeepLens - Deep learning enabled video camera for developers

아마존 AWS DeepLens는 Deep learning을 배울 수 있는 개발자용 비디오 카메라 입니다.
2018년 6월부터 판매하고 있습니다. 구매를 원하시면 위 이미지 링크를 클릭하세요.




Exercise 21: Weights and inputs


In this exercise, consider the following expression that has both weights and inputs: 10.0 + 5.4 × 8 + (-10.2) × 5 + (-0.1) × 22 + 101.4 × (-5) + 0.0 × 2 + 12.0 × (-3) = -543.0




What is the intercept term in the expression? 

a) 543.0 

b) 10.0 

c) -3 

d) 5.4?



What are the inputs? 

a) 8, 5, 22, -5, 2, -3 

b) 5.4, 8, -10.2, 5, -0.1, 22, 101.4, -5, 0.0, 2, 12.0, -3 

c) 5.4, -10.2, -0.1, 101.4, 0.0, 12.0 

d) 43.2, -51.0, -2.2, -507.0, 0.0, -36.0



Which of the inputs needs to be changed the least to increase the output by a certain amount? 

a) first 

b) second 

c) third 

d) fourth



What happens when the fifth input is incremented by one? 

a) nothing 

b) the output increases by one 

c) the output increases by two 

d) something else




The weights are almost always learned from data using the same ideas as in linear or logistic regression, as discussed previously. But before we discuss this in more detail, we’ll introduce another important stage that a neuron completes before it sends out an output signal.



weights는 이전에 논의 된 것처럼 linear 또는 logistic regression 에서와 같은 아이디어를 사용하여 거의 항상 데이터로부터 얻어지게 됩니다. 우리가 좀 더 자세한 것들을 논의하기 전에 다른 중요한 stage를 소개해 드릴 겁니다. 그것은 뉴런이 출력 신호를 보내기 전에 완성하게 되는 것입니다.




Activations and outputs


Once the linear combination has been computed, the neuron does one more operation. It takes the linear combination and puts it through a so called activation function. Typical examples of the activation function include:



일단 linear combination이 계산되면, 뉴런은 한 번 더 연산을 수행합니다. linear combination을 취하여 소위 활성화 함수를 통해 전달합니다. activation function의 일반적인 예는 다음과 같습니다.



  • identity function: do nothing and just output the linear combination
  • step function: if the value of the linear combination is greater than zero, send a pulse (ON), otherwise do nothing (OFF)
  • sigmoid function: a “soft” version of the step function


- identity function : 아무것도 하지 않고 선형 조합 만 출력합니다.

- step function : linear combination의 값이 0보다 큰 경우 펄스를 보내고 (ON), 그렇지 않으면 아무 것도 하지 않습니다 (OFF)

- sigmoid function : 스텝 함수의 "soft"버전




Note that with the first activation function, the identity function, the neuron is exactly the same as linear regression. This is why the identity function is rarely used in neural networks: it leads to nothing new and interesting.


첫 번째 activation function 인 identity function의 경우, 뉴런은 linear regression와 정확히 동일합니다. 이것이 identity function이 neural networks에서 거의 사용되지 않는 이유입니다. 그것은 새롭고 흥미로운 것은 없습니다.



Note

How neurons activate

Real, biological neurons communicate by sending out sharp, electrical pulses called “spikes”, so that at any given time, their outgoing signal is either on or off (1 or 0). The step function imitates this behavior. However, artificial neural networks tend to use the second kind of activation functions so that they output a continuous numerical activation level at all times. Thus, to use a somewhat awkward figure of speech, real neurons communicate by something similar to the Morse code, whereas artificial neurons communicate by adjusting the pitch of their voice as if yodeling.


실제, 생물학적 뉴런은 "스파이크 (spikes)"라고하는 날카로운 전기 펄스를 전송함으로써 communicate 합니다. 즉 어떤 주어진 시간에 발신 신호가 켜지거나 꺼지게 됩니다 (1 또는 0). step function는 이 동작을 모방합니다. 그러나 artificial neural은 항상 두 번째 종류의 activation functions을 사용하려고 합니다. 그래서 지속적으로 numerical activation level을 출력합니다. 약간 이상한 표현을 하면 실제 뉴런은 모르스 부호와 비슷한 방식으로 의사 소통하는 반면, 인공 뉴런은 그들의 요괴와 같은 목소리를 조정함으로서 소통을 합니다.




The output of the neuron, determined by the linear combination and the activation function, can be used to extract a prediction or a decision. For example, if the network is designed to identify a stop sign in front of a self-driving car, the input can be the pixels of an image captured by a camera attached in front of the car, and the output can be used to activate a stopping procedure that stops the car before the sign.



linear combination 및 activation function에 의해 결정되는 뉴런의 출력은 예측 또는 결정을 추출하는 데 사용될 수 있습니다. 예를 들어, 그 네트워크가 주율 주행 중인 자동차 앞에서 정지 신호를 식별하도록 설계된 경우, 입력은 자동차 앞쪽에 부착 된 카메라로 캡처 한 이미지의 픽셀 일 수 있으며 출력을 사용하여 표지판 앞에서 차를 멈추는 정지 절차를 실행하게 됩니다.



Learning or adaptation in the network occurs when the weights are adjusted so as to make the network produce the correct outputs, just like in linear or logistic regression. Many neural networks are very large, and the largest contain hundreds of billions of weights. Optimizing them all can be a daunting task that requires massive amounts of computing power.



linear 또는 logistic regression와 마찬가지로 네트워크가 올바른 출력을 생성 할 수 있도록 weights가 조정될 때 네트워크에서의 학습(Learning) 또는 적응(adaptation)이 발생합니다. 많은 neural networks들은 그 규모가 매우 크며, 가장 큰 신경망은 수천억 개의 weights를 포함합니다. 이들 모두를 최적화하는 것은 엄청난 양의 컴퓨팅 능력을 요구하는 어려운 작업 일 수 있습니다.







Exercise 22: Activations and outputs

Below are graphs for three different activation functions with different properties. First we have the sigmoid function, then the step function, and finally the identity function.


다음은 서로 다른 특성을 가진 세 가지 다른 activation functions에 대한 그래프입니다. 먼저 sigmoid functions, step functions, 마지막으로 identity functions를 사용합니다.













Which of the activations described above give: 

the largest output for an input of 5?

Sigmoid

Linear

Step


the smallest output for an input of -5?

Sigmoid

Linear

Step


the largest output for an input of -2.5?

Sigmoid

Linear

Step




Perceptron: the mother of all ANNs


The perceptron is simply a fancy name for the simple neuron model with the step activation function we discussed above. It was among the very first formal models of neural computation and because of its fundamental role in the history of neural networks, it wouldn’t be unfair to call it the “Mother of all Artificial Neural Networks”.



perceptron은 위에서 논의한 step activation function가있는 간단한 뉴런 모델의 멋진 이름입니다. 그것은 neural computation의 최초의 공식 모델 중 하나 였고 신경망의 역사에서 기초가 되는 역할을 하기 때문에 "모든 Artificial Neural Networks의 어머니"라고 부른다고 해서 틀린 말은 아닙니다.



It can be used as a simple classifier in binary classification tasks. A method for learning the weights of the perceptron from data, called the Perceptron algorithm, was introduced by the psychologist Frank Rosenblatt in 1957. We will not study the Perceptron algorithm in detail. Suffice to say that it is just about as simple as the nearest neighbor classifier. The basic principle is to feed the network training data one example at a time. Each misclassification leads to an update in the weight.



이진 분류(binary classification) 작업에서 간단한 classifier로 사용될 수 있습니다. 퍼셉트론 (Perceptron) 알고리즘이라고 불리는 데이터로부터 퍼셉트론의 가중치를 학습하는 방법은 1957 년 심리학자 Frank Rosenblatt에 의해 도입되었습니다. 우리는 Perceptron 알고리즘을 자세히 연구하지는 않을 것입니다. 그것이 nearest neighbor classifier만큼이나 간단하다고 말할 수 있습니다. 기본 원리는 한 번에 한 가지 예를 들어 네트워크 교육 데이터를 제공하는 것입니다. 각 misclassification에 대해서는 weight가 업데이트됩니다.




Note

AI hyperbole

After its discovery, the Perceptron algorithm received a lot of attention, not least because of optimistic statements made by its inventor, Frank Rosenblatt. A classic example of AI hyperbole is a New York Times article published on July 8th, 1958:
“The Navy revealed the embryo of an electronic computer today that it expects will be able to walk, talk, see, reproduce itself and be conscious of its existence.”

Please note that neural network enthusiasts are not at all the only ones inclined towards optimism. The rise and fall of the logic-based expert systems approach to AI had all the same hallmark features of an AI-hype and people claimed that the final breakthrough is just a short while away. The outcome both in the early 1960s and late 1980s was a collapse in the research funding called an AI Winter.


Perceptron 알고리즘을 발견 한 후 이는 많은 주목을 받았는데, 그 이유는 적어도 발명자 인 Frank Rosenblatt가 말한 낙관적 인 진술(optimistic statements) 때문이었습니다. AI hyperbole의 고전적인 예는 1958 년 7 월 8 일에 출판 된 New York Times의 기사입니다.

"해군은 오늘 전자 컴퓨터의 배아가 걸을 수 있고, 말하고,보고, 복제하고, 존재를 의식 할 수있을 것으로 기대한다고 밝혔다.


신경망 애호가가 낙관적 인 경향이있는 것은 아닙니다. AI에 대한 logic-based expert systems 접근법의 인기 상승과 하락은 AI-hype(과장된 AI)의 그것과 거의 같이 갔습니다. 사람들은 최종 목표 지점이 얼마 안 남았다고 주장했죠. 1960 년대 초반과 1980 년대 후반의 두 접근법이 보여준 결과는 AI Winter라고하는 연구 기금의 붕괴였다.




The history of the debate that eventually lead to almost complete abandoning of the neural network approach in the 1960s for more than two decades is extremely fascinating. The article A Sociological Study of the Official History of the Perceptrons Controversy by Mikel Olazaran (published in Social Studies of Science, 1996) reviews the events from a sociology of science point of view. Reading it today is quite thought provoking. Reading stories about celebrated AI heroes who had developed neural networks algorithms that would soon reach the level of human intelligence and become self-conscious can be compared to some statements made during the current hype. If you take a look at the above article, even if you wouldn't read all of it, it will provide an interesting background to today's news. Consider for example an article in the MIT Technology Review published in September 2017, where Jordan Jacobs, co-founder of a multimillion dollar Vector institute for AI compares Geoffrey Hinton (a figure-head of the current deep learning boom) to Einstein because of his contributions to development of neural network algorithms in the 1980s and later. Also recall the Human Brain project mentioned in the previous section.



결국 20 년 넘게 계속된 1960 년대식 neural network 접근법이 완전히 포기하게 되는 과정의 논쟁은 아주 많이 흥미롭습니다. 미켈 올 라자 란 (Mikel Olazaran)의 퍼셉트론 논란 (Perceptrons Controversy)의 공식 역사에 관한 사회 학적 연구 (1996 년 사회학 출판)는 과학적 관점에서 사회학의 사건을 검토합니다. 오늘 그것을 읽는 것은 상당히 자극적이라고 생각합니다. 곧 인간 지능 수준에 도달하고 자의식이되는 신경 회로망 알고리즘을 개발 한 유명한 AI 영웅에 관한 이야기를 읽는 것은 현재 과대 광고 중에 작성된 일부 표현과 비교할 수 있습니다. 위의 기사를 살펴보면 모든 기사를 읽지 않더라도 오늘의 뉴스에 흥미로운 배경을 제공합니다. 예를 들어, 2017 년 9 월에 발표 된 MIT Technology Review의 기사에서 인공 지능을 위한 수백만 달러짜리 벡터 neural network 알고리즘의 개발에 공헌한 정도를 아인슈타인과 비교하기도 합니다. 이전 섹션에서 언급 한 Human Brain 프로젝트를 상기 해보십시오.



According to Hinton, “the fact that it doesn’t work is just a temporary annoyance.” (Although according to the article, Hinton is laughing about the above statement, so it's hard to tell how serious he is about it.) The Human Brain project claims to be “close to a profound leap in our understanding of consciousness“. Doesn't that sound familiar?



Hinton에 따르면, "그것이 제대로 작동하지 않는다는 팩트는 그냥 일시적인 불편함일 뿐이다."(기사에 따르면 Hinton은 위의 문장에 대해 웃음을 짓고 있지만 그가 얼마나 그것에 대해 serious 했는지에 대해서는 자세하 알 수 없습니다.) The uman Brain 프로젝트는 "의식에 대한 우리의 이해에 있어 중대한 도약에 가깝다"고 주장합니다. 왠지 그 표현이 귀에 익숙하지 않으세요?



No-one really knows the future with certainty, but knowing the track record of earlier annoucements of imminent breakthroughs, some critical thinking is advised. We'll return to the future of AI in the final Chapter, but for now, let's see how artificial neural networks are built.


아무도 확실하게 미래를 알지 못하지만, 그것을 해결하기 위해 연구한 이전에 발표 들을 따라가다 보면 더 낳은 어떤 중요한(비판적인) 생각들을 할 수 있습니다.  우리는 마지막 장에서 인공 지능의 미래로 돌아갈 것이지만, 지금은 인공 신경 네트워크가 어떻게 만들어 지는지 보도록하겠습니다.




Putting neurons together: networks



A single neuron would be way too simple to make decisions and prediction reliably in most real-life applications. To unleash the full potential of neural networks, we can use the the output of one neuron as the input of other neurons, whose outputs can be the input to yet other neurons, and so on. The output of the whole network is obtained as the output of a certain subset of the neurons, which are called the output layer. We’ll return to this in a bit, after we discussed the way neural networks adapt to produce different behaviors by learning their parameters from data.



하나의 뉴런은 대부분의 실제 애플리케이션에서 안정적으로 의사 결정과 예측을 내리기에는 너무 단순합니다. 신경 네트워크의 모든 잠재력을 발휘하기 위해 우리는 한 뉴런의 출력을 다른 뉴런의 입력으로 사용할 수 있으며 그 출력은 다른 뉴런에 대한 입력이 될 수 있어야 합니다. 전체 네트워크의 출력은 출력 레이어라고하는 뉴런의 특정 하위 집합의 출력으로 얻어집니다. 우리는 신경 네트워크가 데이터로부터 매개 변수를 학습함으로써 다른 행동을 생산하는 방식에 대해 논의한 후에 이 부분으로 조금 돌아가 보겠습니다.



Key terminology

Layers

Often the network architecture is composed of layers. The input layer consists of neurons that get their inputs directly from the data. So for example, in an image recognition task, the input layer would use the pixel values of the input image as the inputs of the input layer. The network typically also has hidden layers that use the other neurons´ outputs as their input, and whose output is used as the input to other layers of neurons. Finally, the output layer produces the output of the whole network. All the neurons on a given layer get inputs from neurons on the previous layer and feed their output to the next.


종종 네트워크 아키텍처는 레이어로 구성됩니다. 입력 레이어는 데이터에서 직접 입력을받는 뉴런으로 구성됩니다. 예를 들어 이미지 인식 작업에서 입력 레이어는 입력 이미지의 픽셀 값을 입력 레이어의 입력으로 사용합니다. 네트워크는 일반적으로 입력으로 다른 뉴런의 출력을 사용하는 숨겨진 레이어가 있으며, 출력은 뉴런의 다른 레이어에 대한 입력으로 사용됩니다. 마지막으로 출력 레이어는 전체 네트워크의 출력을 생성합니다. 주어진 레이어의 모든 뉴런은 이전 레이어의 뉴런에서 입력을 받아 다음 레이어로 출력합니다.




A classical example of a multilayer network is the so called multilayer perceptron. As we discussed above, Rosenblatt’s Perceptron algorithm can be used to learn the weights of a perceptron. For multilayer perceptron, the corresponding learning problem is way harder and it took a long time before a working solution was discovered. But eventually, one was invented: the so called backpropagation algorithm lead to a revival of neural networks in the late 1980s. It is still at the heart of many of the most advanced deep learning solutions.



다층 네트워크의 고전적인 예는 소위 다층 퍼셉트론 (multilayer perceptron)이라고 합니다. 위에서 언급했듯이 Rosenblatt의 Perceptron 알고리즘을 사용하여 퍼셉트론의 weights를 학습 할 수 있습니다. 다층 퍼셉트론의 경우, 해당 학습 문제가 더욱 어렵습니다. 그 작업의 솔루션을 발견하기까지는 더 많은 시간이 걸릴겁니다. 그러나 결과적으로, 하나는 발명되었습니다. : 소위 역 전파 알고리즘은 1980 년대 후반에 신경 회로망을 부활시키게 됩니다. 그것은 여전히 가장 진보 된 많은 deep learning 솔루션의 핵심입니다.



Note

Meanwhile in Helsinki...

The path(s) leading to the backpropagation algorithm are rather long and winding. An interesting part of the history is related to the computer science department of the University of Helsinki. About three years after the founding of the department in 1967, a Master’s thesis was written by a student called Seppo Linnainmaa. The topic of the thesis was “Cumulative rounding error of algorithms as a Taylor approximation of individual rounding errors” (the thesis was written in Finnish, so this is a translation of the actual title “Algoritmin kumulatiivinen pyöristysvirhe yksittäisten pyöristysvirheiden Taylor-kehitelmänä”).

The automatic differentiation method developed in the thesis was later applied by other researchers to quantify the sensitivity of the output of a multilayer neural network with respect to the individual weights, which is the key idea in backpropagation.


backpropagation 알고리즘으로 이끄는 길은 다소 길며 어려움이 있습니다. 그 역사에서 흥미로운 부분은 헬싱키 대학의 컴퓨터 과학과 관련되어 있습니다. 1967 년에 학과가 창립 된 지 약 3 년 후, Seppo Linnainmaa라는 학생이 석사 논문을 썼습니다. 이 논문의 주제는 "Cumulative rounding error of algorithms as a Taylor approximation of individual rounding errors" (논문은 핀란드어로 작성되었으므로 실제 제목 인 "Algoritmin kumulatiivinen pyöristysvirhe yksittäist pyöristysvirheiden Taylor-kehitelmänä"번역본)입니다.


이 논문에서 개발 된 자동 차별화 (automatic differentiation) 방법은 다른 연구원에 의해 나중에 역 전파에서 핵심 아이디어 인 개별 가중치에 대한 다층 신경망 출력의 민감도를 정량화하기 위해 적용되었습니다.



A simple neural network classifier


To give a relatively simple example of using a neural network classifier, we'll consider a task that is very similar to the MNIST digit recognition task, namely classifying images in two classes. We will first create a classifier to classify whether an image shows a cross (x) or a circle (o). Our images are represented here as pixels that are either colored or white, and the pixels are arranged in 5 × 5 grid. In this format our images of a cross and a circle (more like a diamond, to be honest) look like this:


neural network classifier를 사용하는 비교적 간단한 예제를 제공하기 위해, 우리는 MNIST digit recognition 태스크와 매우 유사한 태스크, 즉 2 개의 클래스로 이미지를 분류하는 태스크를 살펴 볼 겁니다. 먼저 이미지에 가위 표시 (x) 또는 원 (o) 표시 여부를 분류하는 분류자(classifier)를 만듭니다. 우리의 이미지는 여기에 색깔이 있거나 흰색 인 픽셀로 표현되며 픽셀은 5x5 격자로 배열됩니다. 이 형식에서는 가위표시와 원 (솔직히 다이아몬드와 더 비슷합니다.)의 이미지가 다음과 같이 보입니다.






In order to build a neural network classifier, we need to formalise the problem in a way where we can solve it using the methods we have learned. Our first step is to represent the information in the pixels by a numerical values that can be used as the input to a classifier. Let's use 1 if the square is colored, and 0 if it is white. Note that although the symbols in the above graphic are of different color (green and blue), our classifier will ignore the color information and use only the colored/white information. The 25 pixels in the image make the inputs of our classifier.



neural network classifier를 만들기 위해서는 우리가 배운 방법을 사용하여 문제를 공식화해야합니다. 첫 번째 단계는 픽셀의 정보를 분류 기준의 입력으로 사용할 수있는 숫자 값으로 표현하는 것입니다. 사각형에 색이 칠해지면 1을, 흰색이면 0을 사용하기로 하겠습니다. 위의 그림에서는 다른 색상 (녹색 및 파란색)이지만 우리의 classifier는 색상 정보를 무시하고 colored/white 만 사용할 겁니다. 이미지에 있는 25개의 픽셀이 우리의 classifier의 입력을 만듭니다.



To make sure that we know which pixel is which in the numerical representation, we can decide to list the pixels in the same order as you'd read text, so row by row from the top, and reading each row from left to right. The first row of the cross, for example, is represented as 1,0,0,0,1; the second row as 0,1,0,1,0, and so on. The full input for the cross input is then: 1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1.



어떤 픽셀이 어떤 숫자 인지 알기 위해 텍스트를 읽는 순서와 같은 순서로 픽셀을 나열하기 때문에 위쪽에서 행 단위로 정렬하고 각 행을 왼쪽에서 오른쪽으로 읽는 방식으로 결정할 수 있습니다. 예를 들어 십자가의 첫 번째 행은 1,0,0,0,1로 표시됩니다. 두 번째 행은 0,1,0,1,0과 같이 나타납니다. 가위표에 대한 전체 입력은 다음과 같습니다. 1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,1,0, 1,0,0,0,1.



We'll use the basic neuron model where the first step is to compute a linear combination of the inputs. Thus need a weight for each of the input pixels, which means 25 weights in total.


첫 번째 단계는 입력의 linear combination을 계산하는 기본 뉴런 모델을 사용합니다. 따라서 각 입력 픽셀에 대해 weight가 필요합니다. 즉 총 25 개의 weight를 의미합니다.



Finally, we use the step activation function. If the linear combination is negative, the neuron activation is zero, which we decide to use to signify a cross. If the linear combination is positive, the neuron activation is one, which we decide to signify a circle.


마지막으로 step activation function를 사용합니다. linear combination이 음수이면 뉴런 활성화는 0이며 가위표를 나타내는 데 사용하기로 결정합니다. 선형 조합이 양수이면, 뉴런 활성화는 하나이며, 이는 우리가 원을 나타 내기로 결정한 것입니다.



Let's try what happens when all the weights take the same numerical value, 1. With this setup, our linear combination for the cross image will be 9 (9 colored pixels, so 9 × 1, and 16 white pixels, 16 × 0), and for the circle image it will be 8 (8 colored pixels, 8 × 1, and 17 white pixels, 17 × 0). In other words, the linear combination is positive for both images and they are thus classified as circles. Not a very good result given that there are only two images to classify.



모든 weights가 동일한 숫자 값 1을 사용하면 어떻게되는지 시도해 봅시다. 이 설정을 사용하면 가위표 이미지에 대한 선형 조합이 9 (9 colored pixels, so 9 × 1, and 16 white pixels, 16 × 0)가 됩니다. 원 이미지의 경우 8 (8 colored pixels, 8 × 1, and 17 white pixels, 17 × 0)이 됩니다. 즉, linear combination은 두 이미지에 대해 양의 값을 갖기 때문에 원으로 분류됩니다. 분류 할 이미지가 두 개 뿐인 경우 매우 좋은 결과는 아니죠.



To improve the result, we need to adjust the weights in such a way that the linear combination will negative for a cross and positive for a circle. If we think about what differentiates images of crosses and circles, we can see that circles have no colored pixels in the center of the image, whereas crosses do. Likewise, the pixels at the corners of the image are colored in the cross, but white in the circle.



결과를 개선하려면 linear combination이 가위표에 대해 음수이고 원에 대해 양수가되는 방식으로 가중치를 조정해야합니다. 가위표와 원의 이미지를 구별하는 것에 대해 생각해 보면 원은 이미지의 중심에 컬러 픽셀이없고 십자가는 볼 수 있습니다. 마찬가지로 이미지 모서리에있는 픽셀은 십자가에 표시되지만 원에는 흰색으로 표시됩니다.



We can now adjust the weights. There are an infinite number of weights that do the job. For example, assign weight -1 to the center pixel (the 13th pixel), and weight 1 to the pixels in the middle of each of the four sides of the image, letting all the other weights be 0. Now, for the cross input, the center pixel produce the value –1, while for all the other pixels either the pixel value of the weight is 0, so that –1 is also the total value. This leads to activation 0, and the cross is correctly classified.



이제 우리는 weights를 조정할 수 있습니다. 그 일을 하는 무한한 가중치가 있습니다. 예를 들어, 중심 픽셀 (13 번째 픽셀)에 가중치 -1을 할당하고 이미지의 네면의 중간에있는 픽셀에 가중치 1을 할당하여 다른 모든 가중치를 0으로 만듭니다. 이제 교차 입력 중심 픽셀은 값 -1을 생성하지만 다른 모든 픽셀에 대해서는 가중치의 픽셀 값이 0이므로 -1도 총 값입니다. 이로 인해 활성화 0이 발생하고 가위표가 올바르게 분류됩니다.



How about the circle then? Each of the pixels in the middle of the sides produces the value 1, which makes 4 × 1 = 4 in total. For all the other pixels either the pixel value or the weight is zero, so 4 is the total. Since 4 is a positive value, the activation is 1, and the circle is correctly recognized as well.



그럼 원은? 변의 중간에있는 각 픽셀은 값 1을 생성하며, 총 4 × 1 = 4가됩니다. 다른 모든 픽셀의 경우 픽셀 값 또는 가중치가 0이므로 4가 합계입니다. 4가 양수이므로 활성화는 1이며 원이 올바르게 인식됩니다.




Happy or not?


We will now follow similar reasoning to build a classifier for smiley faces. You can assign weights to the input pixels in the image by clicking on them. Clicking once sets the weight to 1, and clicking again sets it to -1. The activation 1 indicates that the image is classified as a happy face, which can be correct or not, while activation –1 indicates that the image is classified as a sad face.


우리는 똑같은 추론(reasoning)을 따라 웃는 얼굴을위한 classifier를 만들 것입니다. 이미지의 입력 픽셀을 클릭하여 weights를 지정할 수 있습니다. 한 번 클릭하면 weights가 1로 설정되고 다시 클릭하면 -1로 설정됩니다. 활성화 1은 이미지가 행복한 얼굴로 분류됨을 나타내며, 활성화 -1은 이미지가 슬픈 얼굴로 분류되었음을 나타냅니다.



Don't be discouraged by the fact that you will not be able to classify all the smiley faces correctly: it is in fact impossible with our simple classifier! This is one important learning objective: sometimes perfect classification just isn't possible because the classifier is too simple. In this case the simple neuron that uses a linear combination of the inputs is too simple for the task. Observe how you can build classifiers that work well in different cases: some classify most of the happy faces correctly while being worse for sad faces, or the other way around.


모든 웃는 얼굴을 정확하게 분류 할 수 없다는 사실로 인해 낙담하지 마십시오. 우리의 간단한 classifier로는 실제로 불가능합니다! 이는 중요한 학습 목표 중 하나입니다. classifier가 너무 간단하기 때문에 완벽한 분류가 불가능한 경우도 있습니다. 이 경우 입력의 선형 조합을 사용하는 단순한 뉴런은 이 작업을 하기에 너무 간단합니다. 다른 경우에 잘 작동하는 classifier를 제작하는 방법을 관찰하십시오. 일부는 행복한 얼굴 대부분을 올바르게 분류하고 슬픈 얼굴이나 그 반대의 경우에도 마찬가지 입니다.



Can you achieve 6/8 correct for both happy and sad faces?







반응형

Elements of AI - Neural network basics

2018. 6. 23. 04:21 | Posted by 솔웅


반응형


Elements of AI





Our next topic, deep learning and neural networks, tends to attract more interest than many of the other topics.

우리의 다음 주제 인 deep learning과 neural networks는 다른 많은 주제보다 많은 관심을 끌고 있습니다.



One of the reasons for the interest is the hope to understand our own mind, which emerges from neural processing in our brain. Another reason is the advances in machine learning achieved within the recent years by combining massive data sets and deep learning techniques.


관심의 이유 중 하나는 우리 뇌의 신경 처리에서 나오는 우리 자신의 마음을 이해할 수 있다는 희망입니다. 또 다른 이유는 방대한 데이터 세트와 deep learning 기술을 결합하여 최근 몇 년 동안 machine learning이 발전했기 때문입니다.





What are neural networks?


To better understand the whole, we will start by discussing the individual units that make it up. A neural network can mean either a “real” biological neural network such as the one in your brain, or an artificial neural network simulated in a computer.



전반적인 내용을 더 잘 이해하기 위해 그것을 구성하는 개별 단위에서 부터 시작하겠습니다. neural network은 여러분의 뇌와 같은 "실제" 생물학적 신경망 또는 컴퓨터에서 시뮬레이션 된 인공 신경망을 의미 할 수 있습니다.




Key terminology

Deep learning

Deep learning refers to certain kinds of machine learning techniques where several “layers” of simple processing units are connected in a network so that the input to the system is passed through each one of them in turn. This architecture has been inspired by the processing of visual information in the brain coming through the eyes and the captured by the retina. This depth allows the network to learn more complex structures without requiring unrealistically large amounts of data.


Deep learning이란 간단한 처리 장치들(processing units)의 여러 "계층 layers"이 하나의 네트워크 안에서 연결되어 시스템에 들어오는 입력들을 순서대로 각 레이어에 있는 유닛들에게 전달되게하는 machine learning 기술의 특정 종류 중 하나입니다. 이 architecture는 눈을 통해 망막에 포착되고 그것이 뇌에 전달되는 시각 정보의 처리과정에서 착안 됐습니다. 이 depth 덕분에 네트워크는 비현실적으로 많은 양의 데이터를 요구하지 않고도 더 복잡한 구조를 학습 할 수 있게 됐습니다.





AWS DeepLens - Deep learning enabled video camera for developers

아마존 AWS DeepLens는 Deep learning을 배울 수 있는 개발자용 비디오 카메라 입니다.
2018년 6월부터 판매하고 있습니다. 구매를 원하시면 위 이미지 링크를 클릭하세요.



Neurons, cell bodies, and signals

A neural network, either biological and artificial, consists of a large number simple units, neurons, that receive and transmit signals to each other. The neurons are very very simple processors of information, consisting of a cell body and wires that connect the neurons to each other. Most of the time, they do nothing but sit still and watch for signals coming in through the wires.


생물학적이든 인공적이든 neural network는 , 서로 신호를주고 받는 많은 수의 simple units, 뉴런으로 구성됩니다. 뉴런은 정보를 처리하는 아주아주 간단한 프로세서로서 뉴런들을 서로 연결하는 cell body와 wires로 구성돼 있습니다. 대부분의 경우, 그들은 아무것도하지 않고 조용히 앉아서 wires들을 통해 들어오는 신호를 주시합니다.


Dendrites, axons, and synapses

In the biological lingo, we call the wires that provide the input to the neurons dendrites. Sometimes, depending on the incoming signals, the neuron may fire and send a signal out for the other neurons to receive. The wire that transmits the outgoing signal is called an axon. Each axon may be connected to one or more dendrites at intersections that are called synapses.


생물학적 용어에서 우리는 뉴런 수상 돌기(neurons dendrites)에 입력을 제공하는 wires를 호출합니다. 때로는 들어오는 신호에 따라 뉴런은 signal을 발사해 다른 뉴런이 받을 수 있도록 보내기도 합니다. 발신 신호를 전송하는 wire을 축삭(axon)이라고합니다. 각 축색 돌기(axon)는 시냅스(synapses)라고하는 교차점에서 하나 이상의 수상 돌기(dendrites) 에 연결될 수 있습니다.





Isolated from its fellow-neurons, a single neuron is quite unimpressive, and capable of only a very restricted set of behaviors. When connected to each other, however, the system resulting from their concerted action can become extremely complex. (Exhibit A: your brain.) The behavior of the system is determined by the ways in which the neurons are wired together. Each neuron reacts to the incoming signals in a specific way that can also adapt over time. This adaptation is known to be the key to functions such as memory and learning.



동료 뉴런과 분리 된 단일 뉴런은 전혀 인상적이지 않으며(unimpressive) 매우 제한된 일련의 행동 만 수행 할 수 있습니다. 그러나 서로 연결될 때 그들의 공동 작업으로 인해 발생하는 시스템 결과는 매우 복잡해질 수 있습니다. (예 A : 당신의 뇌.) 시스템의 행동은 뉴런들이 함께 연결되는 방식에 의해 결정됩니다. 각 뉴런은 시간이 지나면서 적응될 수 있는 특정 방식으로 들어오는 신호에 반응합니다. 이러한 적응은 기억 및 학습과 같은 기능의 핵심으로 알려져 있습니다.





Exercise 20. Elements of a neural network


Label the different components of a neuron into the above diagram



아래 다이어그램에 뉴런의 여러 구성 요소들의 이름을 맞춰보세요.





- Synapse (connection)


- Dendrite (input)

- Cell body

- Axon (output)




Why develop artificial neural networks?



The purpose of building artificial models of the brain can be neuroscience, the study of the brain and the nervous system in general. It is tempting to think that by mapping the human brain in enough detail, we can discover the secrets of human and animal cognition and consciousness.



뇌에 대한 인공 모델을 만드는 목적은 일반적인 뇌와 신경에 대한 연구를 하는 신경과학(neuroscience)이 될 수 있습니다. 인간의 두뇌를 충분히 자세하게 매핑함으로써 인간과 동물의 인지와 의식의 비밀을 발견 할 수 있다고 생각되는 아주 매력적인 일이죠.



Note

Modeling the brain

The BRAIN Initiative led by American neuroscience researchers is pushing forward technologies for imaging, modeling, and simulating the brain at a finer and larger scale than before. Some brain research projects are very ambitious in terms of objectives. The Human Brain Project promised about 5 years ago that “the mysteries of the mind can be solved - soon”. After years of work, the Human Brain Project was facing questions about when the billion euros invested by the European Union will deliver what was promised, even though, to be fair, some less ambitious milestones have been achieved.


미국의 신경 과학 연구자들이 주도하는 BRAIN Initiative는 이전보다 더 세세하고 광범위하게 뇌에대한 imaging, modeling, and simulating에 대한 기술을 발전 시키고 있습니다. 일부 뇌 연구 프로젝트는 목표 측면에서 매우 야심적입니다. 인간 두뇌 프로젝트 (Human Brain Project)는 약 5 년 전에 "mind (마음)에 대한 신비가 곧 풀릴 수있다"고 약속했습니다. 유럽 연합 (EU)이 10 억 유로를 투자했고 그걸 기반으로 수년간의 작업이 진행됐습니다. 이제 휴먼 브레인 프로젝트 (Human Brain Project)는 약속 한 내용을 언제 제공 할 것인가에 대한 질문에 직면 해 있습니다. 그럼에도 불구하고 객관적으로 볼 때 이 프로젝트는 약속한 야심 보다는 적은 야심의 마일스톤을 달성하기는 했습니다.



However, even while we seem to be almost as far from understanding the mind and consciousness, there are clear milestones that have been achieved in neuroscience. By better understanding of the structure and function of the brain, we are already reaping some concrete rewards. We can, for instance, identify abnormal functioning and try to help the brain avoid them and reinstate normal operation. This can lead to life-changing new medical treatments for people suffering from neurological disorders: epilepsy, Alzheimer’s disease, problems caused by developmental disorders or damage caused by injuries, and so on.



어쨌든 지금은 우리가 마음과 의식을 이해하는 것에서 거의 멀리 떨어져있는 것처럼 보이지만 신경 과학(neuroscience)에서 성취 된 명확한 이정표(milestones)들이 있습니다. 뇌의 구조와 기능을 더 잘 이해함으로써 우리는 이미 어떤 견고한 보상을 받고 있습니다. 예를 들어 우리는 어떤 비정상적인 기능을 식별하고 뇌가 그런 비정상적인 상황을 피하고 정상적인 상태로 되돌아 오도록 도울 수 있습니다. 이것은 간질(neurological disorders), 알츠하이머, 발달 장애로 인한 문제 또는 부상으로 인한 손상 등 신경계 질환으로 고통받는 사람들을 위해 삶을 변화시키는 새로운 치료법으로 이어질 수 있습니다.



Note

Looking to the future: brain computer interfaces

One research direction in neuroscience is brain-computer interfaces that allow interacting with a computer by simply thinking. The current interfaces are very limited and they can be used, for example, to reconstruct on a very rough level what a person is seeing, or to control robotic arms or drones by thought. Perhaps some day we can actually implement a thought reading machine that allows precise instructions but currently they belong to science fiction. It is also conceivable that we could feed information into the brain by stimulating it by small electronic pulses. Such stimulation is currently used for therapeutic purposes. Feeding detailed information such as specific words, ideas, memories, or emotions is at least currently science fiction rather than reality, but obviously we know neither the limits of such technology, nor how hard it is to reach them.


신경 과학(neuroscience) 분야에 대한 한 연구 방향은 brain-computer interfaces로 단순하게 생각하는 컴퓨터와 상호 작용할 수 있도록 하는 겁니다. 현재의 인터페이스는 매우 제한되어 있지만 실제 사용하는 분야가 있기도 합니다. 예를 들어 사람이 보고있는 것을 매우 거칠지만 재구성할 수 있구요, 생각으로 로봇 팔이나 드론을 조종 하는 것 등이 가능합니다. 어쩌면 언젠가는 정확하게 생각을 읽는 기계를 실제로 구현할 수 있겠습니다만 아직까지 그것은 공상과학소설의 영역입니다.. 우리는 작은 전자 펄스(electronic pulses)로 자극함으로서 뇌로 정보를 제공할 수 있다고 생각합니다. 이러한 자극은 현재 치료(therapeutic ) 목적으로 사용됩니다. 특정 단어, 아이디어, 추억 또는 감정과 같은 자세한 정보를 제공하는 것은 아직까지는 현실보다는 공상과학소설에만 존재하고 그것을 현실화 하는게 얼마나 어려울지도 아직 가늠하기 힘든 수준입니다. 







We’ve drifted a little astray from the topic of the course. In fact, another main reason for building artificial neural networks has little to do with understanding biological systems. It is to use biological systems as an inspiration to build better AI and machine learning techniques. The idea is very natural: the brain is an amazingly complex information processing system capable of a wide range of intelligent behaviors (plus occasionally some not-so-intelligent ones), and therefore, it makes sense to look for inspiration in it when we try to create artificially intelligent systems.



우리는 코스의 주제에서 약간의 벗어나 버렸네요. 사실, 인공 신경 네트워크를 구축하는 또 다른 주된 이유는 생물학적 시스템을 이해하는 것과 거의 관련이 없습니다. 더 나은 AI 및 기계 학습 기술을 구축하는 데 대한 영감으로 생물학적 시스템을 사용하는 것입니다. 그 아이디어는 매우 자연 스러운 것입니다. 두뇌는 다양한 지능적 행동 (때로는 그렇게 지능적이지는 않은 행동들도 포함)이 가능하도록 하는 놀랍도록 복잡한 정보 처리 시스템이므로, 우리가 인공 지능 시스템을 만드려고 할 때 영감을 받기 위해 살펴 보는 것은 당연한 일입니다. 



Neural networks have been a major trend in AI since the 1960s. We’ll return to the waves of popularity in the history of AI in the final part. Currently neural networks are again at the very top of the list as deep learning is used to achieve significant improvements in many areas such as natural language and image processing, which have traditionally been sore points of AI.



Neural networks은 1960 년대 이래 인공 지능 분야에서 major trend 입니다. 우리는 마지막 부분에서 인공 지능의 역사에서 waves of popularity를 다룰 겁니다. 현재 neural networks는 deep learning처럼 인공지능 분야 리스트의 맨 위에 있습니다. 전통적으로 인공 지능의 요점이었던 자연 언어 및 이미지 처리와 같은 많은 분야에서 중요한 개선을 이루기 위해 깊은 학습이 사용되므로 현재 신경 네트워크가 목록의 맨 위에 있습니다.





What is so special about neural networks?



The case for neural networks in general as an approach to AI is based on a similar argument as that for logic-based approaches. In the latter case, it was thought that in order to achieve human-level intelligence, we need to simulate higher-level thought processes, and in particular, manipulation of symbols representing certain concrete or abstract concepts using logical rules.



AI에 접근하는 일반적인 의미로서의 neural networks에 대한 케이스는 logic-based 접근법과 argument를 같습니다. 후자의 경우, 인간 수준의 지능을 얻기 위해서는 더 높은 수준의 사고 과정을 시뮬레이션해야하며, 특히 논리적 규칙을 사용하여 특정 구체적 또는 추상적 개념을 나타내는 기호를 조작해야한다고 생각했습니다.



The argument for neural networks is that by simulating the lower-level, “subsymbolic” data processing on the level of neurons and neural networks, intelligence will emerge. This all sounds very reasonable but keep in mind that in order to build flying machines, we don’t build airplanes that flap their wings, or that are made of bones, muscle, and feather. Likewise, in artificial neural networks, the internal mechanism of the neurons is usually ignored and the artificial neurons are often much simpler than their natural counterparts. The eletro-chemical signalling mechanisms between natural neurons are also mostly ignored in artificial models when the goal is to build AI systems rather than to simulate biological systems.



neural networks에 대한 논쟁은 neurons과 neural networks 그리고 지능 수준의 데이터를 처리하는 것보다 낮은 수준인  “subsymbolic” 데이터 처리과정에 의해 가능할 것이라고 생각됐습니다. 이 모든 것은 매우 합리적으로 들릴지 모르지만 비행하는 기계를 만들기 위해 비행기 날개를 퍼덕이게 만들지는 않는다는 것을 유념해 두세요. 우리는 비행기를 만들 때 뼈나 근육, 깃털같은 것들을 만들지는 않습니다. 마찬가지로, artificial neural networks에서 뉴런의 내부 메카니즘은 대개 무시되며 인공 뉴런은 종종 천연 뉴런보다 훨씬 간단합니다. 자연상태의 뉴런 사이의 전기 화학적 신호 메커니즘은 생물학적 시스템을 시뮬레이션하기보다는 인공 지능 시스템을 구축하는 것이 목표 인 인공 모델에서도 대부분 무시됩니다.



Compared to how computers traditionally work, neural networks have certain special features:



컴퓨터가 전통적으로 작동하는 방식과 비교할 때 신경망에는 다음과 같은 특별한 기능이 있습니다.




Neural network key feature 1


For one, in a traditional computer, information is processed in a central processor (aptly named the central processing unit, or CPU for short) which can only focus on doing one thing at a time. The CPU can retrieve data to be processed from the computer’s memory, and store the result in the memory. Thus, data storage and processing are handled by two separate components of the computer: the memory and the CPU. In neural networks, the system consists of a large number of neurons, each of which can process information on its own so that instead of having a CPU process each piece of information one after the other, the neurons process vast amounts of information simultaneously.



첫번째 전통적인 컴퓨터에서 정보는 한 번에 한 가지 일에만 집중할 수있는 중앙 프로세서 (중앙 처리 장치 또는 CPU라고도 함)에서 처리됩니다. CPU는 처리 할 데이터를 컴퓨터 메모리에서 검색하여 처리된 결과를 메모리에 저장할 수 있습니다. 따라서 데이터 저장 및 처리는 컴퓨터의 두 가지 개별 구성 요소 인 메모리와 CPU에서 처리됩니다. neural networks에서 시스템은 많은 수의 뉴런으로 구성되어 있습니다. 각 뉴런은 자체적으로 정보를 처리 할 수 있으므로 CPU가 각 정보를 차례로 처리하는 대신 한 번에 막대한 양의 정보를 동시에 처리합니다.



Neural network key feature 2


The second difference is that data storage (memory) and processing isn’t separated like in traditional computers. The neurons both store and process information so that there is no need to retrieve data from the memory for processing. The data can be stored short term in the neurons themselves (they either fire or not at any given time) or for longer term storage, in the connections between the neurons — their so called weights, which we will discuss below.



두 번째 차이점은 기존의 컴퓨터처럼 데이터 저장 (메모리) 및 처리가 분리되어 있지 않다는 점입니다. 뉴런은 정보의 저장과 처리를 둘 다 합니다. 그러므로 정보를 처리하기 위해 메모리에서 정보를 검색하지 않아도 됩니다. 데이터는 뉴런 안에 혹은 뉴런들간에 연결된 지점에 단기간 또는 장기간 저장될 수 있습니다. (그들은 그 정보를 발사하거나 그냥 가지고 있거나 할 수 있습니다.) 그 연결 점들을 weights라고 하는데 이 부분에 대해 앞으로 살펴 볼 겁니다. 



Because of these two differences, neural networks and traditional computers are suited for somewhat different tasks. Even though it is entirely possible to simulate neural networks in traditional computers, which was the way they were used for a long time, their maximum capacity is achieved only when we use special hardware (computer devices) that can process many pieces of information at the same time. This is called parallel processing. Incidentally, graphics processors (or graphics processing units, GPUs) have this capability and they have become a cost-effective solution for running massive deep learning methods.



이 두 가지 차이점 때문에 neural networks과 전통적인 컴퓨터는 각기 다른 작업에 적합합니다. 전통적인 컴퓨터에서 신경 네트워크를 시뮬레이션하는 것이 가능하기는 하고 그것이 오랫동안 우리가 사용했던 방법이지만 그걸 가능하도록 하는 용량은 동시에 아주 많은 정보조각들을 처리할 수 있는 특별한 하드웨어를 사용해야만 가능합니다. 이것을 병렬 처리(parallel processing)라고합니다. 덧붙여서 그래픽 프로세서 (또는 그래픽 처리 장치, GPU)는 이러한 capability를 갖추고 있으며 대규모 deep learning 방법을 실행하는 데 비용 효율적인 솔루션이 되었습니다.





반응형

Elements of AI - Regression

2018. 6. 22. 03:58 | Posted by 솔웅


반응형


Elements of AI




III.Regression




Our main learning objective in this section is another nice example of supervised learning methods, and almost as simple as the nearest neighbor classifier too: linear regression. We'll introduce its close cousin, logistic regression as well.

이 섹션의 주요 학습 목표는 supervised learning 방법의 또 다른 좋은 예이며 가장 가까운 neighbor classifier 기준 인 선형 회귀 (linear regression)와 거의 비슷합니다. 또한 가까운 사촌 인 로지스틱 회귀(logistic regression)도 소개하겠습니다.



Note

The difference between classification and regression


There is a small but important difference in the kind of predictions that we should produce in different scenarios. While for example the nearest neighbor classifier chooses a class label for any item out of a given set of alternatives (like spam/ham, or 0,1,2,...,9), linear regression produces a numerical prediction that is not constrained to be an integer (a whole number as opposed to something like 3.14). So linear regression is better suited in situations where the output variable can be any number like the price of a product, the distance to an obstacle, the box-office revenue of the next Star Wars movie, and so on.


우리가 다른 시나리오에서 만들어야하는 예측의 종류에는 작지만 중요한 차이가 있습니다. 예를 들어 가장 가까운 neighbor classifier 프로그램이 주어진 대안 세트 (예 : 스팸 / 햄 또는 0,1,2, ..., 9)에서 어느 하나의 클래스 라벨을 선택하고 선형 회귀(linear regression)는 숫자로 된 예측을 만들어 냅니다. 이 숫자로 된 예측은 정수 (3.14와 같은 정수가 아닌 정수)로 제한되지 않습니다. 따라서 선형 회귀(linear regression)는 출력 변수가 제품 가격, 장애물까지의 거리, 다음 스타 워즈 영화의 흥행 수입 등과 같이 임의의 수일 수있는 상황에 더 적합합니다.



The basic idea in linear regression is to add up the effects of each of the feature variables to produce the predicted value. The technical term for the adding up process is linear combination. The idea is very straightforward, and it can be illustrated by your shopping bill.



선형 회귀(linear regression)의 기본 개념은 예측 값을 생성하기 위해 각 기능 변수(feature variables)별로 그 효과를 더하는 겁니다. 그 더하는 과정을 전문 용어로 선형 조합 (linear combination) 이라고 합니다. 이 아이디어는 매우 간단하며 쇼핑 청구서(shopping bill)예로 그 상황을 설명 할 수 있습니다.



Note

Thinking of linear regression as a shopping bill

Suppose you go to the grocery store and buy 2.5kg potatoes, 1.0kg carrots, and two bottles of milk. If the price of potatoes is 2€ per kg, the price of carrots is 4€ per kg, and a bottle of milk costs 3€, then the bill, calculated by the cashier, totals 2.5 × 2€ + 1.0 × 4€ + 2 × 3€ = 15€. In linear regression, the amount of potatoes, carrots, and milk are the inputs in the data. The output is the cost of your shopping, which clearly depends on both the price and how much of each product you buy.


당신이 식료품 가게에 가서 2.5kg의 감자, 1.0kg의 당근, 그리고 2 병의 우유를 사 먹는다 고 가정하십시오. 감자 가격이 kg 당 2 유로이고 당근 가격이 kg 당 4 유로이고 우유 한 병이 3 유로 인 경우 계산원이 계산 한 계산서는 총 2.5x2 + 1.0x4 + 2 × 3 € = 15 € 입니다. 선형 회귀 분석에서 감자, 당근 및 우유의 양은 데이터의 입력 값입니다. 산출량은 쇼핑 비용으로, 가격과 구입하는 제품의 양에 따라 다릅니다.




The word linear means that the increase in the output when one input feature is increased by some fixed amount is always the same. In other words, whenever you add, say, two kilos of carrots into your shopping basket, the bill goes up 8€. When you add another two kilos, the bill goes up another 8€, and if you add half as much, 1kg, the bill goes up exactly half as much, 4€.



linear라는 단어는 하나의 입력 특징이 일정량만큼 증가 될 때 출력의 증가가 항상 동일 함을 의미합니다. 즉, 쇼핑 바구니에 2kg의 당근을 추가하면 bill이 8 유로 씩 올라갑니다. 또 다른 2kg을 더하면 청구서가 8 € 올라가고, 1kg을 즉 절반 더 추가하면 계산서가 정확히 절반 인 4 € 올라갑니다.




Key terminology

Coefficients or weights


In linear regression terminology, the prices of the different products would be called coefficients or weights. (This may appear confusing since we measured the amount of potatoes and carrots by weight, but not let yourself be tricked by this!) One of the main advantages of linear regression is its easy interpretability: the learned weights may in fact be more interesting than the predictions of the outputs.


선형 회귀 (linear regression)라는 용어에서는 여러 제품의 가격을 coefficients (계수) 또는 weights (가중치) 라고합니다. (감자와 당근의 양을 무게로 측정했기 때문에 혼란 스러울 지 모르지만, 일부러 헛갈리게 한 것은 아니예요!) 선형 회귀(linear regression)의 주요 장점 중 하나는 쉽게 해석 할 수 있다는 것입니다. learned weights는 outputs 예측보다 더 흥미로운 것이 사실입니다.

For example, when we use linear regression to predict the life expectancy, the weight of smoking (cigarettes per day) is about minus half a year, meaning that smoking one cigarette more per day takes you on the average half a year closer to termination. Likewise, the weight of vegetable consumption (handful of vegetables per day) has weight plus one year, so eating a handful of greens gives every day gives you on the average one more year.


예를 들어, 선형 회귀 (linear regression)을 사용하여 기대 수명을 예측할 때 이런식으로 계산할 수 있습니다. 예를 들어 흡연 (하루 한가치)은 약 반년을 마이너스 합니다.  즉 하루에 담배 하나 이상을 흡연하면 평균 반년 수명이 주는 겁니다. 마찬가지로, 야채 소비 (하루에 한웅큼의 야채)에는 가중치 1년을 더합니다. 즉 매일 야채를 한웅큼씩 먹으면 1년을 더 사는 것으로 계산하는 식입니다.




AWS DeepLens - Deep learning enabled video camera for developers





Exercise 16: Linear regression

Suppose that an extensive study is carried out, and it is found that in a particular country, the life expectancy (the average number of years that people live) among non-smoking women who don't eat any vegetables is 80 years. Suppose further that on the average, men live 5 years less. Also take the numbers mentioned above: every cigarette per day reduces the life expectancy by half a year, and a handful of veggies per day increases it by one year.



방대한 연구가 수행되어 특정 국가에서 야채를 먹지 않는 담배피는 여성들의 평균 기대 수명 이 80년이라고 가정합니다. 또한 남자는 평균적으로 여자보다 5년 적게 산다고 가정합시다. 그리고 위에서 언급했듯이 매일 한가치씩 흡연하면 기대 수명은 반년 줄어들고 매일 야채를 한웅큼 먹으면 수명이 1년 증가한다고 가정합니다. 



Calculate the life expectancies for the following example cases:


다음 예제의 기대 수명을 계산하세요



For example, the first case is a male (subtract 5 years), smokes 8 cigarettes per day (subtract 8 × 0.5 = 4 years), and eats two handfuls of veggies per day (add 2 × 1 = 2 years), so the predicted life expectancy is 73 years.



예를 들어, 첫 번째 경우는 남성 (5 년 감면), 하루 8 가치 담배를 피우고 (8 × 0.5 = 4 년 빼기) 하루에 2 웅큼의 채소를 먹습니다 (2 × 1 = 2 년 추가). 예상 수명은 73 세입니다.





Your task: Enter the correct value as an integer (whole number) for the missing sections A, B, and C above.






In the above exercise, the life expectancy of non-smoking, veggie-hating women, 80 years, was the starting point for the calculation. The technical term for the starting point is the intercept. We will return to this below when we discuss how to learn linear regression models from data.



위의 문제를 푸는 과저은 비 흡연자이고 채식을 하지 않는 여성들의 기대 수명은 80년이라는 기준에서 시작했습니다.  이것을 출발점이라고 할 때 이 출발점의 기술적 용어는 intercept입니다. 아래에서 데이터를 기반으로 선형 회귀 (linear regression) 모델을 어떻게 학습하는지에 대해 알아 보겠습니다.




Learning linear regression



Above, we discussed how predictions are obtained from linear regression when both the weights and the input features are known. So we are given the inputs and the weight, and we can produce the predicted output.



위에서 우리는 가중치(weights)와 입력 features가 모두 알려진 경우 예측이 선형 회귀(linear regression)로부터 어떻게 얻어지는 지에 대해 논의했습니다. 그렇게 함으로서 우리는 입력과 가중치가 주어지면 예측 된 결과를 산출 할 수 있습니다.



When we are given the inputs and the outputs for a number of items, we can find the weights such that the predicted output matches the actual output as well as possible. This is the task solved by machine learning.



많은 항목에 대한 입력과 출력이 주어지면 예상 출력이 가능한 실제 출력과 일치하도록 가중치를 찾을 수 있습니다. 이것은 기계 학습(machine learning)으로 해결되는 작업입니다.



Note

Example

Continuing the shopping analogy, suppose we were given the contents of a number of shopping baskets and the total bill for each of them, and we were asked to figure out the price of each of the products (potatoes, carrots, and so on). From one basket, say 1kg of sirloin steak, 2kg of carrots, and a bottle of Chianti, even if we knew that the total bill is 35€, we couldn't determine the prices because there are many sets of prices that will yield the same total bill. With many baskets, however, we will usually be able to solve the problem.


쇼핑 비유(hopping analogy)를 계속하면, 여러 쇼핑 바구니의 내용들과 각 쇼핑바구니에 대한 총 비용을 받았다고 가정합니다. 그리고 우리는 감자, 당근 등 각각의 품목들의 가격을 알아내야 합니다. 한 쇼핑 바구니에 등심 1키로, 당근 2키로, Chianti 1병이 있습니다. 이 바구니의 총 청구서는 35유로 입니다. 하지만 이것만 가지고는 각 품목들의 . 한 바구니에서, 등심 스테이크 1kg, 당근 2kg, Chianti 1 병이 담겼습니다, 그리고 총 청구액 35 유로입니다. 이 경우 총 청구액을 알았더라도 우리는 각 제품들의 가격을 산출 해 낼 수 없습니다. 왜냐하면 그 바구니 말고도 다른 많은 바구니가 있고 그 바구니들에 여러 품목들이 있을 테니까요. 이렇게 바구니가 많은 경우에 대한 문제 해결 방법도 있습니다. 




But the problem is made harder by the fact that in the real-world, the actual output isn’t always fully determined by the input, because of various factors that introduce uncertainty or “noise” into the process. You can think of shopping at a bazaar where the prices for any given product may vary from time to time, or a restaurant where the final damage includes a variable amount of tip. In such situations, we can estimate the prices but only with some limited accuracy.



그러나 현실 세계에서 실제 output은 프로세스에 불확실성 또는 "잡음 noise"을 초래하는 다양한 요소로 인해 입력에 의해 항상 완전히 결정되지는 않는다는 사실에 의해 문제가 더 커집니다. 어떤 제품에 대한 가격이 때때로 바뀔 수있는 바자회에서 쇼핑을 하거나, 여러 가변적인 팁이 포함 된 레스토랑의 식사 가격을 생각할 수 있습니다. 이러한 상황에서 우리는 가격을 예측할 수 있지만 제한된 정확도로 만 가능합니다.



Finding the weights that optimize the match between the predicted and the actual outputs in the training data is a classical statistical problem dating back to the 1800s, and it can be easily solved even for massive data sets.



training data에서 예측 된 결과와 실제 결과 간의 일치를 최적화하는 가중치를 찾는 것은 1800 년대로 거슬러 올라가는 고전적인 통계적 문제이며 이를 이용해 대용량 데이터 세트에서도 문제를 쉽게 해결할 수 있습니다.



We will not go into the details of the actual weight-finding algorithms, such as the classical least squares technique, simple as they are. However, you can get a feel of finding trends in data in the following exercises.



우리는 고전적인 최소 제곱 기법 (least squares technique)과 같은 실제 weight-finding algorithm의 세부 사항에 대해서는 자세히 설명하지 않겠습니다. 그러나 다음 연습문제를 통해서 데이터의 트렌드를 찾는 감을 잡을 수 있을 겁니다.



Visualising linear regression



A good way to get a feel for what linear regression can tell us is to draw a chart containing our data and our regression results. As a simple toy example our data set has one variable, the number of cups of coffee an employee drinks per day, and the number on lines of code written per day by that employee as the output. This is not a real data set as obviously there are other factors having an effect on the productivity of an employee other than coffee that interact in complex ways. The increase in productivity by increasing the amount of coffee will also hold only to a certain point after which the jitters distract too much.



선형 회귀 분석(linear regression)이 우리에게 무엇을 말할 수 있는가에 대한 감을 잡을 수 있는 좋은 방법은 데이터와 회귀결과 (regression results)를 가지고 있는 챠트를 그리는 겁니다.  간단한 장난감 예제를 들겠습니다. 우리의 데이터 세트는 한개의 변수를 가지고 있습니다. 한 직원이 하루에 마시는 커피의 컵 수 입니다. 그리고 그 직원이 하루에 작성한 코드 라인 수를 출력으로 받습니다. 이것은 실제 데이터 세트가 아닙니다. 분명히 커피 이외에 복잡한 상호 관계 속에서 직원의 생산성에 영향을 미치는 다른 요인들이 있을 겁니다. 커피의 양을 늘림으로써 생산성이 증가하는 것은 특정 시점까지만 유지 될 것입니다. 그 특정 시점 이후에는 불안하고 초조해 질 겁니다.





When we present our data in the chart above as points where one point represents one employee, we can see that there is obviously a trend that drinking more coffee results in more lines of code being written. (Recall that this is completely made-up data.) From this data set we can learn the coefficient, or the weight, related to coffee consumption, and by eye we can already say that it seems to be somewhere close to five, since for each cup of coffee consumed the number of lines programmed seems to go up rougly by five. For example, for employees who drink around two cups of coffee per day, they seem to produce around 15 lines of code per day, and similarly for four cups of coffee, the amount of lines produced is around 25.



위의 차트에있는 데이터를 보면 한 점이 한 직원을 나타냅니다.  더 많은 커피를 마시는 직원이 더 많은 코드 줄을 작성하는 경향이 있음을 알 수 있습니다. (이 데이터는 그냥 가상의 데이터 입니다.) 이 데이터 세트에서 우리는 커피 소비와 관련된 계수(coefficient) 또는 weight를 배울 수 있으며, 대충 눈 짐작으로 이 지점이 5 부근이라고 말할 수 있습니다. 커피 한잔 당 코드 라인 수는 약 5씩 증가 하는 것 같습니다. 예를 들어 어느 직원이 하루에 커피 두잔을 마신다면 이 직원은 대략 하루에 15줄의 코딩을 할 것입니다. 이런식으로 하면 4잔 마시는 직원은 대략 25줄의 코딩을 하겠죠. 



It can also be noted that employees who do not drink coffee at all also produce code, and is shown by the graph to be about ten lines. This number is the intercept term that we mentioned earlier. The intercept is another parameter in the model just like the weights are, that can be learned from the data. Just as in the life expectancy example it can be thought of as the starting point of our calculations before we have added in the effects of the input variable, or variables if we have more than one, be it coffee cups in this example, or cigarettes and vegetables in the previous one.



또한 커피를 전혀 마시지 않는 직원도 코드를 생성하며 그래프를 보면 대략 10 줄 정도 코딩하는 것 같습니다. 이 숫자는 앞서 언급 한 intercept 용어입니다. intercept는 이 모델에서 또다른 파라미터 입니다. weights 처럼요. 이는 데이터로부터 나옵니다.  기대 수명 예와 마찬가지로, 입력 변수의 효과를 추가하기 전이나 혹은 한개 이상의 변수가 있을 때 (이 예에서는 커피컵의 수가 되고 이전의 예에서는 담배나 야채 등이 되겠죠.) 를 계산의 출발점이라고 생각할 수 있습니다. 



The line in the chart represents our predicted outcome, where we have estimated the intercept and the coefficient by using an actual linear regression technique called least squares. This line can be used to predict the number of lines produced when the input is the number of cups of coffee. Note that we can obtain a prediction even if we allow only partial cups (like half, 1/4 cups, and so on).



차트의 선은 우리가 예측 한 outcome을 나타냅니다. 위에서 우리는 least squares 이라는 실제 linear regression technique을 사용하여 intercept과 coefficient를 추정했습니다. 이 선은 입력이 커피 잔 수일 때 생산되는 줄 수를 예측하는 데 사용할 수 있습니다.  반컵이나 1/4컵일 때도 예측할 수 있다는 부분을 기억해 두세요. 









Exercise 17: Life expectancy and education (part 1 of 2)

Let's study the link between the total number of years spent in school (including everything between preschool and university) and life expectancy. Here is data from three different countries displayed in a figure represented by dots:



학교에서 보낸 총 연수 (유치원과 대학 간의 모든 것을 포함)와 기대 수명 사이의 연관성을 연구합시다. 다음은 점으로 표시된 세개의 다른 나라에 대한 데이터가 있습니다. 





We have one country where the average number of years in school is 10 and life expectancy is 57 years, another country where the average number of years in school is 13 and life expectancy is 53 years, and a third country where the average number of years in school is 20 and life expectancy is 80 years.



학교에 다닌 평균 년 수가 10년이고 평균 수명이 57 세 인 다른 나라와 학교에 다닌 평균 연수가 13 년이고 평균 수명이 53 세인 국가와 학교에서 다닌 평균 기간이 20년이고 평균 수명은 80 세인 국가가 있습니다.



You can drag the end points of the solid line to position the line in such a way that it follows the trend of the data points. Note that you will not be able to get the line fit perfectly with the data points, and this is fine: some of the data points will lie above the line, and some below it. The most important part is that the line describes the overall trend. After you have positioned the line you can use it to predict the life expectancy.



실선의 끝점을 드래그하여 데이터 점의 추세를 따르는 방식으로 선의 위치를 지정할 수 있습니다. 데이터 요소에 맞게 선을 완벽하게 맞출 수는 없으므로 일부 데이터 요소는 선 위에 있고 일부는 아래에 위치합니다. 가장 중요한 부분은이 라인이 전반적인 경향을 설명한다는 것입니다. 선을 배치 한 후에는 이를 사용하여 평균 수명을 예측할 수 있습니다.



Given the data, what can you tell about the life expectancy of people who have 15 years of education?


데이터를 감안할 때, 15 년간 교육을받은 사람들의 평균 수명은 어떻다고 말할 수 있습니까?


보기


1. It is exactly 64 years

2. It is certainly between 60 and 70 years

3. It is certainly 70 years or less

4. It is probably less than 90





Exercise 18: Life expectancy and education (part 2 of 2)


In the previous exercise, we only had data from three countries. The full data set consists of data from 14 different countries, presented here in a graph:



이전 연습문제에서는 세 국가의 데이터 만 있었습니다. 아래 예제의 전체 데이터 세트는 14 개국의 데이터로 구성되어 있습니다.






Based on this data, would your prediction about the life expectancy of people with 15 years of education change? If so, why?

Which of the following options would best match your estimate of the life expectancy for people with 15 years of education?



이 데이터를 바탕으로, 15 년간 교육을받은 사람들의 기대 수명에 대한 귀하의 예측은 바뀌 었습니까? 그렇다면 왜 그렇습니까?


다음 중 15 년간 교육을받은 사람들의 평균 기대 수명과 가장 유사한 보기는 무엇입니까?


1. Between 45 and 50 years

2. Between 60 and 80 years

3. Between 69 and 71 years

4. Between 30 and 100 years



It should be pointed out that studies like those used in the above exercises cannot identify causal relationships. In other words, from this data alone, it is impossible to say whether studying actually increases life expectancy through better informed and healthier life-style or other mechanisms, or whether the apparent association between life expectancy and education is due to underlying factors that affects both. It is likely that, for example, in countries where people tend to be highly educated, nutrition, healtcare, and safety are also better, which increases life expectancy. With this kind of simple analysis, we can only identify associations, which can nevertheless be useful for prediction.



위의 연습문제에서 사용한 것과 같은 studies는 인과관계(causal relationships)를 식별 할 수 없다는 점을 밝혀두어야 겠습니다. 즉,이 데이터만으로는 공부가 더 나은 정보를 제공하고 건강한 생활습관을 갖게 하는 등의 역할을 해서 기대 수명을 증가시킨다라고 말 할 수 없다는 겁니다. 더 나은 정보와 건강 스타일 또는 기타 메커니즘을 통해 실제로 공부하는 것이 기대 수명을 증가시키는 지 여부 또는 평균 수명과 교육 간의 명백한 연관성이 둘 다 영향을 미치는 근본적인 요인에 의한 것인지 여부를 말할 수 없습니다 . 예를 들어, 사람들이 고학력 인 경향이있는 국가에서 영양, 건강 관리, 안전이 더 좋으며 이로 인해 기대 수명이 늘어날 가능성이 있습니다. 이러한 종류의 간단한 분석을 통해 연관성을 식별 할 수는 있지만 그럼에도 불구하고 예측에 유용 할 수 있습니다.




Machine learning applications of linear regression



Linear regression is truly the workhorse of many AI and data science applications. It has its limits but they are often compensated by its simplicity, interpretability and efficiency. Linear regression has been successfully used in the following problems to give a few examples:



선형 회귀(Linear regression)는 정말 많은 AI 및 데이터 과학 응용 프로그램의 핵심 요소입니다. 한계가 있지만 단순함, 해석 가능성 및 효율성으로 인해 종종 그 보상을 받습니다. 선형 회귀(Linear regression) 는 다음과 같은 문제에서 성공적으로 사용된 예들이 있습니다.



  • prediction of click rates in online advertising
  • prediction of retail demand for products
  • prediction of box-office revenue of Hollywood movies
  • prediction of software cost
  • prediction of insurance cost
  • prediction of crime rates
  • prediction of real estate prices



Could we use regression to predict labels?



As we discussed above, linear regression and the nearest neighbor method produce different kinds of predictions. Linear regression outputs numerical outputs while the nearest neighbor method produces labels from a fixed set of alternatives (“classes”).



위에서 설명한 것처럼 선형 회귀(linear regression)와 nearest neighbor method은 다른 종류의 예측을 생성합니다. 선형 회귀 분석은 수치를 출력하지만 nearest neighbor method은 고정 된 대체 세트 ( "classes")에서 라벨을 생성합니다.




Where linear regression excels compared to nearest neighbors, is interpretability. What do we mean by this? You could say that in a way, the nearest neighbor method and any single prediction that it produces are easy to interpret: it’s just the nearest training data element! This is true, but when it comes to the interpretability of the learned model, there is a clear difference. Interpreting the trained model in nearest neighbors in a similar fashion as the weights in linear regression is impossible: the learned model is basically the whole data, and it is usually way too big and complex to provide us with much insight. So what if we’d like to have a method that produces the same kind of outputs as the nearest neighbor, labels, but is interpretable like linear regression?



linear regression가 nearest neighbors에 비해 우수하다고 해석이 가능합니다. 이게 무슨 소리냐 하면? nearest neighbors 방법과 그것이 생성하는 어떤 단일 예측은 쉽게 해석 할 수 있습니다. nearest training data element 일뿐입니다! 이것은 사실이지만, 학습 된 모델의 해석 가능성과 관련해서는 그 두가지 방법이 뚜렷한 차이가 있습니다. linear regression 분석에서의 가중치와 유사한 방식으로 nearest neighbors에 trained model을 해석하는 것은 불가능합니다. trained model은 기본적으로 전체 데이터이며, 우리가 분석하기에는 대개 너무 크고 복잡합니다. 그렇다면 nearest neighbor, 레이블과 같은 종류의 산출물을 생산하는 방법을 원한다면linear regression 처럼 해석 하는 것이 가능할까요?




Logistic regression to the rescue


Well there are good news for you: we can turn the linear regression method’s outputs into predictions about labels. The technique for doing this is called logistic regression. We will not go into the technicalities, suffice to say that in the simplest case, we take the output from linear regression, which is a number, and predict one label A if the label is more than zero, and another label B if the label is less than or equal to zero. Actually, instead of just predicting one class or another, logistic regression can also give us a measure of uncertainty of the prediction. So if we are predicting whether a customer will buy a new smartphone this year, we can get a prediction that customer A will buy a phone with probability 90%, but for another, less predictable customer, we can get a prediction that they will not buy a phone with 55% probability (or in other words, that they will buy one with 45% probability).



좋은 소식이 하나 있습니다. linear regression 방법의 결과를 라벨에 대한 예측으로 바꿀 수 있습니다. 이를 수행하는 기술을 로지스틱 회귀 (logistic regression)라고합니다. 우리는 이에대한 기술적인 부분을 다루지는 않겠지만, 


가장 간단한 경우에는 선형 회귀 (linear regression)의 결과를 숫자로 취하고 레이블이 0보다 크면 하나의 레이블 A를 예측하고 레이블이 0보다 작거나 같으면 레이블 A를 취합니다. 실제로, 한 클래스 또는 다른 클래스를 예측하는 대신, 로지스틱 회귀는 예측의 불확실성을 측정 할 수 있습니다. 따라서 고객이 올해 새로운 스마트 폰을 구입할 것인지 예측할 경우 고객 A가 구매할 확률이 90 % 이고 예측이 어려운 다른 고객의 전화 구매하지 않을 확률은 55%라는 식으로 예측할 수 있습니다. (즉, 구매할 확률은 45 % 가 되는 것이죠.)



It is also possible to use the same trick to obtain predictions over more than two possible labels, so instead of always predicting either yes or no (buy a new phone or not, fake news or real news, and so forth), we can use logistic regression to identify, for example, handwritten digits, in which case there are ten possible labels.



동일한 트릭을 사용하여 두개 이상의 가능한 레이블에 대해 예측을 얻을 수도 있으므로 예 또는 아니요 (새 전화를 사지 않겠습니까, 가짜 뉴스 또는 실제 뉴스를 사는지 등)를 예측하는 대신 로지스틱 회귀 (logistic regression)를 사용할 수 있습니다. 예를 들어 손으로 쓴 글자 같은 경우 10개의 가능한 레이블이 있는 겁니다. 



An example of logistic regression



Let’s suppose that we collect data of students taking an introductory course in cookery. In addition to the basic information such as the student id, name, and so on, we also ask the students to report how many hours they studied for the exam (however you study for a cookery exam, probably cooking?) - and hope that they are more or less honest in their reports. After the exam, we will know whether each student passed the course or not. Some data points are presented below:



조리 과정에 입문 과정을 수강하는 학생들의 데이터를 수집한다고 가정 해 봅시다. 학생 ID, 이름 등과 같은 기본 정보 외에도 학생들은 시험을 위해 몇 시간 공부했는지 알려달라고 요청합니다 (그러나 요리를 배우기는하지만 아마도 요리를 배우려고합니다). 그들은 그들의 보고서에서 다소 정직합니다. 시험이 끝나면 각 학생이 과목을 통과했는지 여부를 알 수 있습니다. 일부 데이터 포인트는 다음과 같습니다.





Based on the table, what kind of conclusion could you draw between the hours studied and passing the exam? We could think that if we have data from hundreds of students, maybe we could see the amount needed to study in order to pass the course. We can present this data in a chart as you can see below.



이 표를 기초로, 공부 한 시간과 시험을 통과하는 사이에 어떤 결론을 이끌어 낼 수 있습니까? 수백 명의 학생들로부터 얻은 데이터가 있다면 과정을 통과하기 위해 공부하는데 필요한 시간을 생각할 수 있겠죠. 아래에서 볼 수 있듯이이 데이터를 차트로 표시 할 수 있습니다.






Exercise 19: Logistic regression



Each dot on the figure corresponds to one student. On the bottom of the figure we have the scale for how many hours the student studied for the exam, and the students who passed the exam are shown as dots at the top of the chart, and the ones who failed are shown at the bottom. We'll use the scale on the left to indicate the predicted probability of passing, which we'll get from the logistic regression model as we explain just below. Based on this figure, you can see roughly that students who spent longer studying had better chances of passing the course. Especially the extreme cases are intuitive: with less than an hour’s work, it is very hard to pass the course, but with a lot of work, most will be successful. But what about those that spend time studying somewhere inbetween the extremes? If you study for 6 hours, what are your chances of passing?



그림의 각 점은 한 학생을 의미합니다. 그림의 맨 아래에는 학생이 시험을 위해 몇 시간 동안 공부했는지에 대한 척도가 있고 시험에 합격 한 학생은 차트 상단에 점으로 표시되고 실패한 학생은 아래쪽에 표시됩니다. 예상되는 확률을 나타 내기 위해 왼쪽의 눈금을 사용합니다. 아래에서 설명하는대로 logistic regression model을 사용해서 이를 얻어낼 수 있습니다. 이 수치를 토대로, 당신은 대략 오래 공부하는 학생들이 코스를 통과 할 가능성이 더 높다는 것을 알 수 있습니다. Especially the extreme cases are intuitive. 1 시간 미만의 공부로 코스를 통과하는 것은 매우 어렵습니다, 그리고 많은 노력을 기울이면 대부분 합격할 것입니다. 그러나 extremes 사이에서 공부하면서 시간을 보내는 사람들은 어떨까요? 6 시간 동안 공부하면 통과 할 확률은 얼마입니까?




We can quantify the probability of passing using logistic regression. The curve in the figure can be interpreted as the probability of passing: for example, after studying for five hours, the probability of passing is a little over 20%. We will not go into the details on how to obtain the curve, but it will be similar to how we learn the weights in linear regression.



우리는 logistic regression를 사용하여 통과 할 확률을 정량화 할 수 있습니다. 그림의 곡선은 합격할 확률로 해석 할 수 있습니다. 예를 들어 5 시간 동안 공부 한 후 합격할 확률은 20 %를 약간 넘습니다. 곡선을 얻는 방법에 대해서는 자세히 설명하지 않겠지 만 linear regression에서 가중치(weights)를 배우는 것과 비슷합니다.



If you wanted to have an 80% chance of passing a university exam, based on the above figure, how many hours should you approximately study for?



위의 그림을 토대로 대학교 시험에 합격 할 확률이 80 %가 되려면 대략 몇 시간 동안 공부해야합니까?



1. 6-7 hours

2. 7-8 hours

3. 8-9 hours

4. 10-11 hours



Logistic regression is also used in a great variety of real-world AI applications such predicting financial risks, medical studies, and so on. However, like linear regression, it is also constrained by the linearity property and we need many other methods in our toolbox. We will return to the linearity issue later when we discuss neural networks.



Logistic regression는 financial risks, 의학 연구 등을 예측하는 등 실제 AI 응용 프로그램의 다양한 분야에서 사용됩니다. 그러나 linear regression와 마찬가지로 linearity property에 의해 제약을 받기 때문에 우리 주머니 안에는 다른 방법론들도 준비해 두어야 할 겁니다. 나중에 neural networks에 대해 논의 할 때 linearity 문제를 다룰 겁니다



The limits of machine learning


To summarize, machine learning is a very powerful tool for building AI applications. In addition to the nearest neighbor method, linear regression, and logistic regression, there are literally hundreds, if not thousands, different machine learning techniques, but they all boil down to the same thing: trying to extract patterns and dependencies from data and using them either to gain understanding of a phenomenon or to predict future outcomes.



요약하면, machine learning은 AI 애플리케이션을 구축하기 위한 매우 강력한 도구입니다. nearest neighbor method, linear regression 및 logistic regression 이외에도 수 백 가지의 기계 학습 기술이 있지만 모두 똑같은 것으로 요약됩니다. 데이터에서 패턴과 dependencies을 추출하고 그것을 이용해 어떤 현상을 이해하거나 미래의 결과를 예측하는 겁니다.



Machine learning can be a very hard problem and we can’t usually achieve a perfect method that would always produce the correct label. However, in most cases, a good but not perfect prediction is still better than none. Sometimes we may be able to produce better predictions by ourselves but we may still prefer to use machine learning because the machine will make its predictions faster and it will also keep churning out predictions without getting tired. Good examples are recommendation systems that need to predict what music, what videos, or what ads are more likely to be of interest to you.



Machine learning은 매우 어려운 문제 일 수 있으며 항상 정확한 label을 생성 할 수있는 완벽한 방법을 얻을 수는 없습니다. 그러나 대부분의 경우, 좋지만 완벽하지는 않은 예측은 아무런 예측도 할 수 없는 것 보다는 낫습니다. 때로는 우리 인간이 더 나은 예측을 내는 경우도 있을 겁니다. 하지만 우리는 machine learning 사용하는 것을 더 선호합니다. 왜냐하면 기계는 그 예측을 훨씬 더 빠르게 할 수 있고 지치지 않고 그 예측을 대량으로 진행시킬 수 있기 때문이죠. 그 좋은 예로는 어떤 음악, 어떤 동영상 또는 어떤 광고가 관심을 가질지를 예측해야하는 추천 시스템을 들 수 있습니다.



The factors that affect how good a result we can achieve include:

  • The hardness of the task: in handwritten digit recognition, if the digits are written very sloppily, even a human can’t always guess correctly what the writer intended
  • The machine learning method: some methods are far better for a particular task than others
  • The amount of training data: from only a few examples, it is impossible to obtain a good classifier
  • The quality of the data



우리가 달성 할 수있는 결과에 영향을 미치는 요인은 다음과 같습니다.


- 작업의 경도 (어려움의 정도) : 손으로 작성한 숫자를 인식하는 것에서 숫자가 매우 불투명하게 작성된 경우에는 사람이라도 항상 작가의 의도를 정확하게 추측 할 수 있는 것은 아닙니다.

- 기계 학습 방법 : 일부 방법은 특정 작업에 대해 다른 것보다 훨씬 낫습니다.

- training data의 양 : 단지 몇 가지의 예를 통해 좋은 classifier를 얻는 것은 불가능합니다.

- 데이터의 품질




Note

Data quality matters

In the beginning of this Chapter, we emphasized the importance of having enough data and the risks of overfitting. Another equally important factor is the quality of the data. In order to build a model that generalises well to data outside of the training data, the training data needs to contain enough information that is relevant to the problem at hand. For example, if you create an image classifier that tells you what the image given to the algorithm is about, and you have trained it only on pictures of dogs and cats, it will assign everything it sees as either a dog or a cat. This would make sense if the algorithm is used in an environment where it will only see cats and dogs, but not if it is expected to see boats, cars, and flowers as well.

We'll return to potential problems caused by ”biased” data.


이 장의 시작 부분에서 우리는 충분한 데이터를 갖는 것의 중요성과 overfitting의 위험성을 강조했다. 이외에 또다른 중요한 요소는 데이터의 품질입니다. training data 외부의 (이외의) 데이터에 잘 적용되는 모델을 구축하려면 training data는 당면한 문제와 연관되어 있는 충분한 정보를 가지고 있어야 합니다. 예를 들어, 개와 고양이의 그림에만 훈련시킨 이미지 분류기를 만들면 개 또는 고양이로 보이는 모든 것을 판단합니다. 이것은 알고리즘이 고양이와 개만 볼 수있는 환경에서 사용될 수는 있겠지만 보트, 자동차 및 꽃을 볼 것으로 예상되는 경우에는 사용하지 않는 것이 좋습니다.


이제 "편향된 biased"데이터로 인한 잠재적 문제로 되돌아갑니다.




It is also important to emphasize that different machine learning methods are suitable for different tasks. Thus, there is no single best method for all problems (“one algorithm to rule them all...”). Fortunately, one can try out a large number of different methods and see which one of them works best in the problem at hand.



각기 다른 machine learning 방법들은 각기 다른 업무에 적합하다는 점을 강조하는 것도 중요합니다. 따라서 모든 문제에 대해 유일한 최선의 방법은 없습니다 ( "하나의 알고리즘으로 모든 문제를 해결할 수 있는 방법은 없습니다."). 다행스럽게도 많은 수의 다양한 방법을 시도해 볼 수 있으며 그 중 어느 것이 해당 문제에 가장 좋은 방법인지 파악할 수 있습니다.



This leads us to a point that is very important but often overlooked in practice: what it means to work better. In the digit recognition task, a good method would of course produce the correct label most of the time. We can measure this by the classification error: the fraction of cases where our classifier outputs the wrong class. In predicting apartment prices, the quality measure is typically something like the difference between the predicted price and the final price for which the apartment is sold. In many real-life applications, it is also worse to err in one direction than in another: setting the price too high may delay the process by months, but setting the price too low will mean less money for the seller. And to take yet another example, failing to detect a pedestrian in front of a car is a far worse error than falsely detecting one when there is none.



이는 우리를 매우 중요하지만 실제로 종종 간과되는 지점으로 이끕니다. 숫자 인식 작업에서 좋은 방법은 물론 대부분의 시도에서 맞는 레이블을 생성하는 겁니다. 우리는 classification error로 이것을 측정 할 수 있습니다. 분류기 classifier가 잘못된 클래스를 출력하는 경우의 비율입니다. 아파트 가격을 예측할 때, 품질 측정은 전형적으로 아파트가 판매되는 예상 가격과 최종 가격의 차이를 가지고 할 수 있겠죠. 많은 실제 생활에서 사용되는 애플리케이션에서 어떤 한 방향으로  잘못 해석하는 것이 다른 방향으로 잘 못 해석하는 것 보다 더 나쁠 수가 있습니다. 가격을 너무 높게 설정하면 프로세스를 몇 개월 지연 시키는데 그치지만 가격을 너무 낮게 설정하면 판매자에게는 더 적은 돈을 손에 쥐게 만듭니다. 그리고 또 다른 예를 들자면, 자동차 앞에서 보행자가 있는데 감지 못하는 것은 보행자가 없는데 감지하는 오류보다 훨씬 더 나쁜 오류입니다.



As mentioned above, we can’t usually achieve zero error, but perhaps we will be happy with error less than 1 in 100 (or 1%). This too depends on the application: you wouldn’t be happy to have only 99% safe cars on the streets, but being able to predict whether you’ll like a new song with that accuracy may be more than enough for a pleasant listening experience. Keeping the actual goal in mind at all times helps us make sure that we create actual added value.



위에서 언급했듯이 일반적으로 오류를 0으로 만들 수는 없지만 100%에서 1% 모자란 오류 정도에는 만족할 것입니다. 이것 역시 application에 달려 있습니다. 도로에서 99 %의 안전만 보장하는 차량이 있으면 행복하지 않을 것입니다. 하지만 그 정도의 정확도로 새 노래를 좋아할지를 예측할 수 있다면 쾌적한 청취 경험을 위해서는 충분할 것입니다. 실제 목표를 항상 염두에두면 실제 부가가치를 창출 할 수 있습니다.



After completing Chapter 4 you should be able to:

  • Explain why machine learning techniques are used
  • Distinguish between unsupervised and supervised machine learning scenarios
  • Explain the principles of three supervised classification methods: the nearest neighbor method, linear regression, and logistic regression



- machine learning 기술이 사용되는 이유를 설명하는 것.

- unsupervised 와  supervised machine learning 시나리오를 구분하는 것

- 3 가지 supervised classification 방법의 원리를 설명하는 것 : the nearest neighbor method, linear regression, and logistic regression





반응형

Elements of AI - The nearest neighbor classifier

2018. 6. 21. 03:46 | Posted by 솔웅


반응형


Elements of AI




II.The nearest neighbor classifier




The nearest neighbor classifier is among the simplest possible classifiers. When given a item to classify, it finds the training data item that is most similar to the new item, and outputs its label. An example is given in the following diagram.


가장 가까운 neighbor classifier는 가장 단순한 possible classifiers 중 하나이다. 분류 할 항목이 주어지면 그 새 항목과 가장 유사한 training data item을 찾고 해당 레이블을 출력합니다. 다음 다이어그램에 예제가 나와 있습니다.







In the above diagram, we show a collection of training data items, some of which belong to one class (green) and other to another class (blue). In addition, there are two test data items, the stars, which we are going to classify using the nearest neighbor method.




위의 다이어그램에서 우리는 하나의 클래스 (녹색)와 다른 클래스 (파란색)에 속하는 training data items의 모음을 보여줍니다. 또한 가장 가까운 neighbor method을 사용하여 분류 할 2 개의 테스트 데이터 항목 (별)이 있습니다.



The two test items are both classified in the “green” class because their nearest neighbors are both green (see diagram (b) above).



두 test items은 가장 가까운 이웃이 모두 녹색이기 때문에 "녹색"등급으로 분류됩니다 (위 그림 (b) 참조).



The position of the points in the plot represents in some way the properties of the items. Since we draw the diagram on a flat two-dimensional surface — you can move in two independent directions: up-down or left-right — the items have two properties that we can use for comparison. Imagine for example representing patients at a clinic in terms of their age and blood-sugar level. But the above diagram should be taken just as a visual tool to illustrate the general idea, which is to relate the class values to similarity or proximity (nearness). The general idea is by no means restricted to two dimensions and the nearest neighbor classifier can easily be applied to items that are characterized by many more properties than two.



플롯에서 점의 위치는 항목의 속성을 어떤 식 으로든 나타냅니다. 다이어그램을 평평한 2 차원 표면에 그림으로서 두 가지 독립적 인 방향 (상하 또는 좌우)으로 이동할 수 있습니다. 이 항목에는 비교를 위해 사용할 수있는 두 가지 속성이 있습니다. 예를 들어 클리닉의 환자를 연령과 혈당치로 대표한다고 상상해보십시오.  위의 다이어그램은 클래스 값을 유사성 또는 근접성과 관련시키는 일반적인 아이디어를 설명하기위한 시각적 도구로서 사용되어집니다. 일반적인 개념은 결코 2 차원으로 제한되지 않으며 가장 가까운 이웃 분류자는 2보다 많은 특성을 특징으로하는 항목에 쉽게 적용될 수 있습니다.






What do we mean by nearest?



An interesting question related to (among other things) the nearest neighbor classifier is the definition of distance or similarity between instances. In the illustration above, we tacitly assumed that the standard geometric distance, technically called the Euclidean distance, is used. This simply means that if the points are drawn on a piece of paper (or displayed on your screen), you can measure the distance between any two items by pulling a piece of thread straight from one to the other and measuring the length.



가장 가까운 neighbor classifier (다른 것들 중에서)와 관련된 흥미로운 질문은 인스턴스 간의 거리 또는 유사성의 정의입니다. 위의 그림에서 우리는 기술적으로 Euclidean 거리라고 불리는 표준 기하학적 거리를 암묵적으로 가정했습니다. 이것은 단순히 포인트가 종이에 그려 지거나 (또는 화면에 표시되는 경우) 하나의 선을 다른 것으로 똑바로 잡아 당겨 길이를 측정함으로써 두 아이템 간의 거리를 측정 할 수 있음을 의미합니다.




Note

Defining ‘nearest’

Using the geometric distance to decide which is the nearest item may not always be reasonable or even possible: the type of the input may, for example, be text, where it is not clear how the items are drawn in a geometric representation and how distances should be measured. You should therefore choose the distance metric on a case-by-case basis.


어떤 항목이 가장 가까운 항목인지를 결정하기 위해 기하학적 거리를 사용하는 것은 항상 합리적이지는 않습니다. 그리고 심지어 가능하지 않을 수도 있습니다. 예를 들어, 입력 유형은 텍스트 일 수 있으며, 항목이 기하학적 표현으로 어떻게 그려지는지 명확하지 않고 어떻게 거리가 측정되어야 하는지도 명확하지 않습니다. 그러므로 여러분은 케이스 바이 케이스를 기반으로 거리 측정을 해야 합니다.




In the MNIST digit recognition case, one common way to measure image similarity is to count pixel-by-pixel matches. In other words, we compare the pixels in the top-left corner of each image to one another and if the more similar color (shade of gray) they are, the more similar the two images are. We also compare the pixels in the bottom-right corner of each image, and all pixels inbetween. This technique is quite sensitive to shifting or scaling the images: if we take an image of a '1' and shift it ever so slightly either left or right, the outcome is that the two images (before and after the shift) are very different because the black pixels are in different positions in the two images. Fortunately, the MNIST data has been preprocessed by centering the images so that this problem is alleviated.



MNIST 숫자 인식 케이스의 경우 이미지 유사성을 측정하는 일반적인 방법 중 하나는 픽셀 별 매치를 계산하는 것입니다. 즉, 각 이미지의 왼쪽 위 모서리에있는 픽셀을 서로 비교하고 더 비슷한 색 (회색 음영) 일수록 두 이미지가 더 유사하다고 판단합니다. 이렇게 각 이미지의 오른쪽 하단에있는 픽셀과 그 사이에있는 모든 픽셀을 비교합니다. 이 기술은 이미지를 이동하거나 크기를 조정하게 되면 민감하게 영향을 미칩니다. '1'이미지를 가져 와서 왼쪽 또는 오른쪽으로 조금씩 이동하면 결과적으로 두 이미지 (이동 전후)가 매우 다르게 됩니다. 검은 색 픽셀은 두 이미지에서 서로 다른 위치에 있기 때문입니다. 다행히도, MNIST 데이터는 이미지를 센터링하여 사전 처리되어 이 문제가 완화되었습니다.




Using nearest neighbors to predict user behavior


A typical example of an application of the nearest neighbor method is predicting user behavior in AI applications such as recommendation systems.


가장 nearest neighbor 방법의 전형적인 적용 예는 추천 시스템과 같은 AI 어플리케이션에서의 사용자 행동을 예측하는 것입니다.



The idea is to use the very simple principle that users with similar past behavior tend to have similar future behavior. Imagine a music recommendation system that collects data about users’ listening behavior. Let’s say you have listened to 1980s disco music (just for the sake of argument). One day, the service provider gets their hands on a hard-to-find 1980 disco classic, and add it into the music library. The system now needs to predict whether you will like it or not. One way of doing this is to use information about the genre, the artist, and other metadata, entered by the good people of the service provider. However, this information is relatively scarce and coarse and it will only be able to give rough predictions.



이 아이디어는 유사한 과거 행동을 하는 사용자가 비슷한 미래 행동을하는 경향이 있다는 아주 단순한 원칙을 사용하는 것입니다. 사용자의 청취 행동에 관한 데이터를 수집하는 음악 추천 시스템을 상상해보십시오. 1980 년대 디스코 음악을 들어 봤다고합시다. 어느 날, 서비스 제공 업체는 찾기 힘든 1980 디스코 클래식을 음악 라이브러리에 추가합니다. 시스템은 이제 당신이 좋아할 것인지 아닌지 예측할 필요가 있습니다. 이렇게하는 한 가지 방법은 서비스 제공 업체의 좋은 사람들이 입력 한 장르, 아티스트 및 기타 메타 데이터에 대한 정보를 사용하는 것입니다. 그러나 이 정보는 상대적으로 부족하고 거친 것이며 예측할 수 없을 것입니다.



What current recommendation systems use instead of the manually entered metadata, is something called collaborative filtering. The collaborative aspect of it is that it uses other users’ data to predict your preferences. The word “filter” refers to the fact that you will be only recommended content that passes through a filter: content that you are likely to enjoy will pass, other content will not. (This kind of filters may lead to the so called filter bubbles, which we mentioned in Chapter 1. We will return to them later.)



현재 추천 시스템이 사용하는 것은 수동으로 입력 한 메타 데이터 대신에 사용하는 collaborative filtering 이라고 하는 것입니다. collaborative라는 것은 여러분의 preferences를 예측하기 위해 다른 사용자들의 데이터를 사용한다는 겁니다.  'filter'라는 단어는 필터를 통과하는 콘텐츠만 추천된다는 것을 의미합니다. 여러분이 선호하는 콘텐츠들이 통과하고 그렇지 않은 것들은 통과하지 않을 겁니다.  (이런 종류의 필터는 1 장에서 언급 한 소위 말하는 필터 버블을 유발할 수 있습니다. 나중에 이부분은 다시 다루게 될 것입니다. )



Now let’s say that other users who have listened to 80s disco music enjoy the new release and keep listening to it again and again. The system will identify the similar past behavior that you and other 80s disco fanatics share, and since other users like you enjoy the new release, the system will predict that you will too. Hence it will show up at the top of your recommendation list. In an alternative reality, maybe the added song is not so great and other users with similar past behavior as yours don't really like it. In that case, the system wouldn't bother recommending it to you, or at least it wouldn't be at the top of the list of recommendations to you.



이제 80 년대 디스코 음악을 들었던 다른 사용자가 새 릴리스를 즐기고 이것을 계속해서 다시 듣는다고 가정 해 봅시다. 이 시스템은 귀하와 다른 80 년대 디스코 광신자들이 공유 한 유사한 과거 행동을 식별하고, 당신 같은 다른 사용자가 새로운 릴리스를 즐기기 때문에 시스템은 귀하도 그렇게 할 것이라고 예측할 것입니다. 따라서 추천 목록 상단에 표시됩니다. 현실에서는, 추가 된 노래가 그리 좋지 않을 수도 있고 당신과 비슷한 과거 행동을하는 다른 사용자가 이것을 좋아하지 않을 수도 있습니다. 이 경우 시스템에서 권장하지 않거나 최소한 추천 목록 맨 위에 올 수 없습니다.



The following exercise will illustrate this idea.



다음 연습문제에서 이 부분을 다루고 있습니다.





AWS DeepLens - Deep learning enabled video camera for developers




Exercise 14: Customers who bought similar products


In this exercise, we will build a simple recommendation system for an online shopping application where the users' purchase history is recorded and used to predict which products the user is likely to buy next.



이 연습문제 에서는 사용자의 구매 내역이 기록되고 사용자가 다음에 구매할 제품을 예측하는 데 사용되는 온라인 쇼핑 응용 프로그램을 위한 간단한 추천 시스템을 구축 할 것입니다.



We have data from six users. For each user, we have recorded their recent shopping history of four items and the item they bought after buying these four items:



우리는 6 명의 사용자 데이터를 가지고 있습니다. 각 사용자별로 4 가지 항목에 대한 최근 구매 내역과 4 가지 항목을 구입 한 후 구입 한 항목을 기록했습니다.






The most recent purchase is the one in the rightmost column, so for example, after buying a t-shirt, flip flops, sunglasses, and Moby Dick (novel), Ville bought sunscreen. Our hypothesis is that after buying similar items, other users are also likely to buy sunscreen.



맨 오른쪽에 있는 것들이 가장 최근에 구입한 목록들입니다. 예를 들어, Ville은 티셔츠, 플립 플롭, 선글라스 및 Moby Dick (소설)을 구입 한 후, 썬 스크린을 샀습니다. 우리의 가설은 비슷한 품목을 구입 한 다른 사용자들도 선 스크린을 사기 쉽다는 것입니다.



To apply the nearest neighbor method, we need to define what we mean by nearest. This can be done in many different ways, some of which work better than others. Let’s use the shopping history to define the similarity (“nearness”) by counting how many of the items have been purchased by both users.



nearest neighbor method을 적용하려면 nearest의 의미를 정해야 합니다. 이것은 여러 가지 방법으로 수행 할 수 있으며 그 중 일부는 다른 것보다 효과적일 겁니다. shopping history을 사용하여 두 사용자가 구매 한 항목 수를 계산하여 유사성 ( "nearness")을 정의합시다.



For example, users Ville and Henrik have both bought a t-shirt, so their similarity is 1. Note that flip flops doesn't count because we don't include the most recent purchase when calculating the similarity — it is reserved for another purpose.


예를 들어, Ville과 Henrik user는 모두 티셔츠를 구입했기 때문에 유사도는 1입니다. 유사도를 계산할 때 가장 최근의 구매가 포함되어 있지 않으므로 플립 플립은 포함되지 않습니다. 그것은 다른 용도로 사용될 겁니다.



Our task is to predict the next purchase of customer Travis who has bought the following products:



이제 아래 상품들을 구매한 Travis라는 고객의 다음 구매를 예측하는 겁니다.





You can think of Travis being our test data, and the above six users make our training data.



Travis가 우리의 테스트 데이터라고 생각하세요.  위의 6 명의 사용자가 우리의 training data를 만듭니다.




Proceed as follows:


  1. Calculate the similarity of Travis relative to the six users in the training data (done by adding together the number of similar purchases by the users).
  2. Having calculated the similarities, identify the user who is most similar to Travis by selecting the largest of the calculated similarities.
  3. Predict what Travis is likely purchase next by looking at the most recent purchase (the rightmost column in the table) of the most similar user from the previous step.


1. training data에서 6 명의 사용자에 대한 Travis의 유사성을 계산합니다 (사용자가 유사한 구매 횟수를 합산하여 계산).

2. 유사점을 계산 한 후 계산 된 유사성 중 가장 큰 것(숫자)을 선택하여 Travis와 가장 유사한 사용자를 식별합니다.

3. 이전 단계에서 가장 유사한 사용자의 가장 최근 구매 (테이블의 가장 오른쪽 열)를보고 Travis가 다음에 구매할 것으로 예상되는 것을 예측합니다.




In the above example, we only had six users’ data and our prediction was probably very unreliable. However, online shopping sites often have millions users, and the amount of data they produce is massive. In many cases, there are a hoard of users whose past behavior is very similar to yours, and whose purchase history gives a pretty good indication of your interests.



위의 예에서 우리는 6 명의 사용자 데이터 만 가지고 있었고 예측은 매우 신뢰할 수 없었습니다. 그러나 온라인 쇼핑 사이트는 대개 수백만 명의 사용자를 보유하고 있으며 이들이 생산하는 데이터의 양은 방대합니다. 많은 경우 사용자의 과거 행동이 당신과 매우 유사하며 구매 내역이 당의 관심사를 잘 보여주는 사용자가 많습니다.



These predictions can also be self-fulfilling prophecies in the sense that you are more likely to buy a product if it is recommended to you by the system, which makes it tricky to evaluate how well they actually work. The same kind of recommendation systems are also used to recommend music, movies, news, and social media content to users. In the context of news and social media, filters created by such systems can lead to filter bubbles.



이러한 예측은 시스템에서 사용자에게 권장되는 제품을 그 사용자가 구매할 확률이 높다는 의미에서 self-fulfilling prophecies이 될 수 있습니다. 이는 실제로 얼마나 효과적인지 평가하는 것이 까다로울 수 있습니다. 음악, 영화, 뉴스 및 소셜 미디어 콘텐츠를 사용자에게 추천하는데도 동일한 종류의 추천 시스템이 사용됩니다. 뉴스 및 소셜 미디어의 맥락에서 이러한 시스템에 의해 생성 된 필터는 필터 버블을 유발할 수 있습니다.




Exercise 15: Filter bubbles

As discussed above, recommending news of social media content that a user is likely to click or like, may lead to filter bubbles where the users only see content that is in line with their own values and views.



위에서 언급했듯이 사용자가 클릭하거나 좋아할만한 소셜 미디어 콘텐츠의 뉴스를 추천하면 사용자가 자신의 가치(values) 및 관점(views)과 일치하는 콘텐츠 만 보게되는 필터 버블이 발생할 수 있습니다.



  1. Do you think that filter bubbles are harmful? After all, they are created by recommending content that the user likes. What negative consequences, if any, may be associated with filter bubbles? Feel free to look for more information from other sources.
  2. Can you think of ways to avoid filter bubbles while still being able to recommend content to suit personal preferences? Try to come up with at least one suggestion. You can look for ideas from other sources, but we'd like to hear your own ideas too!


1. 필터 거품이 유해하다고 생각합니까? 결국, 그들은 사용자가 좋아할만한 내용을 추천하는 것을 통해 만들어집니다.  필터 거품과 관련해서 어떤 부정적인 요소가 있을 수 있을 까요? 여러분들 마음껏 다른 출처들을 통해 더 많은 정보를 찾아보세요.


2. 개인의 취향에 맞게 콘텐츠를 추천 하면서도 필터 거품을 피하는 방법이 있을까요? 적어도 하나의 제안을 내놓으십시오. 다른 출처에서 아이디어를 찾으셔도 되지만 여러분만의 생각을 한번 들어보고 싶습니다. 



Note: your answer should be at least a few sentences for each part.





반응형

Elements of AI - The types of machine learning

2018. 6. 16. 05:18 | Posted by 솔웅


반응형


Elements of AI




I.The types of machine learning





Handwritten digits are a classic case that is often used when discussing why we use machine learning, and we will make no exception.

Handwritten digits는 machine learning을 사용하는 이유를 논의 할 때 자주 사용되는 고전적인 사례입니다. 우리도 예외는 아니죠.




Below you can see examples of handwritten images from the very commonly used MNIST dataset.



아래 MNIST 데이터 세트로 일반적으로 사용되는 손글씨 이미지의 예를 보실 수 있습니다. 






The correct label (what digit the writer was supposed to write) is shown above each image. Note that some of the "correct” class labels are questionable: see for example the second image from left: is that really a 7, or actually a 4?



올바른 label (작성자가 작성해야하는 숫자)은 각 이미지 위에 표시됩니다. "correct” 클래스 레이블 중 일부는 의문의 여지가 있습니다. 예를 들어 왼쪽의 두 번째 이미지를보십시오 : 실제로 7입니까, 아니면 실제로 4입니까?



Note

MNIST – What's that?

Every machine learning student knows about the MNIST dataset. Fewer know what the acronym stands for. In fact, we had to look it up to be able to tell you that the M stands for Modified, and NIST stands for National Institute of Standards and Technology. Now you probably know something that an average machine learning expert doesn’t!


모든 machine learning 학생은 MNIST 데이터 세트에 대해 알고 있습니다. 그 중 이것이 어떤것의 약어인지 아는 학생은 거의 없을 겁니다.  사실 M이 Modified를 나타내고 NIST가 National Institute of Standards and Technology의 약자라고 말해 보겠습니다. 이제 일반적인 machine learning 전문가가 아니라는 것을 아실 수 있으시겠죠?




In the most common machine learning problems, exactly one class value is correct at a time. This is also true in the MNIST case, although as we said, the correct answer may often be hard to tell. In this kind of problems, it is not possible that an instance belongs to multiple classes (or none at all) at the same time. What we would like to achieve is an AI method that can be given an image like the ones above, and automatically spit out the correct label (a number between 0 and 9).



가장 일반적인 machine learning 문제는 한 번에 하나의 클래스 값만 정확하다는 겁니다. ### 이것은 우리가 말했듯이 MNIST 케이스에서도 마찬가지 입니다. 종종 정답이 무엇인지 확정할 수 있을 때기 있습니다. 이런 종류의 문제에서는 인스턴스가 동시에 여러 클래스에 속하게 되는 것은 불가능 합니다. 우리가 달성하고자하는 것은 위의 이미지와 같은 이미지를 제공 받고도 correct label (0에서 9 사이의 숫자)을 자동으로 내 놓을 수 있는 AI 방법론 입니다.





Note

How not to solve the problem

An automatic digit recognizer could in principle be built manually by writing down rules such as:


자동 숫자 인식기는 원칙적으로 다음과 같은 규칙을 작성하여 수동으로 작성할 수 있습니다.


  • if the black pixels are mostly in the form of a single loop then the label is 0
  • if the black pixels form two intersecting loops then the label is 8
  • if the black pixels are mostly in a straight vertical line in the middle of the figure then the label is 1

and so on...

This was how AI methods were mostly developed in the 1980s (so called “expert systems”). However, even for such a simple task as digit recognition, the task of writing such rules is very laborious. In fact, the above example rules wouldn’t be specific enough to be implemented by programming – we’d have to define precisely what we mean by “mostly”, “loop”, “line”, “middle”, and so on.



이것은 1980 년대에 개발 된  AI 인공지능 방법론 이었습니다. expert systems라고 불렸죠. 그러나 숫자 인식과 같은 단순한 작업에도 이러한 규칙을 작성하는 작업은 매우 힘듭니다. 실제로, 위의 예제 규칙은 프로그래밍으로 구현하기에 충분히 구체적이지 않습니다. 우리는 "mostly", "loop", "line", "middle"등의 의미를 정확하게 정의해야합니다.



And even if we did all this work, the result would likely be a bad AI method because as you can see, the handwritten digits are often a bit so-and-so, and every rule would need a dozen exceptions.


그리고 우리가 이 모든 작업을 했더라도, 결과는 아마도 안좋은 인공지능 방법론으로 판명 될 것입니다. 왜냐하면 여러분이 보듯이 손으로 쓴 숫자들은 그냥 그렇습니다. 여러분이 만든 룰에 대해 수십개의 예외적인 요소들이 있을 겁니다..







Three types of machine learning


The roots of machine learning are in statistics, which can also be thought of as the art of extracting knowledge from data. Especially methods such as linear regression and Bayesian statistics, which are both already more than two centuries old (!), are even today at the heart of machine learning. For more examples and a brief history, see the timeline of machine learning (Wikipedia).



machine learning의 뿌리는 통계에 있습니다. 데이터로부터 지식을 추출하는 예술이죠. 특히 2 세기 전의 linear regression 선형 회귀 및 Bayesian statistics 와 같은 방법론은 오늘날에도 기계 학습의 핵심입니다. 더 많은 예제와 간단한 역사를 보려면 machine learning (Wikipedia)의 타임 라인을 참조하십시오.




The area of machine learning is often divided in subareas according to the kinds of problems being attacked. A rough categorisation is as follows:


기계 학습 영역은 종종 공격받는 문제의 종류에 따라 하위 영역으로 나뉩니다. 대략적인 분류는 다음과 같습니다.



Supervised learning: We are given an input, for example a photograph with a traffic sign, and the task is to predict the correct output or label, for example which traffic sign is in the picture (speed limit, stop sign, ...). In the simplest cases, the answers are of the form yes/no. (We call these binary classification problems.)



Supervised learning : 우리는 교통 표지가 있는 사진과 같은 입력을받습니다. 그리고 해야 할 일은 해당 사진에 있는 교통 표지(speed limit, stop sign, ...)에 알맞는 output이나 라벨을 예측하는 것입니다. 가장 단순한 경우 답은 예 / 아니오 형식입니다. (우리는 이러한 이진 분류 문제를 호출합니다.)



Unsupervised learning: There are no labels or correct outputs. The task is to discover the structure of the data: for example, grouping similar items to form “clusters”, or reducing the data to a small number of important “dimensions”. Data visualization can also be considered unsupervised learning.



Unsupervised learning : 레이블이나 정확한 결과 outputs가 없습니다. 예를 들어, 유사한 항목을 그룹화하여 "클러스터"를 형성하거나 소수의 중요한 "dimensions"으로 데이터를 축소하는 등의 데이터 구조를 발견해야합니다. 데이터 시각화는 unsupervised learning 으로 간주 될 수도 있습니다.



Reinforcement learning: Commonly used in situations where an AI agent like a self-driving car must operate in an environment and where feedback about good or bad choices is available with some delay. Also used in games where the outcome may be decided only at the end of the game.



Reinforcement learning : 일반적으로 자율 주행 차량과 같은 인공 지능 agent가 한 환경 안에서 작동해야하며 좋은 선택 또는 나쁜 선택에 대한 피드백을 약간의 지연 후에 가능해야 합니다. 또한 게임이 끝날 때만 결과를 결정할 수있는 게임에서도 사용됩니다.



The categories are somewhat overlapping and fuzzy, so a particular method can sometimes be hard to place in one category. For example, as the name suggests, so called semisupervised learning is partly supervised and partly unsupervised.



categories는 다소 겹치고 fuzzy 하기 (뚜렷하지 않기) 때문에 특정 방법을 때로는 한 category에 배치하기가 어려울 수 있습니다. 예를 들어 그 이름에서 알 수 있듯이 semisupervised learning은 부분적으로 supervised 감독 되고 부분적으로 unsupervised 감독을받지 않습니다.



Note

Classification

When it comes to machine learning, we will focus primarily on supervised learning, and in particular, classification tasks. In classification, we observe in input, such as a photograph of a traffic sign, and try to infer its “class”, such as the type of sign (speed limit 80 km/h, pedestrian crossing, stop sign, ...). Other examples of classification tasks include: identification of fake Twitter accounts (input includes the list of followers, and the rate at which they have started following the account, and the class is either fake or real account) and handwritten digit recognition (input is an image, class is 0,...,9).


machine learning 이라고 하면 우리는 주로 supervised learning와 in particular, classification tasks 에 우선적으로 주목합니다.  classification에서 우리는 교통 표지판 사진 같은 입력을 살펴 봅니다. 그리고 그 “class” 를 추론하죠. 즉 표지판의 타입 (speed limit 80 km/h, pedestrian crossing, stop sign, ...) 같은 클래스를 추론하는 겁니다.  classification의 다른 예는 다음과 같습니다 : 가짜 트위터 계정 (입력에는 팔로어 목록, 그 계정을 팔로우 하기 시작한 시기 등이 포함되어 있고 class는 가짜 계정 또는 진짜 계정이 됩니다.) 및 손글씨 숫자 인식 (입력은 이미지, 클래스는 0, ..., 9) 등이 있습니다..






Humans teaching machines: supervised learning



Instead of manually writing down exact rules to do the classification, the point in supervised machine learning is to take a number of examples, label each one by the correct label, and use them to “train” an AI method to automatically recognize the correct label for the training examples as well as (at least hopefully) any other images. This of course requires that the correct labels are provided, which is why we talk about supervised learning. The user who provides the correct labels is a supervisor who guides the learning algorithm towards correct answers so that eventually, the algorithm can independently produce them.



분류 작업 (classification)을 수행하기 위해 정확한 규칙을 수동으로 작성하는 대신, supervised machine learning의 포인트는 examples들의 숫자를 받아서 정확한 레이블로 각각을 레이블 하고 그것을 인공지능 방법론으로 “train” 훈련 해서 training 된 예제들 뿐만 아니라 트레이닝 되지 않은 예제들에 대해서도 정확한 레이블을 자동적으로 인식하도록 하는 겁니다. 이것은 당연히 올바른 레이블이 제공될 것이 요구됩니다. 그렇기 때문에 supervised learning 이라고 하는 겁니다. 올바른 레이블을 제공하는 사용자는 학습 알고리즘을 정답으로 이끄는 감독자이며 그 감독을 바탕으로 결국 알고리즘이 독립적으로 스스로의 알고리즘을 재생성 할 수 있게 되는 겁니다.




In addition to learning how to predict the correct label in a classification problem, supervised learning can also be used in situations where the predicted outcome is a number. Examples include predicting the number of people who will click a Google ad based on the ad content and data about the user’s prior online behavior, predicting the number of traffic accidents based on road conditions and speed limit, or predicting the selling price of real estate based on its location, size, and condition. These problems are called regression. You probably recognize the term linear regression, which is a classical, still very popular technique for regression.




classification 문제에서 올바른 레이블을 예측하는 방법을 배우는 것 외에도 supervised learning은 예측 된 결과가 숫자 인 경우에도 사용할 수 있습니다. 예를 들어 광고 내용과 사용자의 이전 온라인 행동에 대한 데이터를 기반으로 Google 광고를 클릭하는 사람의 수를 예측하고, 도로 상태 및 속도 제한에 따라 교통 사고의 횟수를 예측하거나 부동산의 위치, 크기, 상태등을 기반으로 그 부동산의 판매가를 예측하는 것들이 그것입니다. 이러한 문제를 회귀 (regression)라고 합니다. 아마도 선형 회귀 linear regression라는 용어를 알고 있을 것입니다. 고전적인 용어죠. 이 선형회귀는 여전히 널리 사용되는 기술입니다.



Note

Example

Suppose we have a data set consisting of apartment sales data. For each purchase, we would obviously have the price that was paid, together with the size of the apartment in square meters (or square feet, if you like), and the number of bedrooms, the year of construction, the condition (on a scale from “disaster“ to “spick and span”). We could then use machine learning to train a regression model that predicts the selling price based on these features. See a real-life example here


아파트 판매 데이터로 구성된 데이터 세트가 있다고 가정합시다. 매 구입마다 아파트의 크기와 함께 평방 미터 (또는 원하는 경우 평방 피트), 침실 수, 건축 연도, 조건 ( "재해"에서 "스픽과 스팬"에 대한 조건) 들에 대한 정보를 얻을 수 있습니다. 그런 다음 machine learning을 사용하여 이러한 기능을 기반으로 판매 가격을 예측하는 회귀 regression 모델을 train 할 수 있습니다. 실생활 예를 들어 보겠습니다.






Caveat: Careful with that Machine Learning algorithm



There are a couple potential mistakes that we'd like to make you aware of. They are related to the fact that unless you are careful with the way you apply machine learning methods, you could become too confident about the accuracy of your predictions, and be heavily disappointed when the accuracy turns out to be worse than expected.



우리가 저지를 수 있는 몇가지 잠재적인 mistakes들이 있습니다.. 그들은 당신이 machine learning 방법을 적용하는 방법에 주의하지 않는 한, 예측의 정확성에 대해 너무 확신 할 수 있고, 정확성이 예상보다 나쁠 때 크게 실망 할 수 있다는 사실과 관련이 있습니다.



The first thing to keep in mind in order to avoid big mistakes, is to split your data set into two parts: the training data and the test data. We first train the algorithm using only the training data. This gives us a model or a rule that predicts the output based on the input variables.



큰 실수를 피하기 위해 염두에 두어야 할 첫 번째 사항은 데이터 세트를 training 데이터와 테스트 데이터의 두 부분으로 분리하는 것입니다. 우리는 우선 training 데이터만을 사용하여 알고리즘을 training 시킵니다. 이것은 입력 변수들을 기반으로 출력을 예측하는 모델 또는 규칙을 제공합니다.



To assess how well we can actually predict the outputs, we can't count on the training data. While a model may be a very good predictor in the training data, it is no proof that it can generalize to any other data. This is where the test data comes in handy: we can apply the trained model to predict the outputs for the test data and compare the predictions to the actual outputs (for example, future apartment sale prices).



실제 출력을 얼마나 잘 예측할 수 있는지 평가하기 위해 training data에만 의지할 수 없습니다. 모델이 training 데이터에서 매우 좋은 예측인자 일 수 있지만, 다른 어떤 데이터로도 일반화 할 수 있다는 증거는 아닙니다. 이것이 테스트 데이터를 사용해야 되는 이유입니다. 우리는 trained model을 적용하여 테스트 데이터의 출력을 예측하고 예상 결과를 실제 출력 (예 : 향후 아파트 판매 가격)과 비교할 수 있습니다.




Note

Too fit to be true! Overfitting alert


It is very important to keep in mind that the accuracy of a predictor learned by machine learning can be quite different in the training data and in separate test data. This is the so called overfitting phenomenon, and a lot of machine learning research is focused on avoiding it one way or another. Intuitively, overfitting means trying to be too smart. When predicting the success of a new song by a known artist, you can look at the track record of the artist's earlier songs, and come up with a rule like “if the song is about love, and includes a catchy chorus, it will be top-20“. However, maybe there are two love songs with catchy choruses that didn't make the top-20, so you decide to continue the rule “...except if Sweden or yoga are mentioned“ to improve your rule. This could make your rule fit the past data perfectly, but it could in fact make it work worse on future test data.


training 데이터와 별도의 테스트 데이터에서 machine learning으로 얻은 예측 변수의 정확도가 매우 다를 수 있다는 점을 명심해야합니다. 이것은 소위 오버 피팅 (overfitting) 현상이며, machine learning 연구의 많은 부분은 이를 피하는 데 초점을 맞추고 있습니다. 직관적으로 overfitting은 너무 똑똑한 것을 의미합니다. 알려진 아티스트의 새로운 노래 성공을 예측할 때 아티스트의 이전 곡의 트랙 레코드를 보고 "노래가 사랑에 관한 것이고 괜찮은 코러스를 넣으면 탑 20에 들 것이다. ". 그러나 괜찮은 코러스가 있는 두개의 사랑노래가 탑 20에 들지 못했다면 규칙을 개선하겠죠. "스웨덴이나 요가에 대한 노래를 제외하고....." 같은 예외 조건들을 넣을 겁니다. 이렇게하면 규칙이 과거 데이터에는 잘 맞을 수 있겠지만 사실 미래의 테스트 데이터에서는 더 안 맞을 수 있습니다.



Machine learning methods are especially prone to overfitting because they can try a huge number of different “rules“ until one that fits the training data perfectly is found. Especially methods that are very flexible and can adapt to almost any pattern in the data can overfit unless the amount of data is enormous. For example, compared to quite restricted linear models obtained by linear regression, neural networks can require massive amounts of data before they produce reliable prediction.


Machine learning 방법은 특히 훈련 데이터에 완벽하게 맞는 것이 발견 될 때까지 엄청난 수의 서로 다른 "규칙"을 시도 할 수 있기 때문에 overfitting에 취약합니다. 특히 매우 유연하고 데이터의 거의 모든 패턴에 적용 할 수있는 방법은 데이터 양이 엄청나지 않는 한 과장 될 수 있습니다. 예를 들어, 선형 회귀에 의해 얻어진 매우 제한된 선형 모델과 비교할 때, 신경망은 신뢰할 수있는 예측을 생성하기 전에 엄청난 양의 데이터를 필요로 할 수 있습니다.




Learning to avoid overfitting and choose a model that is not too restricted, nor too flexible, is one of the most essential skills of a data scientist.



overfitting을 피하고 너무 제한적이거나 너무 두리뭉실하지 않은 모델을 고르기 위한 Learning은 data scientist의 가장 핵김 기술 중 하나입니다. 





Learning without a teacher: unsupervised learning



Above we discussed supervised learning where the correct answers are available, and the taks of the machine learning algorithm is to find a model that predicts them based on the input data.



앞에서 우리는 정답이 가능한 supervised learnin에 대해 논의했으며 machine learning 알고리즘의 작업은 입력 데이터를 기반으로 예측하는 모델을 찾는 것이라고 배웠습니다



In unsupervised learning, the correct answers are not provided. This makes the situation quite different since we can't build the model by making it fit the correct answers on training data. It also makes the evaluation of performance more complicated since we can't check whether the learned model is doing well or not.



unsupervised learning에서 정답은 제공되지 않습니다. 이것은 우리가 모델을 training data에 대한 training data를 맞추어서 만들 수 없기 때문에 상황이 상당히 달랐습니다. 또한 학습 된 모델 learned model이 잘 작동하는지 여부를 확인할 수 없으므로 성능 평가가 더 복잡해집니다.



Typical unsupervised learning methods attempt to learn some kind of “structure” underlying the data. This can mean, for example, visualization where similar items are placed near each other and dissimilar items further away from each other. It can also mean clustering where we use the data to identify groups or “clusters” of items that are similar to each other but dissimilar from data in other clusters.


일반적인 unsupervised learning 방법은 데이터의 기초를 이루는 일종의 "구조 structure"를 배우려고 시도합니다. 예를 들어, 비슷한 항목이 서로 가까이 있고 다른 항목이 서로 멀리 떨어져있는 시각화를 의미 할 수 있습니다. 또한 클러스터링을 사용하여 데이터를 사용하여 서로 비슷한 그룹이나 다른 클러스터의 데이터와 다른 그룹의 "클러스터"를 식별 할 수 있습니다.




Note

Example

As a concrete example, grocery store chains collect data about their customers' shopping behavior (that's why you have all those loyalty cards). To better understand their customers, the store can either visualize the data using a graph where each customer is represented by a dot and customers who tend to buy the same products are placed nearer each other than customers who buy different products. Or, the store could apply clustering to obtain a set of customer groups such as ‘low-budget health food enthusiasts’, ‘high-end fish lovers’, ‘soda and pizza 6 days a week’, and so on. Note that the machine learning method would only group the customers into clusters, but it wouldn't automatically generate the cluster labels (‘fish lovers’ and so on). This task would be left for the user.


구체적인 예를 들어, 식료품 점 체인은 고객의 쇼핑 행동에 대한 데이터를 수집합니다 (loyalty cards가있는 이유입니다). 고객을 더 잘 이해하기 위해 각 고객이 점으로 표시되고 동일한 제품을 구매하려는 고객이 다른 제품을 구매하는 고객보다 서로 가깝게 배치되는 그래프를 사용하여 데이터를 시각화 할 수 있습니다. 또는 상점은 클러스터링을 적용하여 '저예산 건강 음식 애호가', '고급 생선 애호가', '일주일에 6 일 동안의 소다 및 피자'등과 같은 일련의 고객 그룹을 얻을 수 있습니다. 기계 학습 방법은 고객을 클러스터로만 그룹화하지만 클러스터 레이블 ( '생선 애호가'등)을 자동으로 생성하지는 않습니다. 이 작업은 사용자를 위해 남겨 둡니다.



Yet another example of unsupervised learning can be termed generative modeling. This has become a prominent approach since the last few years as a deep learning technique called /generative adversarial networks/ (GANs) has lead to great advances. Given some data, for example, photographs of people's faces, a generative model can generate more of the same: more real-looking but artificial images of people's faces.



unsupervised learning의 또 다른 예는 generative modeling 생성 적 모델링이라고 할 수 있습니다. 지난 몇 년 동안 / generative adversarial networks / (GANs)라고 불리는 심층적 인 학습 기법이 큰 진보를 이끌어내는 등 주목할만한 접근 방식이 되었습니다. 예를 들어 사람들의 얼굴 사진과 같은 일부 데이터를 감안할 때 generative modeling 생성 모델은 사람들의 얼굴을 보다 실제처럼 보이지만 인공적인 이미지로 생성합니다.



We will return to GANs and the implications of being able to produce high-quality artificial image content a bit later in the course, but next we will take a closer look at supervised learning and discuss some specific methods in more detail.



우리는 이 GANs를 다시 살펴 볼 것입니다. 이마도 이 코스에서 artificial image content를 만들 수 있겠구나 라고 생각하실 지 모르지만 그건 아니고 다음 단원에서는  supervised learning을 좀 더 자세히 살펴보고 특정 방법들에 대해 조금 더 자세히 얘기 나누겠습니다. 





반응형
이전 1 2 다음