Skip to content
This repository was archived by the owner on Mar 21, 2023. It is now read-only.

Update to latest scikit-learn syntax (0.18.1) #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions notebooks/01-Preliminaries.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,24 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"IPython: 5.1.0\n",
"numpy: 1.11.2\n",
"scipy: 0.18.1\n",
"matplotlib: 1.5.3\n",
"scikit-learn: 0.18\n",
"seaborn 0.7.1\n"
]
}
],
"source": [
"from __future__ import print_function\n",
"\n",
Expand Down Expand Up @@ -162,7 +175,7 @@
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "",
"language": "python",
"name": "python3"
},
"language_info": {
Expand All @@ -175,7 +188,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.1"
"version": "3.5.2"
}
},
"nbformat": 4,
Expand Down
60 changes: 17 additions & 43 deletions notebooks/02.1-Machine-Learning-Intro.ipynb

Large diffs are not rendered by default.

157 changes: 82 additions & 75 deletions notebooks/02.2-Basic-Principles.ipynb

Large diffs are not rendered by default.

61 changes: 26 additions & 35 deletions notebooks/03.1-Classification-SVMs.ipynb

Large diffs are not rendered by default.

97 changes: 44 additions & 53 deletions notebooks/03.2-Regression-Forests.ipynb

Large diffs are not rendered by default.

67 changes: 25 additions & 42 deletions notebooks/04.1-Dimensionality-PCA.ipynb

Large diffs are not rendered by default.

71 changes: 31 additions & 40 deletions notebooks/04.2-Clustering-KMeans.ipynb

Large diffs are not rendered by default.

131 changes: 60 additions & 71 deletions notebooks/04.3-Density-GMM.ipynb

Large diffs are not rendered by default.

121 changes: 73 additions & 48 deletions notebooks/05-Validation.ipynb

Large diffs are not rendered by default.

128 changes: 69 additions & 59 deletions notebooks/Index.ipynb
Original file line number Diff line number Diff line change
@@ -1,62 +1,72 @@
{
"metadata": {
"name": "",
"signature": "sha256:60efb1a2f4e1815d3e1a54160adf3184ab956d9a4487c226bde9b22aa2728f94"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Scikit-Learn Tutorial\n",
"\n",
"*Jake VanderPlas*\n",
"\n",
"This is the main index for the materials of my Scikit-Learn tutorial.\n",
"Please refer to the [github repository](http://github.com/jakevdp/sklearn_tutorial) for this tutorial for any updates."
]
},
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Scikit-Learn Tutorial\n",
"\n",
"*Jake VanderPlas*\n",
"\n",
"This is the main index for the materials of my Scikit-Learn tutorial.\n",
"Please refer to the [github repository](http://github.com/jakevdp/sklearn_tutorial) for this tutorial for any updates."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Tutorial Notebooks\n",
"\n",
"The following links are to notebooks containing the tutorial materials.\n",
"Note that many of these require files that are in the directory structure of the [github repository](http://github.com/jakevdp/sklearn_tutorial) in which they are contained.\n",
"There is not time during the tutorial to cover all of this material, but I left it in in case attendees would like to go deeper on their own.\n",
"\n",
"### 1. Preliminaries\n",
"\n",
" + [01-Preliminaries.ipynb](01-Preliminaries.ipynb)\n",
" \n",
"### 2. Introduction to Machine Learning with Scikit-Learn\n",
"\n",
" + [02.1-Machine-Learning-Intro.ipynb](02.1-Machine-Learning-Intro.ipynb)\n",
" + [02.2-Basic-Principles.ipynb](02.2-Basic-Principles.ipynb)\n",
" \n",
"### 3. Supervised Learning In-Depth\n",
"\n",
" + [03.1-Classification-SVMs.ipynb](03.1-Classification-SVMs.ipynb)\n",
" + [03.2-Regression-Forests.ipynb](03.2-Regression-Forests.ipynb)\n",
"\n",
"### 4. Unsupervised Learning In-Depth\n",
"\n",
" + [04.1-Dimensionality-PCA.ipynb](04.1-Dimensionality-PCA.ipynb)\n",
" + [04.2-Clustering-KMeans.ipynb](04.2-Clustering-KMeans.ipynb)\n",
" + [04.3-Density-GMM.ipynb](04.3-Density-GMM.ipynb)\n",
" \n",
"### 5. Model Validation In-Depth\n",
"\n",
" + [05-Validation.ipynb](05-Validation.ipynb)"
]
}
],
"metadata": {}
"cell_type": "markdown",
"metadata": {},
"source": [
"## Tutorial Notebooks\n",
"\n",
"The following links are to notebooks containing the tutorial materials.\n",
"Note that many of these require files that are in the directory structure of the [github repository](http://github.com/jakevdp/sklearn_tutorial) in which they are contained.\n",
"There is not time during the tutorial to cover all of this material, but I left it in in case attendees would like to go deeper on their own.\n",
"\n",
"### 1. Preliminaries\n",
"\n",
" + [01-Preliminaries.ipynb](01-Preliminaries.ipynb)\n",
" \n",
"### 2. Introduction to Machine Learning with Scikit-Learn\n",
"\n",
" + [02.1-Machine-Learning-Intro.ipynb](02.1-Machine-Learning-Intro.ipynb)\n",
" + [02.2-Basic-Principles.ipynb](02.2-Basic-Principles.ipynb)\n",
" \n",
"### 3. Supervised Learning In-Depth\n",
"\n",
" + [03.1-Classification-SVMs.ipynb](03.1-Classification-SVMs.ipynb)\n",
" + [03.2-Regression-Forests.ipynb](03.2-Regression-Forests.ipynb)\n",
"\n",
"### 4. Unsupervised Learning In-Depth\n",
"\n",
" + [04.1-Dimensionality-PCA.ipynb](04.1-Dimensionality-PCA.ipynb)\n",
" + [04.2-Clustering-KMeans.ipynb](04.2-Clustering-KMeans.ipynb)\n",
" + [04.3-Density-GMM.ipynb](04.3-Density-GMM.ipynb)\n",
" \n",
"### 5. Model Validation In-Depth\n",
"\n",
" + [05-Validation.ipynb](05-Validation.ipynb)"
]
}
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"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.5.2"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
57 changes: 25 additions & 32 deletions notebooks/URL.ipynb
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Scikit-Learn Tutorial\n",
"\n",
"---\n",
"\n",
"<br><br><br>\n",
"\n",
"# Download all materials here:\n",
"# http://github.com/jakevdp/sklearn_tutorial\n",
"\n",
"<br><br><br><br><br><br>\n",
"\n",
"---"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
Expand All @@ -15,36 +35,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.3.5"
},
"name": "",
"signature": "sha256:5941485b19c03919025faae3887fd7ef842661eae6780930de41597909742c69"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Scikit-Learn Tutorial\n",
"\n",
"---\n",
"\n",
"<br><br><br>\n",
"\n",
"# Download all materials here:\n",
"# http://github.com/jakevdp/sklearn_tutorial\n",
"\n",
"<br><br><br><br><br><br>\n",
"\n",
"---"
]
}
],
"metadata": {}
"version": "3.5.2"
}
]
}
},
"nbformat": 4,
"nbformat_minor": 0
}
2 changes: 1 addition & 1 deletion notebooks/fig_code/sgd_separator.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def plot_sgd_separator():
for (i, j), val in np.ndenumerate(X1):
x1 = val
x2 = X2[i, j]
p = clf.decision_function([x1, x2])
p = clf.decision_function([[x1, x2]])
Z[i, j] = p[0]
levels = [-1.0, 0.0, 1.0]
linestyles = ['dashed', 'solid', 'dashed']
Expand Down