Skip to content

Commit 81b19b1

Browse files
committed
imdb
1 parent adb34f0 commit 81b19b1

File tree

10 files changed

+2521
-21
lines changed

10 files changed

+2521
-21
lines changed

projects/customer_segments/customer_segments.ipynb

Lines changed: 54 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
{
3737
"cell_type": "code",
3838
"execution_count": null,
39-
"metadata": {},
39+
"metadata": {
40+
"collapsed": true
41+
},
4042
"outputs": [],
4143
"source": [
4244
"# Import libraries necessary for this project\n",
@@ -72,7 +74,9 @@
7274
{
7375
"cell_type": "code",
7476
"execution_count": null,
75-
"metadata": {},
77+
"metadata": {
78+
"collapsed": true
79+
},
7680
"outputs": [],
7781
"source": [
7882
"# Display a description of the dataset\n",
@@ -90,7 +94,9 @@
9094
{
9195
"cell_type": "code",
9296
"execution_count": null,
93-
"metadata": {},
97+
"metadata": {
98+
"collapsed": true
99+
},
94100
"outputs": [],
95101
"source": [
96102
"# TODO: Select three indices of your choice you wish to sample from the dataset\n",
@@ -137,7 +143,9 @@
137143
{
138144
"cell_type": "code",
139145
"execution_count": null,
140-
"metadata": {},
146+
"metadata": {
147+
"collapsed": true
148+
},
141149
"outputs": [],
142150
"source": [
143151
"# TODO: Make a copy of the DataFrame, using the 'drop' function to drop the given feature\n",
@@ -180,7 +188,9 @@
180188
{
181189
"cell_type": "code",
182190
"execution_count": null,
183-
"metadata": {},
191+
"metadata": {
192+
"collapsed": true
193+
},
184194
"outputs": [],
185195
"source": [
186196
"# Produce a scatter matrix for each pair of features in the data\n",
@@ -226,7 +236,9 @@
226236
{
227237
"cell_type": "code",
228238
"execution_count": null,
229-
"metadata": {},
239+
"metadata": {
240+
"collapsed": true
241+
},
230242
"outputs": [],
231243
"source": [
232244
"# TODO: Scale the data using the natural logarithm\n",
@@ -252,7 +264,9 @@
252264
{
253265
"cell_type": "code",
254266
"execution_count": null,
255-
"metadata": {},
267+
"metadata": {
268+
"collapsed": true
269+
},
256270
"outputs": [],
257271
"source": [
258272
"# Display the log-transformed sample data\n",
@@ -279,7 +293,9 @@
279293
{
280294
"cell_type": "code",
281295
"execution_count": null,
282-
"metadata": {},
296+
"metadata": {
297+
"collapsed": true
298+
},
283299
"outputs": [],
284300
"source": [
285301
"# For each feature find the data points with extreme high or low values\n",
@@ -344,7 +360,9 @@
344360
{
345361
"cell_type": "code",
346362
"execution_count": null,
347-
"metadata": {},
363+
"metadata": {
364+
"collapsed": true
365+
},
348366
"outputs": [],
349367
"source": [
350368
"# TODO: Apply PCA by fitting the good data with the same number of dimensions as features\n",
@@ -384,7 +402,9 @@
384402
{
385403
"cell_type": "code",
386404
"execution_count": null,
387-
"metadata": {},
405+
"metadata": {
406+
"collapsed": true
407+
},
388408
"outputs": [],
389409
"source": [
390410
"# Display sample log-data after having a PCA transformation applied\n",
@@ -407,7 +427,9 @@
407427
{
408428
"cell_type": "code",
409429
"execution_count": null,
410-
"metadata": {},
430+
"metadata": {
431+
"collapsed": true
432+
},
411433
"outputs": [],
412434
"source": [
413435
"# TODO: Apply PCA by fitting the good data with only two dimensions\n",
@@ -434,7 +456,9 @@
434456
{
435457
"cell_type": "code",
436458
"execution_count": null,
437-
"metadata": {},
459+
"metadata": {
460+
"collapsed": true
461+
},
438462
"outputs": [],
439463
"source": [
440464
"# Display sample log-data after applying PCA transformation in two dimensions\n",
@@ -517,7 +541,9 @@
517541
{
518542
"cell_type": "code",
519543
"execution_count": null,
520-
"metadata": {},
544+
"metadata": {
545+
"collapsed": true
546+
},
521547
"outputs": [],
522548
"source": [
523549
"# TODO: Apply your clustering algorithm of choice to the reduced data \n",
@@ -562,7 +588,9 @@
562588
{
563589
"cell_type": "code",
564590
"execution_count": null,
565-
"metadata": {},
591+
"metadata": {
592+
"collapsed": true
593+
},
566594
"outputs": [],
567595
"source": [
568596
"# Display the results of the clustering from implementation\n",
@@ -584,7 +612,9 @@
584612
{
585613
"cell_type": "code",
586614
"execution_count": null,
587-
"metadata": {},
615+
"metadata": {
616+
"collapsed": true
617+
},
588618
"outputs": [],
589619
"source": [
590620
"# TODO: Inverse transform the centers\n",
@@ -629,7 +659,9 @@
629659
{
630660
"cell_type": "code",
631661
"execution_count": null,
632-
"metadata": {},
662+
"metadata": {
663+
"collapsed": true
664+
},
633665
"outputs": [],
634666
"source": [
635667
"# Display the predictions\n",
@@ -708,6 +740,7 @@
708740
"cell_type": "code",
709741
"execution_count": null,
710742
"metadata": {
743+
"collapsed": true,
711744
"scrolled": false
712745
},
713746
"outputs": [],
@@ -742,21 +775,21 @@
742775
],
743776
"metadata": {
744777
"kernelspec": {
745-
"display_name": "Python 3",
778+
"display_name": "Python 2",
746779
"language": "python",
747-
"name": "python3"
780+
"name": "python2"
748781
},
749782
"language_info": {
750783
"codemirror_mode": {
751784
"name": "ipython",
752-
"version": 3
785+
"version": 2
753786
},
754787
"file_extension": ".py",
755788
"mimetype": "text/x-python",
756789
"name": "python",
757790
"nbconvert_exporter": "python",
758-
"pygments_lexer": "ipython3",
759-
"version": "3.6.0"
791+
"pygments_lexer": "ipython2",
792+
"version": "2.7.12"
760793
}
761794
},
762795
"nbformat": 4,
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Log files (e.g. for TensorBoard)
2+
logs/
3+
4+
# Mac
5+
.DS_Store
6+
7+
# Byte-compiled / optimized / DLL files
8+
__pycache__/
9+
*.py[cod]
10+
*$py.class
11+
12+
# C extensions
13+
*.so
14+
15+
# Distribution / packaging
16+
.Python
17+
env/
18+
build/
19+
develop-eggs/
20+
dist/
21+
downloads/
22+
eggs/
23+
.eggs/
24+
lib/
25+
lib64/
26+
parts/
27+
sdist/
28+
var/
29+
wheels/
30+
*.egg-info/
31+
.installed.cfg
32+
*.egg
33+
34+
# PyInstaller
35+
# Usually these files are written by a python script from a template
36+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
37+
*.manifest
38+
*.spec
39+
40+
# Installer logs
41+
pip-log.txt
42+
pip-delete-this-directory.txt
43+
44+
# Unit test / coverage reports
45+
htmlcov/
46+
.tox/
47+
.coverage
48+
.coverage.*
49+
.cache
50+
nosetests.xml
51+
coverage.xml
52+
*.cover
53+
.hypothesis/
54+
55+
# Translations
56+
*.mo
57+
*.pot
58+
59+
# Django stuff:
60+
*.log
61+
local_settings.py
62+
63+
# Flask stuff:
64+
instance/
65+
.webassets-cache
66+
67+
# Scrapy stuff:
68+
.scrapy
69+
70+
# Sphinx documentation
71+
docs/_build/
72+
73+
# PyBuilder
74+
target/
75+
76+
# Jupyter Notebook
77+
.ipynb_checkpoints
78+
79+
# pyenv
80+
.python-version
81+
82+
# celery beat schedule file
83+
celerybeat-schedule
84+
85+
# SageMath parsed files
86+
*.sage.py
87+
88+
# dotenv
89+
.env
90+
91+
# virtualenv
92+
.venv
93+
venv/
94+
ENV/
95+
96+
# Spyder project settings
97+
.spyderproject
98+
.spyproject
99+
100+
# Rope project settings
101+
.ropeproject
102+
103+
# mkdocs documentation
104+
/site
105+
106+
# mypy
107+
.mypy_cache/

0 commit comments

Comments
 (0)