SlideShare a Scribd company logo
1 of 16
Download to read offline
머신러닝/딥러닝 학습시 수학 공부법
이 창 신
2017.10.13
예고
프로그래밍을 위한 별도의 수학을 다루기 전에, 이미 배웠던(물론
안배웠거나 오래됐을 수도 있습니다) 수학인 집합, 명제, 함수 등이
프로그래밍에 어떻게 쓰이는지 살펴봅니다. 머신러닝/딥러닝
학습에 나오는 행렬, 미적분과 확률 통계 등은 배운 것과 배울 것이
섞여 있을 수도 있습니다. 앞으로 어떤 수학 공부를 하면 좋을지도
말씀드리고 싶고요. 더불어, 최근 번역 작업과 미국 생활에 대한
얘기도 하려 합니다.
목차
과거
집합
명제
함수
현재
미분
선형대수
미래
학습법
LATEX
끝으로
집합의 표현
원소 나열법(extentional definition)
A = {1, 2, 3} (1)
int [ ] a = {1 , 2 , 3}
조건 제시법(intentional definition)
A = {x|1 ≤ x ≤ 3} (2)
?
집합의 관계
원소가 집합에 속한다
1 ∈ A (3)
Set<Integer > a = Set . of (1 , 2 , 3)
a . c o n t ai n s (1)
부분 집합
B ⊂ A where B = {1, 2} (4)
Set<Integer > b = Set . of (1 , 2)
a . c o n t a i n s A l l (b)
논리 연산(부울 대수)
∼ (p ∨ q) =∼ p∧ ∼ q (5)
int a = 4
int b = 3
! ( a != 3 && b != 4)
a == 3 | | b == 4
함수의 정의
정의역(domain), 공역(codomain), 치역(range)
f : X → Y (6)
int f u n c t i o n ( S t r i n g x ) { return x . length ( ) ; }
f u n c t i o n ( ” t e s t ” )
함수의 유형
단사(injective)
x1 = x2 => f (x1) = f (x2) where ∀x1, x2 ∈ X (7)
전사(surjective)
f (X) = Y (8)
전단사(bijective)와 역함수(inverse)
y = f (x) ⇐⇒ f −1
(y) = x (9)
예)
y = f (x) = ax + b
⇒ y − b = ax
⇒
y
a
−
b
a
= x
⇒ f −1
(x) =
x
a
−
b
a
(10)
역함수 구현
코드 수준에서
double f u n c t i o n ( double x ){ return 2.0 ∗ x + 3 . 0 ; }
double i n v e r s e ( double x ){ return x /2.0 − 3 . 0 / 2 . 0 ; }
저장된 값을 바탕으로
Map<Integer , Double> f = Map. of (1 , 2.0 , 2 , 4.0)
// . . .
Map<Double , Integer > i = Map. of ( 2 .0 , 1 , 4.0 , 2)
편미분(partial derivative)
다변수 함수에서 한변수로만 미분
https://www.youtube.com/watch?v=oZyvmtqLmLo&feature=
youtu.be
f (x, y) = x + 2y ⇒
∂f
∂x
=
∂x
∂x
+
∂2y
∂x
= 1 + 0 = 1
∂f
∂y
=
∂x
∂y
+
∂2y
∂y
= 0 + 2 = 2
(11)
연쇄 미분(합성 함수 미분)
https://docs.google.com/presentation/d/
1CF-vEPzMSkVKnePO__AewGfzmui2aGMr8HhI9diD2t8/edit#
slide=id.g27be483e1c_0_42 (10쪽)
h = g · f ⇒
h(x) = (g · f )(x) = g(f (x))
⇒
∂h
∂x
=
∂g
∂f
∂f
∂x
(12)
예) f (x, y, w) = (xw − y)2 일 때 xw − y = t 라 하면 f (t) = t2
∂f
∂w
=
∂f
∂t
∂t
∂w
=
∂t2
∂t
∂(xw − y)
∂w
= 2tx = 2(xw − y)x (13)
벡터
벡터: 수를 1차원(직선)으로 나열한 것
v = (1, 2) (14)
벡터 공간: 벡터의 기본 연산(합과 정수배)이 정의된 공간, 선형
공간
x + y = (x1, x2) + (y1, y2) = (x1 + x2, y1 + y2) (15)
cx = c(x1, x2) = (cx1, cx2) (16)
벡터 공간의 차원: 기저 벡터의 개수(좌표 성분의 개수)
행렬
행렬: 수를 2차원(직사각형)으로 나열한 것
a11 a12
a21 a22
(17)
행렬의 곱셈:
a11 a12
a21 a22
b11 b12
b21 b22
=
a11b11 + a12b21 a11b12 + a12b22
a21b11 + a22b21 a21b12 + a22b22
(18)
행렬은 사상(寫像, mapping)이다.
f (x) = Ax = y (19)
a11 a12
a21 a22
x1
x2
=
a11x1 + a12x2
a21x1 + a22x2
=
y1
y2
(20)
학습법
복습: 정석, 선형대수, 공업수학, 확률통계, 미적분, ...
따라 쓰기
LATEX
TeX Live: MacTeX
한글: kotex 패키지 사용
끝으로
수학은 ()의 언어이다

More Related Content

What's hot

2012 Dm A0 02 Pdf
2012 Dm A0 02 Pdf2012 Dm A0 02 Pdf
2012 Dm A0 02 Pdfkd19h
 
Bundle Adjustment
Bundle AdjustmentBundle Adjustment
Bundle AdjustmentJongho Choi
 
부울 대수와 컴퓨터 논리
부울 대수와 컴퓨터 논리부울 대수와 컴퓨터 논리
부울 대수와 컴퓨터 논리suitzero
 
제4강 명제와 논리-정보
제4강 명제와 논리-정보제4강 명제와 논리-정보
제4강 명제와 논리-정보csungwoo
 
1.3장 차수 높은 프로시저(higher order procedure)로 요약하는 방법
1.3장 차수 높은 프로시저(higher order procedure)로 요약하는 방법1.3장 차수 높은 프로시저(higher order procedure)로 요약하는 방법
1.3장 차수 높은 프로시저(higher order procedure)로 요약하는 방법홍준 김
 
HI-ARC Number Theory
HI-ARC Number TheoryHI-ARC Number Theory
HI-ARC Number TheoryJae-yeol Lee
 
11. array & pointer
11. array & pointer11. array & pointer
11. array & pointer웅식 전
 
12 1. multi-dimensional array
12 1. multi-dimensional array12 1. multi-dimensional array
12 1. multi-dimensional array웅식 전
 
TestSDS2018-1(answer)
TestSDS2018-1(answer)TestSDS2018-1(answer)
TestSDS2018-1(answer)Yong Heui Cho
 
타임리프 폼과 어노테이션.Key
타임리프 폼과 어노테이션.Key타임리프 폼과 어노테이션.Key
타임리프 폼과 어노테이션.KeySeokju Hong
 
HI-ARC PS 102 Brute Force
HI-ARC PS 102 Brute ForceHI-ARC PS 102 Brute Force
HI-ARC PS 102 Brute ForceJae-yeol Lee
 
R 기본-데이타형 소개
R 기본-데이타형 소개R 기본-데이타형 소개
R 기본-데이타형 소개Terry Cho
 
R 프로그래밍 기본 문법
R 프로그래밍 기본 문법R 프로그래밍 기본 문법
R 프로그래밍 기본 문법Terry Cho
 
2021 2학기 정기 세미나 4주차
2021 2학기 정기 세미나 4주차2021 2학기 정기 세미나 4주차
2021 2학기 정기 세미나 4주차Moonki Choi
 
2021 1학기 정기 세미나 6주차
2021 1학기 정기 세미나 6주차2021 1학기 정기 세미나 6주차
2021 1학기 정기 세미나 6주차Moonki Choi
 
[D2 CAMPUS] 부산대 Alcall 프로그래밍 경시대회 문제 풀이
[D2 CAMPUS] 부산대 Alcall 프로그래밍 경시대회 문제 풀이[D2 CAMPUS] 부산대 Alcall 프로그래밍 경시대회 문제 풀이
[D2 CAMPUS] 부산대 Alcall 프로그래밍 경시대회 문제 풀이NAVER D2
 
Quaternion and Rotation
Quaternion and RotationQuaternion and Rotation
Quaternion and RotationYoung-Min kang
 
알고리즘과 자료구조
알고리즘과 자료구조알고리즘과 자료구조
알고리즘과 자료구조영기 김
 

What's hot (20)

2012 Dm A0 02 Pdf
2012 Dm A0 02 Pdf2012 Dm A0 02 Pdf
2012 Dm A0 02 Pdf
 
Bundle Adjustment
Bundle AdjustmentBundle Adjustment
Bundle Adjustment
 
이산수학02
이산수학02이산수학02
이산수학02
 
부울 대수와 컴퓨터 논리
부울 대수와 컴퓨터 논리부울 대수와 컴퓨터 논리
부울 대수와 컴퓨터 논리
 
제4강 명제와 논리-정보
제4강 명제와 논리-정보제4강 명제와 논리-정보
제4강 명제와 논리-정보
 
1.3장 차수 높은 프로시저(higher order procedure)로 요약하는 방법
1.3장 차수 높은 프로시저(higher order procedure)로 요약하는 방법1.3장 차수 높은 프로시저(higher order procedure)로 요약하는 방법
1.3장 차수 높은 프로시저(higher order procedure)로 요약하는 방법
 
HI-ARC Number Theory
HI-ARC Number TheoryHI-ARC Number Theory
HI-ARC Number Theory
 
11. array & pointer
11. array & pointer11. array & pointer
11. array & pointer
 
12 1. multi-dimensional array
12 1. multi-dimensional array12 1. multi-dimensional array
12 1. multi-dimensional array
 
TestSDS2018-1(answer)
TestSDS2018-1(answer)TestSDS2018-1(answer)
TestSDS2018-1(answer)
 
타임리프 폼과 어노테이션.Key
타임리프 폼과 어노테이션.Key타임리프 폼과 어노테이션.Key
타임리프 폼과 어노테이션.Key
 
HI-ARC PS 102 Brute Force
HI-ARC PS 102 Brute ForceHI-ARC PS 102 Brute Force
HI-ARC PS 102 Brute Force
 
HI-ARC PS 101
HI-ARC PS 101HI-ARC PS 101
HI-ARC PS 101
 
R 기본-데이타형 소개
R 기본-데이타형 소개R 기본-데이타형 소개
R 기본-데이타형 소개
 
R 프로그래밍 기본 문법
R 프로그래밍 기본 문법R 프로그래밍 기본 문법
R 프로그래밍 기본 문법
 
2021 2학기 정기 세미나 4주차
2021 2학기 정기 세미나 4주차2021 2학기 정기 세미나 4주차
2021 2학기 정기 세미나 4주차
 
2021 1학기 정기 세미나 6주차
2021 1학기 정기 세미나 6주차2021 1학기 정기 세미나 6주차
2021 1학기 정기 세미나 6주차
 
[D2 CAMPUS] 부산대 Alcall 프로그래밍 경시대회 문제 풀이
[D2 CAMPUS] 부산대 Alcall 프로그래밍 경시대회 문제 풀이[D2 CAMPUS] 부산대 Alcall 프로그래밍 경시대회 문제 풀이
[D2 CAMPUS] 부산대 Alcall 프로그래밍 경시대회 문제 풀이
 
Quaternion and Rotation
Quaternion and RotationQuaternion and Rotation
Quaternion and Rotation
 
알고리즘과 자료구조
알고리즘과 자료구조알고리즘과 자료구조
알고리즘과 자료구조
 

Similar to How to Study Mathematics for ML

파이썬+Operator+이해하기 20160409
파이썬+Operator+이해하기 20160409파이썬+Operator+이해하기 20160409
파이썬+Operator+이해하기 20160409Yong Joon Moon
 
3ds maxscript 튜토리얼_20151206_서진택
3ds maxscript 튜토리얼_20151206_서진택3ds maxscript 튜토리얼_20151206_서진택
3ds maxscript 튜토리얼_20151206_서진택JinTaek Seo
 
프로그래밍 대회: C++11 이야기
프로그래밍 대회: C++11 이야기프로그래밍 대회: C++11 이야기
프로그래밍 대회: C++11 이야기Jongwook Choi
 
DP 알고리즘에 대해 알아보자.pdf
DP 알고리즘에 대해 알아보자.pdfDP 알고리즘에 대해 알아보자.pdf
DP 알고리즘에 대해 알아보자.pdfHo Jeong Im
 
R 프로그램의 이해와 활용 v1.1
R 프로그램의 이해와 활용 v1.1R 프로그램의 이해와 활용 v1.1
R 프로그램의 이해와 활용 v1.1happychallenge
 
파이썬 스터디 2주차
파이썬 스터디 2주차파이썬 스터디 2주차
파이썬 스터디 2주차Han Sung Kim
 
세그먼트 트리 느리게 업데이트하기 - Sogang ICPC Team, 2020 Winter
세그먼트 트리 느리게 업데이트하기 - Sogang ICPC Team, 2020 Winter세그먼트 트리 느리게 업데이트하기 - Sogang ICPC Team, 2020 Winter
세그먼트 트리 느리게 업데이트하기 - Sogang ICPC Team, 2020 WinterSuhyun Park
 
Es2015 Simple Overview
Es2015 Simple OverviewEs2015 Simple Overview
Es2015 Simple OverviewKim Hunmin
 
해커에게 전해들은 머신러닝 #4
해커에게 전해들은 머신러닝 #4해커에게 전해들은 머신러닝 #4
해커에게 전해들은 머신러닝 #4Haesun Park
 
DEVIEW-FULL-감독판.pptx
DEVIEW-FULL-감독판.pptxDEVIEW-FULL-감독판.pptx
DEVIEW-FULL-감독판.pptxhanbeom Park
 
지도 학습, 함수 근사와 최적화 문제: 데이터는 우악하니 데이터 사이언스라도 우아하게
지도 학습, 함수 근사와 최적화 문제: 데이터는 우악하니 데이터 사이언스라도 우아하게지도 학습, 함수 근사와 최적화 문제: 데이터는 우악하니 데이터 사이언스라도 우아하게
지도 학습, 함수 근사와 최적화 문제: 데이터는 우악하니 데이터 사이언스라도 우아하게Young-Geun Choi
 
R 프로그래밍-향상된 데이타 조작
R 프로그래밍-향상된 데이타 조작R 프로그래밍-향상된 데이타 조작
R 프로그래밍-향상된 데이타 조작Terry Cho
 
스칼라와 스파크 영혼의 듀오
스칼라와 스파크 영혼의 듀오스칼라와 스파크 영혼의 듀오
스칼라와 스파크 영혼의 듀오Taeoh Kim
 

Similar to How to Study Mathematics for ML (20)

파이썬+Operator+이해하기 20160409
파이썬+Operator+이해하기 20160409파이썬+Operator+이해하기 20160409
파이썬+Operator+이해하기 20160409
 
3ds maxscript 튜토리얼_20151206_서진택
3ds maxscript 튜토리얼_20151206_서진택3ds maxscript 튜토리얼_20151206_서진택
3ds maxscript 튜토리얼_20151206_서진택
 
함수적 사고 2장
함수적 사고 2장함수적 사고 2장
함수적 사고 2장
 
프로그래밍 대회: C++11 이야기
프로그래밍 대회: C++11 이야기프로그래밍 대회: C++11 이야기
프로그래밍 대회: C++11 이야기
 
DP 알고리즘에 대해 알아보자.pdf
DP 알고리즘에 대해 알아보자.pdfDP 알고리즘에 대해 알아보자.pdf
DP 알고리즘에 대해 알아보자.pdf
 
R 프로그램의 이해와 활용 v1.1
R 프로그램의 이해와 활용 v1.1R 프로그램의 이해와 활용 v1.1
R 프로그램의 이해와 활용 v1.1
 
0207 1 gradient
0207 1 gradient0207 1 gradient
0207 1 gradient
 
파이썬 스터디 2주차
파이썬 스터디 2주차파이썬 스터디 2주차
파이썬 스터디 2주차
 
세그먼트 트리 느리게 업데이트하기 - Sogang ICPC Team, 2020 Winter
세그먼트 트리 느리게 업데이트하기 - Sogang ICPC Team, 2020 Winter세그먼트 트리 느리게 업데이트하기 - Sogang ICPC Team, 2020 Winter
세그먼트 트리 느리게 업데이트하기 - Sogang ICPC Team, 2020 Winter
 
DM_02
DM_02DM_02
DM_02
 
Es2015 Simple Overview
Es2015 Simple OverviewEs2015 Simple Overview
Es2015 Simple Overview
 
Variational AutoEncoder(VAE)
Variational AutoEncoder(VAE)Variational AutoEncoder(VAE)
Variational AutoEncoder(VAE)
 
해커에게 전해들은 머신러닝 #4
해커에게 전해들은 머신러닝 #4해커에게 전해들은 머신러닝 #4
해커에게 전해들은 머신러닝 #4
 
DEVIEW-FULL-감독판.pptx
DEVIEW-FULL-감독판.pptxDEVIEW-FULL-감독판.pptx
DEVIEW-FULL-감독판.pptx
 
지도 학습, 함수 근사와 최적화 문제: 데이터는 우악하니 데이터 사이언스라도 우아하게
지도 학습, 함수 근사와 최적화 문제: 데이터는 우악하니 데이터 사이언스라도 우아하게지도 학습, 함수 근사와 최적화 문제: 데이터는 우악하니 데이터 사이언스라도 우아하게
지도 학습, 함수 근사와 최적화 문제: 데이터는 우악하니 데이터 사이언스라도 우아하게
 
R 프로그래밍-향상된 데이타 조작
R 프로그래밍-향상된 데이타 조작R 프로그래밍-향상된 데이타 조작
R 프로그래밍-향상된 데이타 조작
 
Haskell study 5
Haskell study 5Haskell study 5
Haskell study 5
 
스칼라와 스파크 영혼의 듀오
스칼라와 스파크 영혼의 듀오스칼라와 스파크 영혼의 듀오
스칼라와 스파크 영혼의 듀오
 
7장매크로
7장매크로7장매크로
7장매크로
 
R 시작해보기
R 시작해보기R 시작해보기
R 시작해보기
 

More from Dataya Nolja

Music Data Start to End
Music Data Start to EndMusic Data Start to End
Music Data Start to EndDataya Nolja
 
Find a Leak Time in the Schedule
Find a Leak Time in the ScheduleFind a Leak Time in the Schedule
Find a Leak Time in the ScheduleDataya Nolja
 
A Financial Company Story of Bringing Open Source and ML in
A Financial Company Story of Bringing Open Source and ML inA Financial Company Story of Bringing Open Source and ML in
A Financial Company Story of Bringing Open Source and ML inDataya Nolja
 
Practice, Practice, Practice and do the Dirty Work
Practice, Practice, Practice and do the Dirty WorkPractice, Practice, Practice and do the Dirty Work
Practice, Practice, Practice and do the Dirty WorkDataya Nolja
 
Predicting People Who May Get off at the Next Station
Predicting People Who May Get off at the Next StationPredicting People Who May Get off at the Next Station
Predicting People Who May Get off at the Next StationDataya Nolja
 
Endless Trial-and-Errors for Data Collecting
Endless Trial-and-Errors for Data CollectingEndless Trial-and-Errors for Data Collecting
Endless Trial-and-Errors for Data CollectingDataya Nolja
 
Log Design Case Study
Log Design Case StudyLog Design Case Study
Log Design Case StudyDataya Nolja
 
Let's Play with Data Safely
Let's Play with Data SafelyLet's Play with Data Safely
Let's Play with Data SafelyDataya Nolja
 
Things Data Scientists Should Keep in Mind
Things Data Scientists Should Keep in MindThings Data Scientists Should Keep in Mind
Things Data Scientists Should Keep in MindDataya Nolja
 
Things Happend between JDBC and MySQL
Things Happend between JDBC and MySQLThings Happend between JDBC and MySQL
Things Happend between JDBC and MySQLDataya Nolja
 
Human-Machine Interaction and AI
Human-Machine Interaction and AIHuman-Machine Interaction and AI
Human-Machine Interaction and AIDataya Nolja
 
Julia 0.5 and TensorFlow
Julia 0.5 and TensorFlowJulia 0.5 and TensorFlow
Julia 0.5 and TensorFlowDataya Nolja
 
Zeppelin and Open Source Ecosystem and Silicon Valley
Zeppelin and Open Source Ecosystem and Silicon ValleyZeppelin and Open Source Ecosystem and Silicon Valley
Zeppelin and Open Source Ecosystem and Silicon ValleyDataya Nolja
 
Hadoop 10th Birthday and Hadoop 3 Alpha
Hadoop 10th Birthday and Hadoop 3 AlphaHadoop 10th Birthday and Hadoop 3 Alpha
Hadoop 10th Birthday and Hadoop 3 AlphaDataya Nolja
 
Kakao Bank Powered by Open Sources
Kakao Bank Powered by Open SourcesKakao Bank Powered by Open Sources
Kakao Bank Powered by Open SourcesDataya Nolja
 
Open Source is My Job
Open Source is My JobOpen Source is My Job
Open Source is My JobDataya Nolja
 
Creating Value through Data Analysis
Creating Value through Data AnalysisCreating Value through Data Analysis
Creating Value through Data AnalysisDataya Nolja
 
How to Make Money from Data - Global Cases
How to Make Money from Data - Global CasesHow to Make Money from Data - Global Cases
How to Make Money from Data - Global CasesDataya Nolja
 
Structured Streaming with Apache Spark
Structured Streaming with Apache SparkStructured Streaming with Apache Spark
Structured Streaming with Apache SparkDataya Nolja
 
How to Create Value from Data, and Its Difficulty
How to Create Value from Data, and Its DifficultyHow to Create Value from Data, and Its Difficulty
How to Create Value from Data, and Its DifficultyDataya Nolja
 

More from Dataya Nolja (20)

Music Data Start to End
Music Data Start to EndMusic Data Start to End
Music Data Start to End
 
Find a Leak Time in the Schedule
Find a Leak Time in the ScheduleFind a Leak Time in the Schedule
Find a Leak Time in the Schedule
 
A Financial Company Story of Bringing Open Source and ML in
A Financial Company Story of Bringing Open Source and ML inA Financial Company Story of Bringing Open Source and ML in
A Financial Company Story of Bringing Open Source and ML in
 
Practice, Practice, Practice and do the Dirty Work
Practice, Practice, Practice and do the Dirty WorkPractice, Practice, Practice and do the Dirty Work
Practice, Practice, Practice and do the Dirty Work
 
Predicting People Who May Get off at the Next Station
Predicting People Who May Get off at the Next StationPredicting People Who May Get off at the Next Station
Predicting People Who May Get off at the Next Station
 
Endless Trial-and-Errors for Data Collecting
Endless Trial-and-Errors for Data CollectingEndless Trial-and-Errors for Data Collecting
Endless Trial-and-Errors for Data Collecting
 
Log Design Case Study
Log Design Case StudyLog Design Case Study
Log Design Case Study
 
Let's Play with Data Safely
Let's Play with Data SafelyLet's Play with Data Safely
Let's Play with Data Safely
 
Things Data Scientists Should Keep in Mind
Things Data Scientists Should Keep in MindThings Data Scientists Should Keep in Mind
Things Data Scientists Should Keep in Mind
 
Things Happend between JDBC and MySQL
Things Happend between JDBC and MySQLThings Happend between JDBC and MySQL
Things Happend between JDBC and MySQL
 
Human-Machine Interaction and AI
Human-Machine Interaction and AIHuman-Machine Interaction and AI
Human-Machine Interaction and AI
 
Julia 0.5 and TensorFlow
Julia 0.5 and TensorFlowJulia 0.5 and TensorFlow
Julia 0.5 and TensorFlow
 
Zeppelin and Open Source Ecosystem and Silicon Valley
Zeppelin and Open Source Ecosystem and Silicon ValleyZeppelin and Open Source Ecosystem and Silicon Valley
Zeppelin and Open Source Ecosystem and Silicon Valley
 
Hadoop 10th Birthday and Hadoop 3 Alpha
Hadoop 10th Birthday and Hadoop 3 AlphaHadoop 10th Birthday and Hadoop 3 Alpha
Hadoop 10th Birthday and Hadoop 3 Alpha
 
Kakao Bank Powered by Open Sources
Kakao Bank Powered by Open SourcesKakao Bank Powered by Open Sources
Kakao Bank Powered by Open Sources
 
Open Source is My Job
Open Source is My JobOpen Source is My Job
Open Source is My Job
 
Creating Value through Data Analysis
Creating Value through Data AnalysisCreating Value through Data Analysis
Creating Value through Data Analysis
 
How to Make Money from Data - Global Cases
How to Make Money from Data - Global CasesHow to Make Money from Data - Global Cases
How to Make Money from Data - Global Cases
 
Structured Streaming with Apache Spark
Structured Streaming with Apache SparkStructured Streaming with Apache Spark
Structured Streaming with Apache Spark
 
How to Create Value from Data, and Its Difficulty
How to Create Value from Data, and Its DifficultyHow to Create Value from Data, and Its Difficulty
How to Create Value from Data, and Its Difficulty
 

How to Study Mathematics for ML

  • 1. 머신러닝/딥러닝 학습시 수학 공부법 이 창 신 2017.10.13
  • 2. 예고 프로그래밍을 위한 별도의 수학을 다루기 전에, 이미 배웠던(물론 안배웠거나 오래됐을 수도 있습니다) 수학인 집합, 명제, 함수 등이 프로그래밍에 어떻게 쓰이는지 살펴봅니다. 머신러닝/딥러닝 학습에 나오는 행렬, 미적분과 확률 통계 등은 배운 것과 배울 것이 섞여 있을 수도 있습니다. 앞으로 어떤 수학 공부를 하면 좋을지도 말씀드리고 싶고요. 더불어, 최근 번역 작업과 미국 생활에 대한 얘기도 하려 합니다.
  • 4. 집합의 표현 원소 나열법(extentional definition) A = {1, 2, 3} (1) int [ ] a = {1 , 2 , 3} 조건 제시법(intentional definition) A = {x|1 ≤ x ≤ 3} (2) ?
  • 5. 집합의 관계 원소가 집합에 속한다 1 ∈ A (3) Set<Integer > a = Set . of (1 , 2 , 3) a . c o n t ai n s (1) 부분 집합 B ⊂ A where B = {1, 2} (4) Set<Integer > b = Set . of (1 , 2) a . c o n t a i n s A l l (b)
  • 6. 논리 연산(부울 대수) ∼ (p ∨ q) =∼ p∧ ∼ q (5) int a = 4 int b = 3 ! ( a != 3 && b != 4) a == 3 | | b == 4
  • 7. 함수의 정의 정의역(domain), 공역(codomain), 치역(range) f : X → Y (6) int f u n c t i o n ( S t r i n g x ) { return x . length ( ) ; } f u n c t i o n ( ” t e s t ” )
  • 8. 함수의 유형 단사(injective) x1 = x2 => f (x1) = f (x2) where ∀x1, x2 ∈ X (7) 전사(surjective) f (X) = Y (8) 전단사(bijective)와 역함수(inverse) y = f (x) ⇐⇒ f −1 (y) = x (9) 예) y = f (x) = ax + b ⇒ y − b = ax ⇒ y a − b a = x ⇒ f −1 (x) = x a − b a (10)
  • 9. 역함수 구현 코드 수준에서 double f u n c t i o n ( double x ){ return 2.0 ∗ x + 3 . 0 ; } double i n v e r s e ( double x ){ return x /2.0 − 3 . 0 / 2 . 0 ; } 저장된 값을 바탕으로 Map<Integer , Double> f = Map. of (1 , 2.0 , 2 , 4.0) // . . . Map<Double , Integer > i = Map. of ( 2 .0 , 1 , 4.0 , 2)
  • 10. 편미분(partial derivative) 다변수 함수에서 한변수로만 미분 https://www.youtube.com/watch?v=oZyvmtqLmLo&feature= youtu.be f (x, y) = x + 2y ⇒ ∂f ∂x = ∂x ∂x + ∂2y ∂x = 1 + 0 = 1 ∂f ∂y = ∂x ∂y + ∂2y ∂y = 0 + 2 = 2 (11)
  • 11. 연쇄 미분(합성 함수 미분) https://docs.google.com/presentation/d/ 1CF-vEPzMSkVKnePO__AewGfzmui2aGMr8HhI9diD2t8/edit# slide=id.g27be483e1c_0_42 (10쪽) h = g · f ⇒ h(x) = (g · f )(x) = g(f (x)) ⇒ ∂h ∂x = ∂g ∂f ∂f ∂x (12) 예) f (x, y, w) = (xw − y)2 일 때 xw − y = t 라 하면 f (t) = t2 ∂f ∂w = ∂f ∂t ∂t ∂w = ∂t2 ∂t ∂(xw − y) ∂w = 2tx = 2(xw − y)x (13)
  • 12. 벡터 벡터: 수를 1차원(직선)으로 나열한 것 v = (1, 2) (14) 벡터 공간: 벡터의 기본 연산(합과 정수배)이 정의된 공간, 선형 공간 x + y = (x1, x2) + (y1, y2) = (x1 + x2, y1 + y2) (15) cx = c(x1, x2) = (cx1, cx2) (16) 벡터 공간의 차원: 기저 벡터의 개수(좌표 성분의 개수)
  • 13. 행렬 행렬: 수를 2차원(직사각형)으로 나열한 것 a11 a12 a21 a22 (17) 행렬의 곱셈: a11 a12 a21 a22 b11 b12 b21 b22 = a11b11 + a12b21 a11b12 + a12b22 a21b11 + a22b21 a21b12 + a22b22 (18) 행렬은 사상(寫像, mapping)이다. f (x) = Ax = y (19) a11 a12 a21 a22 x1 x2 = a11x1 + a12x2 a21x1 + a22x2 = y1 y2 (20)
  • 14. 학습법 복습: 정석, 선형대수, 공업수학, 확률통계, 미적분, ... 따라 쓰기
  • 15. LATEX TeX Live: MacTeX 한글: kotex 패키지 사용