You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dev/_downloads/26f110ad6cff1a8a7c58b1a00d8b8b5a/plot_column_transformer_mixed_types.ipynb
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@
51
51
"cell_type": "markdown",
52
52
"metadata": {},
53
53
"source": [
54
-
"## HTML representation of ``Pipeline``\n When the ``Pipeline`` is printed out in a jupyter notebook an HTML\n representation of the estimator is displayed as follows:\n\n"
54
+
"## HTML representation of ``Pipeline`` (display diagram)\n When the ``Pipeline`` is printed out in a jupyter notebook an HTML\n representation of the estimator is displayed as follows:\n\n"
"\n# Displaying Pipelines\n\nThe default configuration for displaying a pipeline is `'text'` where\n`set_config(display='text')`. To visualize the diagram in Jupyter Notebook,\nuse `set_config(display='diagram')` and then output the pipeline object.\n\nTo see more detailed steps in the visualization of the pipeline, click on the\nsteps in the pipeline.\n"
19
+
]
20
+
},
21
+
{
22
+
"cell_type": "markdown",
23
+
"metadata": {},
24
+
"source": [
25
+
"## Displaying a Pipeline with a Preprocessing Step and Classifier\n This section constructs a :class:`~sklearn.pipeline.Pipeline` with a preprocessing\n step, :class:`~sklearn.preprocessing.StandardScaler`, and classifier,\n :class:`~sklearn.linear_model.LogisticRegression`, and displays its visual\n representation.\n\n"
"To view the text pipeline, the default is `display='text'`.\n\n"
44
+
]
45
+
},
46
+
{
47
+
"cell_type": "code",
48
+
"execution_count": null,
49
+
"metadata": {
50
+
"collapsed": false
51
+
},
52
+
"outputs": [],
53
+
"source": [
54
+
"set_config(display=\"text\")\npipe"
55
+
]
56
+
},
57
+
{
58
+
"cell_type": "markdown",
59
+
"metadata": {},
60
+
"source": [
61
+
"To visualize the diagram, change `display='diagram'`.\n\n"
62
+
]
63
+
},
64
+
{
65
+
"cell_type": "code",
66
+
"execution_count": null,
67
+
"metadata": {
68
+
"collapsed": false
69
+
},
70
+
"outputs": [],
71
+
"source": [
72
+
"set_config(display=\"diagram\")\npipe # click on the diagram below to see the details of each step"
73
+
]
74
+
},
75
+
{
76
+
"cell_type": "markdown",
77
+
"metadata": {},
78
+
"source": [
79
+
"## Displaying a Pipeline Chaining Multiple Preprocessing Steps & Classifier\n This section constructs a :class:`~sklearn.pipeline.Pipeline` with multiple\n preprocessing steps, :class:`~sklearn.preprocessing.PolynomialFeatures` and\n :class:`~sklearn.preprocessing.StandardScaler`, and a classifer step,\n :class:`~sklearn.linear_model.LogisticRegression`, and displays its visual\n representation.\n\n"
"To visualize the diagram, change to display='diagram'\n\n"
98
+
]
99
+
},
100
+
{
101
+
"cell_type": "code",
102
+
"execution_count": null,
103
+
"metadata": {
104
+
"collapsed": false
105
+
},
106
+
"outputs": [],
107
+
"source": [
108
+
"set_config(display=\"diagram\")\npipe # click on the diagram below to see the details of each step"
109
+
]
110
+
},
111
+
{
112
+
"cell_type": "markdown",
113
+
"metadata": {},
114
+
"source": [
115
+
"## Displaying a Pipeline and Dimensionality Reduction and Classifier\n This section constructs a :class:`~sklearn.pipeline.Pipeline` with a\n dimensionality reduction step, :class:`~sklearn.decomposition.PCA`,\n a classifier, :class:`~sklearn.svm.SVC`, and displays its visual\n representation.\n\n"
"To visualize the diagram, change to `display='diagram'`.\n\n"
134
+
]
135
+
},
136
+
{
137
+
"cell_type": "code",
138
+
"execution_count": null,
139
+
"metadata": {
140
+
"collapsed": false
141
+
},
142
+
"outputs": [],
143
+
"source": [
144
+
"set_config(display=\"diagram\")\npipe # click on the diagram below to see the details of each step"
145
+
]
146
+
},
147
+
{
148
+
"cell_type": "markdown",
149
+
"metadata": {},
150
+
"source": [
151
+
"## Displaying a Complex Pipeline Chaining a Column Transformer\n This section constructs a complex :class:`~sklearn.pipeline.Pipeline` with a\n :class:`~sklearn.compose.ColumnTransformer` and a classifier,\n :class:`~sklearn.linear_model.LogisticRegression`, and displays its visual\n representation.\n\n"
"To visualize the diagram, change to `display='diagram'`\n\n"
170
+
]
171
+
},
172
+
{
173
+
"cell_type": "code",
174
+
"execution_count": null,
175
+
"metadata": {
176
+
"collapsed": false
177
+
},
178
+
"outputs": [],
179
+
"source": [
180
+
"set_config(display=\"diagram\")\npipe # click on the diagram below to see the details of each step"
181
+
]
182
+
},
183
+
{
184
+
"cell_type": "markdown",
185
+
"metadata": {},
186
+
"source": [
187
+
"## Displaying a Grid Search over a Pipeline with a Classifier\n This section constructs a :class:`~sklearn.model_selection.GridSearchCV`\n over a :class:`~sklearn.pipeline.Pipeline` with\n :class:`~sklearn.ensemble.RandomForestClassifier` and displays its visual\n representation.\n\n"
0 commit comments