반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- pycharm
- 대이터
- vscode
- CES 2O21 참여
- 머신러닝
- postorder
- web 용어
- bccard
- cudnn
- web
- CES 2O21 참가
- web 개발
- inorder
- mglearn
- paragraph
- C언어
- discrete_scatter
- classification
- tensorflow
- 데이터전문기관
- 웹 용어
- html
- 재귀함수
- KNeighborsClassifier
- 자료구조
- 결합전문기관
- broscoding
- java역사
- web 사진
- Keras
Archives
- Today
- Total
bro's coding
sklearn.ensemble.RandomForestClassifier.2 feature for visualization 본문
[AI]/python.sklearn
sklearn.ensemble.RandomForestClassifier.2 feature for visualization
givemebro 2020. 4. 20. 15:01반응형
https://broscoding.tistory.com/160
X=cancer.data[:,[0,1]]
y=cancer.target
X_train,X_test,y_train,y_test=train_test_split(X,y)
model=RandomForestClassifier(n_estimators=100,max_features='auto')
model.fit(X_train,y_train)
import mglearn
plt.figure(figsize=[12,10])
mglearn.plots.plot_2d_classification(model,X)
mglearn.discrete_scatter(X[:,0],X[:,1],y,alpha=0.3)
plt.figure(figsize=[12,10])
for i in range(5):
plt.subplot(2,3,i+1)
mglearn.plots.plot_tree_partition(X,y,model.estimators_[i])
plt.subplot(2,3,6)
mglearn.plots.plot_2d_classification(model,X)
mglearn.discrete_scatter(X[:,0],X[:,1],y,alpha=0.3)
반응형
'[AI] > python.sklearn' 카테고리의 다른 글
sklearn.datasets.make_moons (0) | 2020.04.21 |
---|---|
sklearn.cluster.KMeans.basic (0) | 2020.04.21 |
sklearn.preprocessing.MinMaxScaler, StandardScaler, Normalizer (0) | 2020.04.20 |
sklearn.RandomForestClassifier.feature_importances_(중요도 표현) (0) | 2020.04.20 |
sklearn.ensemble.RandomForestClassifier.basic (0) | 2020.04.20 |
sklearn.install graphviz (0) | 2020.04.20 |
sklearn.tree.DecisionTreeClassifier.max_depth 변화 관찰 (0) | 2020.04.20 |
sklearn.non-linear regression(비선형회귀) (0) | 2020.04.19 |
Comments