Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
aksjfds committed Feb 11, 2024
1 parent 1c9a7f6 commit de1cf6a
Show file tree
Hide file tree
Showing 2 changed files with 1,981 additions and 12 deletions.
9 changes: 5 additions & 4 deletions 端到端的机器学习项目/housing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1489,10 +1489,10 @@
"source": [
"# 保存模型\n",
"\n",
"# import joblib\n",
"# joblib.dump(my_model, \"my_model.pkl\")\n",
"# # and later...\n",
"# my_model_loaded = joblib.load(\"my_model.pkl\")"
"import joblib\n",
"joblib.dump(my_model, \"my_model.pkl\")\n",
"# and later...\n",
"my_model_loaded = joblib.load(\"my_model.pkl\")"
]
},
{
Expand Down Expand Up @@ -1594,6 +1594,7 @@
"extra_attribs = [\"rooms_per_hhold\", \"pop_per_hhold\", \"bedrooms_per_room\"]\n",
"cat_encoder = full_pipeline.named_transformers_[\"cat\"]\n",
"cat_one_hot_attribs = list(cat_encoder.categories_[0])\n",
"\n",
"attributes = num_attribs + extra_attribs + cat_one_hot_attribs\n",
"sorted(zip(feature_importances, attributes), reverse=True)\n",
"\n",
Expand Down
1,984 changes: 1,976 additions & 8 deletions 训练模型/study.ipynb

Large diffs are not rendered by default.

0 comments on commit de1cf6a

Please sign in to comment.