22
2019 Spring | Atmosphere-Ocean Interaction ATM 2106 TA Class Department of Atmospheric Sciences, Yonsei University Air-Sea Modeling Laboratory May 22, 2019

ATM 2106 TA Class - GitHub Pages · 2019-06-05 · 19 Practice of Homework #3 위의 방법중 하나를 사용해서 HW#3에 접근해보자 • meshgrid 1D 변수를 2D 변수로

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ATM 2106 TA Class - GitHub Pages · 2019-06-05 · 19 Practice of Homework #3 위의 방법중 하나를 사용해서 HW#3에 접근해보자 • meshgrid 1D 변수를 2D 변수로

2019 Spring | Atmosphere-Ocean Interaction

ATM 2106 TA Class

Department of Atmospheric Sciences, Yonsei UniversityAir-Sea Modeling Laboratory

May 22, 2019

Page 2: ATM 2106 TA Class - GitHub Pages · 2019-06-05 · 19 Practice of Homework #3 위의 방법중 하나를 사용해서 HW#3에 접근해보자 • meshgrid 1D 변수를 2D 변수로

2

Review

Last time

• Midterm review

Today

• Ocean circulation• Linear Regression Analysis

1) using np.polyfit2) using sklearn library3) using matrix method

• Practice of Homework #3

Page 3: ATM 2106 TA Class - GitHub Pages · 2019-06-05 · 19 Practice of Homework #3 위의 방법중 하나를 사용해서 HW#3에 접근해보자 • meshgrid 1D 변수를 2D 변수로

3

Linear Regression Analysis

- Simple Example - Latent heat of condensation

Page 4: ATM 2106 TA Class - GitHub Pages · 2019-06-05 · 19 Practice of Homework #3 위의 방법중 하나를 사용해서 HW#3에 접근해보자 • meshgrid 1D 변수를 2D 변수로

4

- Simple Example - Latent heat

• 1) np.polyfit

Linear Regression Analysis

Page 5: ATM 2106 TA Class - GitHub Pages · 2019-06-05 · 19 Practice of Homework #3 위의 방법중 하나를 사용해서 HW#3에 접근해보자 • meshgrid 1D 변수를 2D 변수로

5

• 1) np.polyfitLinear Regression Analysis

Page 6: ATM 2106 TA Class - GitHub Pages · 2019-06-05 · 19 Practice of Homework #3 위의 방법중 하나를 사용해서 HW#3에 접근해보자 • meshgrid 1D 변수를 2D 변수로

6

• 1) np.polyfitLinear Regression Analysis

Page 7: ATM 2106 TA Class - GitHub Pages · 2019-06-05 · 19 Practice of Homework #3 위의 방법중 하나를 사용해서 HW#3에 접근해보자 • meshgrid 1D 변수를 2D 변수로

7

• 1) np.polyfitLinear Regression Analysis

Page 8: ATM 2106 TA Class - GitHub Pages · 2019-06-05 · 19 Practice of Homework #3 위의 방법중 하나를 사용해서 HW#3에 접근해보자 • meshgrid 1D 변수를 2D 변수로

8

• 1) np.polyfitLinear Regression Analysis

Page 9: ATM 2106 TA Class - GitHub Pages · 2019-06-05 · 19 Practice of Homework #3 위의 방법중 하나를 사용해서 HW#3에 접근해보자 • meshgrid 1D 변수를 2D 변수로

9

• 2) Using sklearn libraryLinear Regression Analysis

Page 10: ATM 2106 TA Class - GitHub Pages · 2019-06-05 · 19 Practice of Homework #3 위의 방법중 하나를 사용해서 HW#3에 접근해보자 • meshgrid 1D 변수를 2D 변수로

10

• 2) Using sklearn libraryLinear Regression Analysis

Page 11: ATM 2106 TA Class - GitHub Pages · 2019-06-05 · 19 Practice of Homework #3 위의 방법중 하나를 사용해서 HW#3에 접근해보자 • meshgrid 1D 변수를 2D 변수로

11

• 2) Using sklearn libraryLinear Regression Analysis

Page 12: ATM 2106 TA Class - GitHub Pages · 2019-06-05 · 19 Practice of Homework #3 위의 방법중 하나를 사용해서 HW#3에 접근해보자 • meshgrid 1D 변수를 2D 변수로

12

• 2) Using sklearn libraryLinear Regression Analysis

Page 13: ATM 2106 TA Class - GitHub Pages · 2019-06-05 · 19 Practice of Homework #3 위의 방법중 하나를 사용해서 HW#3에 접근해보자 • meshgrid 1D 변수를 2D 변수로

13

• 3) using matrix methodLinear Regression Analysis

Page 14: ATM 2106 TA Class - GitHub Pages · 2019-06-05 · 19 Practice of Homework #3 위의 방법중 하나를 사용해서 HW#3에 접근해보자 • meshgrid 1D 변수를 2D 변수로

14

• theta를 구할 때 사용한 식 설명Linear Regression Analysis

Page 15: ATM 2106 TA Class - GitHub Pages · 2019-06-05 · 19 Practice of Homework #3 위의 방법중 하나를 사용해서 HW#3에 접근해보자 • meshgrid 1D 변수를 2D 변수로

15

Linear Regression Analysis• theta를 구할 때 사용한 식 설명

Page 16: ATM 2106 TA Class - GitHub Pages · 2019-06-05 · 19 Practice of Homework #3 위의 방법중 하나를 사용해서 HW#3에 접근해보자 • meshgrid 1D 변수를 2D 변수로

16

Linear Regression Analysis• theta를 구할 때 사용한 식 설명

Page 17: ATM 2106 TA Class - GitHub Pages · 2019-06-05 · 19 Practice of Homework #3 위의 방법중 하나를 사용해서 HW#3에 접근해보자 • meshgrid 1D 변수를 2D 변수로

17

• 3) using matrix methodLinear Regression Analysis

Page 18: ATM 2106 TA Class - GitHub Pages · 2019-06-05 · 19 Practice of Homework #3 위의 방법중 하나를 사용해서 HW#3에 접근해보자 • meshgrid 1D 변수를 2D 변수로

18

• 3) using matrix methodLinear Regression Analysis

Page 19: ATM 2106 TA Class - GitHub Pages · 2019-06-05 · 19 Practice of Homework #3 위의 방법중 하나를 사용해서 HW#3에 접근해보자 • meshgrid 1D 변수를 2D 변수로

19

Practice of Homework #3

위의 방법중 하나를 사용해서 HW#3에 접근해보자

• meshgrid1D 변수를 2D 변수로 바꾸어줌[X,Y]=np.meshgrid(lon,lat)

• pcolormesh

그림 그리는 방법 설명 (2D 변수 그리기)plt.plot(X, variable[1D]) plt.pcolormesh(X,Y, variable[2D])

• 2D 배열 유의하기!

Page 20: ATM 2106 TA Class - GitHub Pages · 2019-06-05 · 19 Practice of Homework #3 위의 방법중 하나를 사용해서 HW#3에 접근해보자 • meshgrid 1D 변수를 2D 변수로

20

Practice of Homework #3

Plot 2D graph example) : 예시 파일 HW#3 결과와는 관련없음

Page 21: ATM 2106 TA Class - GitHub Pages · 2019-06-05 · 19 Practice of Homework #3 위의 방법중 하나를 사용해서 HW#3에 접근해보자 • meshgrid 1D 변수를 2D 변수로

21

Practice of Homework #3반복문 for문 example) : 예시 파일 HW#3 결과와는 관련없음

Page 22: ATM 2106 TA Class - GitHub Pages · 2019-06-05 · 19 Practice of Homework #3 위의 방법중 하나를 사용해서 HW#3에 접근해보자 • meshgrid 1D 변수를 2D 변수로

Thank You- End of the Document -