반응형
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 |
Tags
- cudnn
- broscoding
- classification
- 웹 용어
- web
- web 용어
- web 사진
- tensorflow
- postorder
- 결합전문기관
- web 개발
- mglearn
- pycharm
- html
- inorder
- discrete_scatter
- C언어
- 대이터
- 머신러닝
- 자료구조
- vscode
- paragraph
- 재귀함수
- Keras
- KNeighborsClassifier
- CES 2O21 참여
- java역사
- 데이터전문기관
- CES 2O21 참가
- bccard
Archives
- Today
- Total
bro's coding
sklearn.RandomForestClassifier.feature_importances_(중요도 표현) 본문
[AI]/python.sklearn
sklearn.RandomForestClassifier.feature_importances_(중요도 표현)
givemebro 2020. 4. 20. 15:03반응형
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
model = RandomForestClassifier(n_estimators=100, max_depth=5) # default is 10
model.fit(cancer.data, cancer.target)
# 랜덤 포레스트 모델 생성시 가장 중요하게 영향을 끼친 속성
weight = model.feature_importances_
plt.figure(figsize=[10,10])
plt.barh(range(30),weight)
plt.yticks(range(30),['%s(%d)' % (s,i) for i,s in enumerate(cancer.feature_names)],va='bottom')
print('')
반응형
'[AI] > python.sklearn' 카테고리의 다른 글
sklearn.cluster.DBSCAN (0) | 2020.04.21 |
---|---|
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.ensemble.RandomForestClassifier.2 feature for visualization (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 |
Comments