일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Keras
- 대이터
- html
- tensorflow
- web 사진
- 웹 용어
- 데이터전문기관
- web 개발
- cudnn
- discrete_scatter
- CES 2O21 참가
- C언어
- classification
- 재귀함수
- 자료구조
- inorder
- CES 2O21 참여
- mglearn
- postorder
- bccard
- web 용어
- pycharm
- 머신러닝
- vscode
- 결합전문기관
- web
- KNeighborsClassifier
- paragraph
- java역사
- broscoding
- Today
- Total
목록[AI] (189)
bro's coding
import numpy as np import matplotlib.pyplot as plt #data 준비 from sklearn.datasets import load_breast_cancer cancer=load_breast_cancer() col1=0 col2=3 X=cancer.data[:,col1] y=cancer.data[:,col2] corr=((X-X.mean())*(y-y.mean())).mean()/(X.std()*y.std()) # 0.9873571700566123 np.corrcoef(X.T,y) # array([[1. , 0.98735717], [0.98735717, 1. ]]) from sklearn.linear_model import LinearRegression X=cancer..
(=pearson's r) np.corrcoef(cancer.data[:,0],cancer.data[:,22]) array([[1. , 0.96513651], # 나:나 나:너 [0.96513651, 1. ]])# 너:나 나:나 plt.imshow(np.corrcoef(cancer.data.T)) plt.colorbar() # 노랗거나 까만 색이 유의미한 데이터
iris=load_iris() X=iris.data y=iris.target X_train,X_test,y_train,y_test=train_test_split(X,y,test_size=0.2) model=LinearSVC(C=1) model.fit(X_train,y_train) pred_y=model.predict(X_test) model.score(X_test,y_test) model.decision_function(X_test) guideline과 나의 거리 양수면 내 쪽에 속한것 array([[-6.58398872e-01, -1.41247905e-01, -2.21407969e+00], [ 1.91618644e+00, -1.16266051e+00, -8.10343365e+00], [ 1.078043..
보호되어 있는 글입니다.
구분선을 긋고 선과 가장 가까운 점들을 찾는다. 그 점을 support vector 라고 한다. import numpy as np import pandas as pd import matplotlib.pyplot as plt # data 준비 from sklearn.datasets import load_iris iris=load_iris() from sklearn.model_selection import train_test_split col1=0 col2=1 X=iris.data[:,[col1,col2]] y=iris.target y[y==2]=1 from sklearn.model_selection import train_test_split X_train,X_test,y_train,y_test=train_..
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..