Skip to content

Commit 519f81b

Browse files
committed
Merge branch 'master' of github.com:jakevdp/sklearn_scipy2013
2 parents 0976c6e + 44dc342 commit 519f81b

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ notebooks/figures/downloads/
88
*.pkl
99
datasets
1010
joblib
11+
12+
.DS_Store
13+
*.zip

fetch_data.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,4 @@ def check_sentiment140(datasets_folder):
9595
from sklearn.datasets import fetch_lfw_people
9696
fetch_lfw_people(min_faces_per_person=70, resize=0.4,
9797
data_home=datasets_folder)
98+
print("=> Success!")

notebooks/10_distributed_model_selection_and_assessment.ipynb

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,13 +1595,55 @@
15951595
"cell_type": "code",
15961596
"collapsed": false,
15971597
"input": [
1598+
"from IPython.parallel import Client\n",
1599+
"client = Client()\n",
1600+
"len(client)"
1601+
],
1602+
"language": "python",
1603+
"metadata": {},
1604+
"outputs": []
1605+
},
1606+
{
1607+
"cell_type": "code",
1608+
"collapsed": false,
1609+
"input": [
1610+
"from sklearn.svm import SVC\n",
1611+
"\n",
15981612
"lb_view = client.load_balanced_view()\n",
15991613
"model = SVC()"
16001614
],
16011615
"language": "python",
16021616
"metadata": {},
16031617
"outputs": []
16041618
},
1619+
{
1620+
"cell_type": "code",
1621+
"collapsed": false,
1622+
"input": [
1623+
"from sklearn.datasets import load_digits\n",
1624+
"from pyrallel.mmap_utils import persist_cv_splits, warm_mmap_on_cv_splits\n",
1625+
"\n",
1626+
"digits = load_digits()\n",
1627+
"digits_split_filenames = persist_cv_splits(digits.data, digits.target,\n",
1628+
" name='digits', random_state=42)\n",
1629+
"digits_split_filenames"
1630+
],
1631+
"language": "python",
1632+
"metadata": {},
1633+
"outputs": []
1634+
},
1635+
{
1636+
"cell_type": "code",
1637+
"collapsed": false,
1638+
"input": [
1639+
"from pyrallel.mmap_utils import warm_mmap_on_cv_splits\n",
1640+
"\n",
1641+
"warm_mmap_on_cv_splits(client, digits_split_filenames)"
1642+
],
1643+
"language": "python",
1644+
"metadata": {},
1645+
"outputs": []
1646+
},
16051647
{
16061648
"cell_type": "code",
16071649
"collapsed": false,
@@ -1655,6 +1697,18 @@
16551697
"metadata": {},
16561698
"outputs": []
16571699
},
1700+
{
1701+
"cell_type": "code",
1702+
"collapsed": false,
1703+
"input": [
1704+
"search = RandomizedGridSeach(lb_view)\n",
1705+
"search.launch_for_splits(model, svc_params, digits_split_filenames)\n",
1706+
"%time search.wait()"
1707+
],
1708+
"language": "python",
1709+
"metadata": {},
1710+
"outputs": []
1711+
},
16581712
{
16591713
"cell_type": "heading",
16601714
"level": 2,

0 commit comments

Comments
 (0)