반응형
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 | 31 |
Tags
- 재귀함수
- 결합전문기관
- discrete_scatter
- web 용어
- web 사진
- vscode
- 머신러닝
- postorder
- 대이터
- inorder
- paragraph
- broscoding
- mglearn
- CES 2O21 참가
- web 개발
- 웹 용어
- pycharm
- 데이터전문기관
- CES 2O21 참여
- bccard
- web
- C언어
- cudnn
- KNeighborsClassifier
- html
- tensorflow
- classification
- Keras
- 자료구조
- java역사
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
머신러닝.RandomForestClassifier.기초
import numpy as np import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from sklearn.datasets import load_breast_cancer cancer=load_breast_cancer() X_train,X_test,y_t..
broscoding.tistory.com
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