Skip to content

Commit e5743f6

Browse files
committed
up
1 parent 1383c5d commit e5743f6

2 files changed

Lines changed: 305 additions & 342 deletions

File tree

end2end_ml_project.ipynb

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2414,8 +2414,8 @@
24142414
"param_grid = [\n",
24152415
" {'preprocessing__geo__n_clusters': [5, 8, 10],\n",
24162416
" 'random_forest__max_features': [4, 6, 8]},\n",
2417-
" {'preprocessing__geo__n_clusters': [10, 15],\n",
2418-
" 'random_forest__max_features': [6, 8, 10]},\n",
2417+
" {'preprocessing__geo__n_clusters': [12, 15],\n",
2418+
" 'random_forest__max_features': [8, 10, 12]},\n",
24192419
"]\n",
24202420
"\n",
24212421
"# 교차 검증 활용 모델 훈련\n",
@@ -2768,7 +2768,8 @@
27682768
"source": [
27692769
"특성 중요도는 전처리 변환기와 아무 상관이 없으며, 랜덤 포레스트 모델 등 일부 모델에서만 훈련중에 함께 저장된다.\n",
27702770
"\n",
2771-
"아래 코드는 `final_model`에서 랜덤 포레스트 모델의 이름이 `\"random_forest\"`로 지정되었기에 해당 이름을 이용하여 인덱싱 한 다음에 특성 중요도를 확인한다."
2771+
"아래 코드는 `final_model`에서 랜덤 포레스트 모델의 이름이 `\"random_forest\"`로 지정되었기에 해당 이름을 이용하여 인덱싱을 적용한 다음에 특성 중요도가 높은 순서대로 나열한다.\n",
2772+
"예상대로 중위소득 로그값, 즉 중위소득의 중요도가 0.188 정도로 압도적으로 높게 계산되었다."
27722773
]
27732774
},
27742775
{
@@ -2777,7 +2778,20 @@
27772778
"source": [
27782779
"```python\n",
27792780
"final_model[\"random_forest\"].feature_importances_\n",
2780-
"```"
2781+
"---\n",
2782+
"```\n",
2783+
"| 특성 | 중요도 |\n",
2784+
"| :--- | :---|\n",
2785+
"| `log__median_income` | 0.18836603202647126 |\n",
2786+
"| `cat__ocean_proximity_INLAND` | 0.07795960969938898 |\n",
2787+
"| `bedrooms__ratio` | 0.06110388595864347 |\n",
2788+
"| `rooms_per_house__ratio` | 0.05772194900488602 |\n",
2789+
"| `people_per_house__ratio` | 0.04569274355282605 |\n",
2790+
"| `geo__Cluster 30 similarity` | 0.041977095119231075 |\n",
2791+
"| `geo__Cluster 9 similarity` | 0.024893290428216707 |\n",
2792+
"| `geo__Cluster 36 similarity` | 0.02349145973584661 |\n",
2793+
"| `geo__Cluster 18 similarity` | 0.021384735075780065 |\n",
2794+
"| `geo__Cluster 3 similarity` | 0.019231937253583756 |"
27812795
]
27822796
},
27832797
{

0 commit comments

Comments
 (0)