| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- paragraph
- pycharm
- 데이터전문기관
- web 용어
- cudnn
- 결합전문기관
- 대이터
- postorder
- web
- tensorflow
- CES 2O21 참가
- web 사진
- broscoding
- bccard
- java역사
- CES 2O21 참여
- Keras
- html
- 웹 용어
- C언어
- inorder
- vscode
- web 개발
- KNeighborsClassifier
- mglearn
- classification
- discrete_scatter
- 자료구조
- 머신러닝
- 재귀함수
- Today
- Total
목록전체 글 (690)
bro's coding
from mpl_toolkits.mplot3d import Axes3D fig = plt.figure(figsize=[10,8]) ax = Axes3D(fig) a = np.arange(-4,12,0.2) b = np.arange(-4,12,0.2) xx, yy = np.meshgrid(a,b) ax.plot_surface(xx, yy, model.coef_[0,0]*xx + model.coef_[0,1]*yy + model.intercept_[0], shade=True, alpha=0.1, color='b') ax.plot_wireframe(xx, yy, model.coef_[0,0]*xx + model.coef_[0,1]*yy + model.intercept_[0], rstride=2, cstride..
https://broscoding.tistory.com/114 머신러닝.iris data 불러오기 import numpy as np import matplotlib.pyplot as plt from sklearn.datasets import load_iris iris=load_iris() iris dir(iris) ['DESCR', 'data', 'feature_names', 'target', 'target_names'] iris.data.shape.. broscoding.tistory.com https://broscoding.tistory.com/115 머신러닝.테스트데이터 뽑기 from sklearn.model_selection import train_test_split X_train,X_test,y..
https://broscoding.tistory.com/114 머신러닝.iris data 불러오기 import numpy as np import matplotlib.pyplot as plt from sklearn.datasets import load_iris iris=load_iris() iris dir(iris) ['DESCR', 'data', 'feature_names', 'target', 'target_names'] iris.data.shape.. broscoding.tistory.com https://broscoding.tistory.com/115 머신러닝.테스트데이터 뽑기 from sklearn.model_selection import train_test_split X_train,X_test,y..
https://broscoding.tistory.com/132 머신러닝.linear_model.LogisticRegression(Class=3) https://broscoding.tistory.com/128 머신러닝.datasets .make_blobs 사용하기 from sklearn.datasets import make_blobs X,y=make_blobs(400,2,[[0,0],[5,5]],[2,3]) # 400 : 행의 갯수 # 2 : 속성의 갯수 2개(축.. broscoding.tistory.com C가 커질 수록 과적합 된다 C가 커질수록 세밀하게 나눠준다 1/C=a c:(cost,lose,penalty) for j in range(-5,5): from sklearn.linear_model im..
https://broscoding.tistory.com/128 머신러닝.datasets .make_blobs 사용하기 from sklearn.datasets import make_blobs X,y=make_blobs(400,2,[[0,0],[5,5]],[2,3]) # 400 : 행의 갯수 # 2 : 속성의 갯수 2개(축)(전부 X값임) # 중심점의 위치 # 각 중심점에 대한 편차 2, 3 plt.scatter(X[:.. broscoding.tistory.com # data 준비 from sklearn.datasets import make_blobs X,y=make_blobs(300,2,[[0,0],[-10,10],[10,10]],[2,3,5]) # model 훈련 from sklearn.linear_mo..
https://broscoding.tistory.com/129 머신러닝.linear_model.LogisticRegression(로지스틱 회귀) import numpy as np import matplotlib.pyplot as plt # data 준비 from sklearn.datasets import make_blobs X,y=make_blobs(400,2,[[0,0],[5,5]],[2,3]) https://broscoding.tistory.com/128 머신러닝.datasets.. broscoding.tistory.com # predict_proba() # proba = probablity(확률) # 0일 확률 1일 확률 표시 np.round(model.predict_proba(X)[:10],2) ..
def sigmoid(x): return 1/(1+np.exp(-x)) xxx=np.arange(-15,15,0.01) yyy=sigmoid(xxx) plt.plot(xxx,yyy) yyy=sigmoid(xxx*0.5) plt.plot(xxx,yyy) yyy=sigmoid(xxx*10) plt.plot(xxx,yyy) lim(x->inf) =1 lim(x->-inf)=0 lim(x->+-0)=0.5 확률 값을 계산 할 때 사용 신경망에서 가장 중요한 함수 함수의 성격이 매우 중요 p86
import numpy as np import matplotlib.pyplot as plt # data 준비 from sklearn.datasets import make_blobs X,y=make_blobs(400,2,[[0,0],[5,5]],[2,3]) https://broscoding.tistory.com/128 머신러닝.datasets .make_blobs 사용하기 from sklearn.datasets import make_blobs X,y=make_blobs(400,2,[[0,0],[5,5]],[2,3]) # 400 : 행의 갯수 # 2 : 속성의 갯수 2개(축)(전부 X값임) # 중심점의 위치 # 각 중심점에 대한 편차 2, 3 plt.scatter(X[:.. broscoding.tistory..
from sklearn.datasets import make_blobs X,y=make_blobs(400,2,[[0,0],[5,5]],[2,3]) # 400 : 행의 갯수 # 2 : 속성의 갯수 2개(축)(전부 X값임) # 중심점의 위치 # 각 중심점에 대한 편차 2, 3 plt.scatter(X[:,0],X[:,1],c=y,s=60,alpha=0.3) plt.colorbar()
# 와인의 속성을 사용해서 점수 예측 import numpy as np import matplotlib.pyplot as plt wine=np.loadtxt('winequality-red.csv',skiprows=1,delimiter=';') # x=전체 속성값 X=wine[:,:-1] # y=와인 등급 y=wine[:,-1] # lienar regression from sklearn.linear_model import LinearRegression model=LinearRegression() model.fit(X,y) #result w=model.coef_ b=model.intercept_ print('w=',w) print('b=',b) ''' w= [ 2.49905527e-02 -1.08359026..