01. 구글 코랩 (Google Colab)
02. Numpy
- Numpy
- 파이썬에서 제공하는 머신너닝 / 딥러닝 패키지
- colab에 기본 탑재되어 있음
import numpy as np
print(np.__version__)
03. Numpy 예제
- Numpy를 이용하여 임의의 데이터를 생성
- 맽트플롯립으로 시각화 처리
import numpy as np
from matplotlib import pyplot as plt
ys = 200 + np.random.randn(100)
x = [x for x in range(len(ys))]
plt.plot(x, ys, '-')
plt.fill_between(x, ys, 195, where=(ys > 195), facecolor='g', alpha=0.6)
plt.title("Sample Visualization")
plt.show()
import numpy as np
from matplotlib import pyplot as plt
plt.plot([1, 2, 3, 4, 5], [1, 4, 9, 16, 25])
plt.show()
import numpy as np
from matplotlib import pyplot as plt
plt.scatter([1, 2, 3, 4, 5], [1, 4, 9, 16, 25])
plt.show()
import numpy as np
from matplotlib import pyplot as plt
x = np.random.randn(1000)
y = np.random.randn(1000)
plt.scatter(x, y)
plt.show()