일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
- vscode
- postorder
- CES 2O21 참여
- web
- 데이터전문기관
- inorder
- web 개발
- paragraph
- KNeighborsClassifier
- java역사
- html
- pycharm
- web 용어
- 대이터
- discrete_scatter
- broscoding
- 재귀함수
- tensorflow
- C언어
- bccard
- cudnn
- classification
- 자료구조
- 머신러닝
- mglearn
- web 사진
- 결합전문기관
- CES 2O21 참가
- Keras
- 웹 용어
- Today
- Total
목록[IT] (431)
bro's coding

import matplotlib.pyplot as plt img=plt.imread('제목 없음.png') plt.imshow(img.mean(axis=2),cmap='gray',vmin=0,vmax=1) plt.colorbar()
a = np.ones([4,3]) a ''' array([[1., 1., 1.], [1., 1., 1.], [1., 1., 1.], [1., 1., 1.]]) ''' a+[1,2,3] ''' [2,3,4] [2,3,4] [2,3,4] [2,3,4] ''' https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html Broadcasting — NumPy v1.17 Manual Broadcasting Note See this article for illustrations of broadcasting concepts. The term broadcasting describes how numpy treats arrays with different shapes d..
a = np.arange(12).reshape(4,3) a ''' array([[ 0, 1, 2], [ 3, 4, 5], [ 6, 7, 8], [ 9, 10, 11]]) ''' 1/a ''' array([[ inf, 1. , 0.5 ], [0.33333333, 0.25 , 0.2 ], [0.16666667, 0.14285714, 0.125 ], [0.11111111, 0.1 , 0.09090909]]) '''
import numpy as np a = np.array([1,2,3,4,5]) a+1 [2,3,4,5,6] a*4 [4,8,12,16,20]
import numpy as np iris_labels = ['Iris-setosa', 'Iris-versicolor', 'Iris-virginica'] iris = np.loadtxt('iris.csv', skiprows=1, delimiter=',', converters={4: lambda s: iris_labels.index(s.decode())}) # iris = np.loadtxt('iris.csv', skiprows=1, delimiter=',', # converters={4: lambda s: labels.index(s)}, encoding='utf-8') # latin1, ascii, utf-8, cp949

plt.subplot(2,2,1) plt.title('SepalLength') plt.hist(iris[:,0],bins=30) plt.subplot(2,2,2) plt.title('SepalWidth') plt.hist(iris[:,1], bins=30) plt.subplot(2,2,3) plt.title('PetalLength') plt.hist(iris[:,2],bins=30) plt.subplot(2,2,4) plt.title('PetalWidth') plt.hist(iris[:,3],bins=30)

plt.plot(iris[:50,:4].T,'r-',alpha=0.1) plt.plot(iris[50:100,:4].T,'g-',alpha=0.1) plt.plot(iris[100:150,:4].T,'b-',alpha=0.1) pass plt.plot(iris) plt.legend(iris_pd.columns)

import matplotlib.pyplot as plt plt.scatter(iris[:,2],iris[:,3],c=iris[:,4],s=iris[:,1]+100,alpha=0.2) #우측에 bar표시 plt.colorbar() plt.title('SepalLength Vs SepalWidth') plt.xlabel('SepalLength') plt.ylabel('SepalWidth')