Update all notebooks assuming we are all in the future now: sklearn 0.20+, python 3.5+, TF 2.0 preview

This commit is contained in:
Aurélien Geron
2019-01-18 23:08:37 +08:00
parent 10c432a997
commit 6b8dff91d0
12 changed files with 1186 additions and 2625 deletions

View File

@@ -1573,7 +1573,7 @@
"metadata": {},
"outputs": [],
"source": [
"log_reg = LogisticRegression(multi_class=\"ovr\", solver=\"liblinear\", random_state=42)\n",
"log_reg = LogisticRegression(multi_class=\"ovr\", solver=\"lbfgs\", random_state=42)\n",
"log_reg.fit(X_train, y_train)"
]
},
@@ -1610,7 +1610,7 @@
"source": [
"pipeline = Pipeline([\n",
" (\"kmeans\", KMeans(n_clusters=50, random_state=42)),\n",
" (\"log_reg\", LogisticRegression(multi_class=\"ovr\", solver=\"liblinear\", random_state=42)),\n",
" (\"log_reg\", LogisticRegression(multi_class=\"ovr\", solver=\"lbfgs\", random_state=42)),\n",
"])\n",
"pipeline.fit(X_train, y_train)"
]
@@ -1721,7 +1721,7 @@
"metadata": {},
"outputs": [],
"source": [
"log_reg = LogisticRegression(multi_class=\"ovr\", solver=\"liblinear\", random_state=42)\n",
"log_reg = LogisticRegression(multi_class=\"ovr\", solver=\"lbfgs\", random_state=42)\n",
"log_reg.fit(X_train[:n_labeled], y_train[:n_labeled])\n",
"log_reg.score(X_test, y_test)"
]
@@ -1804,7 +1804,7 @@
"metadata": {},
"outputs": [],
"source": [
"log_reg = LogisticRegression(multi_class=\"ovr\", solver=\"liblinear\", random_state=42)\n",
"log_reg = LogisticRegression(multi_class=\"ovr\", solver=\"lbfgs\", random_state=42)\n",
"log_reg.fit(X_representative_digits, y_representative_digits)\n",
"log_reg.score(X_test, y_test)"
]
@@ -1840,7 +1840,7 @@
"metadata": {},
"outputs": [],
"source": [
"log_reg = LogisticRegression(multi_class=\"ovr\", solver=\"liblinear\", random_state=42)\n",
"log_reg = LogisticRegression(multi_class=\"ovr\", solver=\"lbfgs\", random_state=42)\n",
"log_reg.fit(X_train, y_train_propagated)"
]
},
@@ -1894,7 +1894,7 @@
"metadata": {},
"outputs": [],
"source": [
"log_reg = LogisticRegression(multi_class=\"ovr\", solver=\"liblinear\", random_state=42)\n",
"log_reg = LogisticRegression(multi_class=\"ovr\", solver=\"lbfgs\", random_state=42)\n",
"log_reg.fit(X_train_partially_propagated, y_train_partially_propagated)"
]
},
@@ -2280,7 +2280,7 @@
},
{
"cell_type": "code",
"execution_count": 134,
"execution_count": 133,
"metadata": {},
"outputs": [],
"source": [
@@ -2291,7 +2291,7 @@
},
{
"cell_type": "code",
"execution_count": 135,
"execution_count": 134,
"metadata": {},
"outputs": [],
"source": [
@@ -2300,7 +2300,7 @@
},
{
"cell_type": "code",
"execution_count": 136,
"execution_count": 135,
"metadata": {
"scrolled": true
},
@@ -2318,7 +2318,7 @@
},
{
"cell_type": "code",
"execution_count": 137,
"execution_count": 136,
"metadata": {},
"outputs": [],
"source": [
@@ -2339,7 +2339,7 @@
},
{
"cell_type": "code",
"execution_count": 138,
"execution_count": 137,
"metadata": {},
"outputs": [],
"source": [
@@ -2348,7 +2348,7 @@
},
{
"cell_type": "code",
"execution_count": 139,
"execution_count": 138,
"metadata": {},
"outputs": [],
"source": [
@@ -2365,7 +2365,7 @@
},
{
"cell_type": "code",
"execution_count": 140,
"execution_count": 139,
"metadata": {},
"outputs": [],
"source": [
@@ -2374,7 +2374,7 @@
},
{
"cell_type": "code",
"execution_count": 141,
"execution_count": 140,
"metadata": {},
"outputs": [],
"source": [
@@ -2383,7 +2383,7 @@
},
{
"cell_type": "code",
"execution_count": 142,
"execution_count": 141,
"metadata": {},
"outputs": [],
"source": [
@@ -2399,7 +2399,7 @@
},
{
"cell_type": "code",
"execution_count": 143,
"execution_count": 142,
"metadata": {},
"outputs": [],
"source": [
@@ -2415,7 +2415,7 @@
},
{
"cell_type": "code",
"execution_count": 144,
"execution_count": 143,
"metadata": {},
"outputs": [],
"source": [
@@ -2431,7 +2431,7 @@
},
{
"cell_type": "code",
"execution_count": 145,
"execution_count": 144,
"metadata": {},
"outputs": [],
"source": [
@@ -2440,7 +2440,7 @@
},
{
"cell_type": "code",
"execution_count": 146,
"execution_count": 145,
"metadata": {},
"outputs": [],
"source": [
@@ -2456,7 +2456,7 @@
},
{
"cell_type": "code",
"execution_count": 147,
"execution_count": 146,
"metadata": {},
"outputs": [],
"source": [
@@ -2466,7 +2466,7 @@
},
{
"cell_type": "code",
"execution_count": 148,
"execution_count": 147,
"metadata": {},
"outputs": [],
"source": [
@@ -2489,7 +2489,7 @@
},
{
"cell_type": "code",
"execution_count": 149,
"execution_count": 148,
"metadata": {},
"outputs": [],
"source": [
@@ -2505,7 +2505,7 @@
},
{
"cell_type": "code",
"execution_count": 150,
"execution_count": 149,
"metadata": {},
"outputs": [],
"source": [
@@ -2528,7 +2528,7 @@
},
{
"cell_type": "code",
"execution_count": 151,
"execution_count": 150,
"metadata": {},
"outputs": [],
"source": [
@@ -2567,7 +2567,7 @@
},
{
"cell_type": "code",
"execution_count": 152,
"execution_count": 151,
"metadata": {},
"outputs": [],
"source": [
@@ -2592,7 +2592,7 @@
},
{
"cell_type": "code",
"execution_count": 153,
"execution_count": 152,
"metadata": {},
"outputs": [],
"source": [
@@ -2608,7 +2608,7 @@
},
{
"cell_type": "code",
"execution_count": 154,
"execution_count": 153,
"metadata": {},
"outputs": [],
"source": [
@@ -2626,7 +2626,7 @@
},
{
"cell_type": "code",
"execution_count": 155,
"execution_count": 154,
"metadata": {},
"outputs": [],
"source": [
@@ -2638,7 +2638,7 @@
},
{
"cell_type": "code",
"execution_count": 156,
"execution_count": 155,
"metadata": {},
"outputs": [],
"source": [
@@ -2663,7 +2663,7 @@
},
{
"cell_type": "code",
"execution_count": 157,
"execution_count": 156,
"metadata": {},
"outputs": [],
"source": [
@@ -2674,7 +2674,7 @@
},
{
"cell_type": "code",
"execution_count": 158,
"execution_count": 157,
"metadata": {},
"outputs": [],
"source": [
@@ -2714,7 +2714,7 @@
},
{
"cell_type": "code",
"execution_count": 159,
"execution_count": 158,
"metadata": {},
"outputs": [],
"source": [
@@ -2723,7 +2723,7 @@
},
{
"cell_type": "code",
"execution_count": 160,
"execution_count": 159,
"metadata": {},
"outputs": [],
"source": [
@@ -2739,7 +2739,7 @@
},
{
"cell_type": "code",
"execution_count": 161,
"execution_count": 160,
"metadata": {},
"outputs": [],
"source": [
@@ -2756,7 +2756,7 @@
},
{
"cell_type": "code",
"execution_count": 162,
"execution_count": 161,
"metadata": {},
"outputs": [],
"source": [
@@ -2765,7 +2765,7 @@
},
{
"cell_type": "code",
"execution_count": 163,
"execution_count": 162,
"metadata": {},
"outputs": [],
"source": [
@@ -2788,7 +2788,7 @@
},
{
"cell_type": "code",
"execution_count": 164,
"execution_count": 163,
"metadata": {},
"outputs": [],
"source": [
@@ -2798,7 +2798,7 @@
},
{
"cell_type": "code",
"execution_count": 165,
"execution_count": 164,
"metadata": {},
"outputs": [],
"source": [
@@ -2808,7 +2808,7 @@
},
{
"cell_type": "code",
"execution_count": 166,
"execution_count": 165,
"metadata": {},
"outputs": [],
"source": [
@@ -2839,7 +2839,7 @@
},
{
"cell_type": "code",
"execution_count": 167,
"execution_count": 166,
"metadata": {},
"outputs": [],
"source": [
@@ -2858,7 +2858,7 @@
},
{
"cell_type": "code",
"execution_count": 168,
"execution_count": 167,
"metadata": {},
"outputs": [],
"source": [
@@ -2867,7 +2867,7 @@
},
{
"cell_type": "code",
"execution_count": 169,
"execution_count": 168,
"metadata": {},
"outputs": [],
"source": [
@@ -2890,7 +2890,7 @@
},
{
"cell_type": "code",
"execution_count": 170,
"execution_count": 169,
"metadata": {},
"outputs": [],
"source": [
@@ -2899,7 +2899,7 @@
},
{
"cell_type": "code",
"execution_count": 171,
"execution_count": 170,
"metadata": {},
"outputs": [],
"source": [
@@ -2916,7 +2916,7 @@
},
{
"cell_type": "code",
"execution_count": 172,
"execution_count": 171,
"metadata": {},
"outputs": [],
"source": [
@@ -2925,7 +2925,7 @@
},
{
"cell_type": "code",
"execution_count": 173,
"execution_count": 172,
"metadata": {},
"outputs": [],
"source": [
@@ -2936,7 +2936,7 @@
},
{
"cell_type": "code",
"execution_count": 174,
"execution_count": 173,
"metadata": {},
"outputs": [],
"source": [
@@ -2951,7 +2951,7 @@
},
{
"cell_type": "code",
"execution_count": 175,
"execution_count": 174,
"metadata": {},
"outputs": [],
"source": [
@@ -2960,7 +2960,7 @@
},
{
"cell_type": "code",
"execution_count": 176,
"execution_count": 175,
"metadata": {},
"outputs": [],
"source": [
@@ -2969,7 +2969,7 @@
},
{
"cell_type": "code",
"execution_count": 177,
"execution_count": 176,
"metadata": {},
"outputs": [],
"source": [
@@ -2996,7 +2996,7 @@
},
{
"cell_type": "code",
"execution_count": 178,
"execution_count": 177,
"metadata": {},
"outputs": [],
"source": [
@@ -3005,7 +3005,7 @@
},
{
"cell_type": "code",
"execution_count": 179,
"execution_count": 178,
"metadata": {
"scrolled": true
},
@@ -3017,7 +3017,7 @@
},
{
"cell_type": "code",
"execution_count": 180,
"execution_count": 179,
"metadata": {},
"outputs": [],
"source": [
@@ -3051,7 +3051,7 @@
},
{
"cell_type": "code",
"execution_count": 181,
"execution_count": 180,
"metadata": {},
"outputs": [],
"source": [
@@ -3060,7 +3060,7 @@
},
{
"cell_type": "code",
"execution_count": 182,
"execution_count": 181,
"metadata": {},
"outputs": [],
"source": [
@@ -3073,7 +3073,7 @@
},
{
"cell_type": "code",
"execution_count": 183,
"execution_count": 182,
"metadata": {},
"outputs": [],
"source": [
@@ -3163,7 +3163,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 - tf2",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},