pytorch起飞

This commit is contained in:
yinkanglong_lab
2021-03-22 23:35:27 +08:00
parent bc7951671d
commit 43c5a01e20
269 changed files with 25968 additions and 23 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,82 @@
{
"metadata": {
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.0-final"
},
"orig_nbformat": 2,
"kernelspec": {
"name": "python3",
"display_name": "Python 3.8.0 64-bit",
"metadata": {
"interpreter": {
"hash": "38740d3277777e2cd7c6c2cc9d8addf5118fdf3f82b1b39231fd12aeac8aee8b"
}
}
}
},
"nbformat": 4,
"nbformat_minor": 2,
"cells": [
{
"source": [
"## 5.1 K-fold交叉验证"
],
"cell_type": "markdown",
"metadata": {}
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"# 创建数据集\n",
"N =1000\n",
"holdout = 200\n",
"from sklearn.datasets import make_regression\n",
"X,y = make_regression(1000,shuffle=True)\n",
"\n",
"# 分割数据集的第二种方法。\n",
"X_h,y_h = X[:holdout],y[:holdout]\n",
"X_t,y_t = X[holdout:],y[holdout:]\n",
"\n",
"# 方法的接口变了\n",
"from sklearn.model_selection import KFold\n",
"\n",
"kfold = KFold(n_splits=4)\n",
"\n",
"\n"
]
},
{
"source": [
"## 5.8 回归模型评估"
],
"cell_type": "markdown",
"metadata": {}
},
{
"source": [
"## 5.9 特征选取"
],
"cell_type": "markdown",
"metadata": {}
},
{
"source": [
"## 5.11 使用joblib保存模型"
],
"cell_type": "markdown",
"metadata": {}
}
]
}