250x250
Link
๋์ GitHub Contribution ๊ทธ๋ํ
Loading data ...
Notice
Recent Posts
Recent Comments
์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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
- DBSCAN
- Python
- ํ์ด์ฌ
- numpy
- LDA
- t-test
- ๋น ๋ฐ์ดํฐ
- ๊ตฐ์งํ
- ๋ฐ์ดํฐ๋ถ์์ค์ ๋ฌธ๊ฐ
- pandas
- ๋ฐ์ดํฐ๋ถ๊ท ํ
- Lambda
- ํฌ๋กค๋ง
- ๋์ํ๋ณธ
- opencv
- ์ธ๋์ํ๋ง
- PCA
- ADsP
- ๋ ๋ฆฝํ๋ณธ
- ๋น ๋ฐ์ดํฐ๋ถ์๊ธฐ์ฌ
- ๋ฐ์ดํฐ๋ถ์
- ADP
- dataframe
- iloc
- ์ฃผ์ฑ๋ถ๋ถ์
- ๋ฐ์ดํฐ๋ถ์์ ๋ฌธ๊ฐ
- ์๋ํด๋ผ์ฐ๋
- ํ ์คํธ๋ถ์
- ์ค๋ฒ์ํ๋ง
- datascience
Archives
Data Science LAB
[Python] Mac Graphviz ์ค์น ๋ณธ๋ฌธ
728x90
์์ฌ๊ฒฐ์ ๋๋ฌด๋ฅผ ์๊ฐํํ๊ธฐ ์ํ ํจํค์ง์ธ Graphviz ์ค์น ๋ฐฉ๋ฒ
Homebrew ์ค์น
2022.09.15 - [Python] Mac์์ tesseract ์ค์นํ๊ธฐ ๋ฐ ํ๊ธ ์ถ๊ฐ
์ฌ๊ธฐ ์๋ถ๋ถ ์ฐธ๊ณ
ํฐ๋ฏธ๋์์ graphviz ํจํค์ง ์ถ๊ฐ
brew install graphviz
pip ์ค์น
pip install graphviz
from sklearn.tree import export_graphviz
export_graphviz(dt_clf, out_file = 'tree.dot', class_names=iris_data.target_names,
feature_names=iris_data.feature_names, impurity=True, filled=True)
tree.dot๋ผ๋ ์ด๋ฆ์ผ๋ก ์๊ฐํ ํ์ผ ์์ฑ
์๊ฐํ ํ์ผ ํ์ธ
import graphviz
with open('tree.dot') as f:
dot_graph = f.read()
graphviz.Source(dot_graph)
728x90
Comments