|
36 | 36 | {
|
37 | 37 | "cell_type": "code",
|
38 | 38 | "execution_count": null,
|
39 |
| - "metadata": {}, |
| 39 | + "metadata": { |
| 40 | + "collapsed": true |
| 41 | + }, |
40 | 42 | "outputs": [],
|
41 | 43 | "source": [
|
42 | 44 | "# Import libraries necessary for this project\n",
|
|
72 | 74 | {
|
73 | 75 | "cell_type": "code",
|
74 | 76 | "execution_count": null,
|
75 |
| - "metadata": {}, |
| 77 | + "metadata": { |
| 78 | + "collapsed": true |
| 79 | + }, |
76 | 80 | "outputs": [],
|
77 | 81 | "source": [
|
78 | 82 | "# Display a description of the dataset\n",
|
|
90 | 94 | {
|
91 | 95 | "cell_type": "code",
|
92 | 96 | "execution_count": null,
|
93 |
| - "metadata": {}, |
| 97 | + "metadata": { |
| 98 | + "collapsed": true |
| 99 | + }, |
94 | 100 | "outputs": [],
|
95 | 101 | "source": [
|
96 | 102 | "# TODO: Select three indices of your choice you wish to sample from the dataset\n",
|
|
137 | 143 | {
|
138 | 144 | "cell_type": "code",
|
139 | 145 | "execution_count": null,
|
140 |
| - "metadata": {}, |
| 146 | + "metadata": { |
| 147 | + "collapsed": true |
| 148 | + }, |
141 | 149 | "outputs": [],
|
142 | 150 | "source": [
|
143 | 151 | "# TODO: Make a copy of the DataFrame, using the 'drop' function to drop the given feature\n",
|
|
180 | 188 | {
|
181 | 189 | "cell_type": "code",
|
182 | 190 | "execution_count": null,
|
183 |
| - "metadata": {}, |
| 191 | + "metadata": { |
| 192 | + "collapsed": true |
| 193 | + }, |
184 | 194 | "outputs": [],
|
185 | 195 | "source": [
|
186 | 196 | "# Produce a scatter matrix for each pair of features in the data\n",
|
|
226 | 236 | {
|
227 | 237 | "cell_type": "code",
|
228 | 238 | "execution_count": null,
|
229 |
| - "metadata": {}, |
| 239 | + "metadata": { |
| 240 | + "collapsed": true |
| 241 | + }, |
230 | 242 | "outputs": [],
|
231 | 243 | "source": [
|
232 | 244 | "# TODO: Scale the data using the natural logarithm\n",
|
|
252 | 264 | {
|
253 | 265 | "cell_type": "code",
|
254 | 266 | "execution_count": null,
|
255 |
| - "metadata": {}, |
| 267 | + "metadata": { |
| 268 | + "collapsed": true |
| 269 | + }, |
256 | 270 | "outputs": [],
|
257 | 271 | "source": [
|
258 | 272 | "# Display the log-transformed sample data\n",
|
|
279 | 293 | {
|
280 | 294 | "cell_type": "code",
|
281 | 295 | "execution_count": null,
|
282 |
| - "metadata": {}, |
| 296 | + "metadata": { |
| 297 | + "collapsed": true |
| 298 | + }, |
283 | 299 | "outputs": [],
|
284 | 300 | "source": [
|
285 | 301 | "# For each feature find the data points with extreme high or low values\n",
|
|
344 | 360 | {
|
345 | 361 | "cell_type": "code",
|
346 | 362 | "execution_count": null,
|
347 |
| - "metadata": {}, |
| 363 | + "metadata": { |
| 364 | + "collapsed": true |
| 365 | + }, |
348 | 366 | "outputs": [],
|
349 | 367 | "source": [
|
350 | 368 | "# TODO: Apply PCA by fitting the good data with the same number of dimensions as features\n",
|
|
384 | 402 | {
|
385 | 403 | "cell_type": "code",
|
386 | 404 | "execution_count": null,
|
387 |
| - "metadata": {}, |
| 405 | + "metadata": { |
| 406 | + "collapsed": true |
| 407 | + }, |
388 | 408 | "outputs": [],
|
389 | 409 | "source": [
|
390 | 410 | "# Display sample log-data after having a PCA transformation applied\n",
|
|
407 | 427 | {
|
408 | 428 | "cell_type": "code",
|
409 | 429 | "execution_count": null,
|
410 |
| - "metadata": {}, |
| 430 | + "metadata": { |
| 431 | + "collapsed": true |
| 432 | + }, |
411 | 433 | "outputs": [],
|
412 | 434 | "source": [
|
413 | 435 | "# TODO: Apply PCA by fitting the good data with only two dimensions\n",
|
|
434 | 456 | {
|
435 | 457 | "cell_type": "code",
|
436 | 458 | "execution_count": null,
|
437 |
| - "metadata": {}, |
| 459 | + "metadata": { |
| 460 | + "collapsed": true |
| 461 | + }, |
438 | 462 | "outputs": [],
|
439 | 463 | "source": [
|
440 | 464 | "# Display sample log-data after applying PCA transformation in two dimensions\n",
|
|
517 | 541 | {
|
518 | 542 | "cell_type": "code",
|
519 | 543 | "execution_count": null,
|
520 |
| - "metadata": {}, |
| 544 | + "metadata": { |
| 545 | + "collapsed": true |
| 546 | + }, |
521 | 547 | "outputs": [],
|
522 | 548 | "source": [
|
523 | 549 | "# TODO: Apply your clustering algorithm of choice to the reduced data \n",
|
|
562 | 588 | {
|
563 | 589 | "cell_type": "code",
|
564 | 590 | "execution_count": null,
|
565 |
| - "metadata": {}, |
| 591 | + "metadata": { |
| 592 | + "collapsed": true |
| 593 | + }, |
566 | 594 | "outputs": [],
|
567 | 595 | "source": [
|
568 | 596 | "# Display the results of the clustering from implementation\n",
|
|
584 | 612 | {
|
585 | 613 | "cell_type": "code",
|
586 | 614 | "execution_count": null,
|
587 |
| - "metadata": {}, |
| 615 | + "metadata": { |
| 616 | + "collapsed": true |
| 617 | + }, |
588 | 618 | "outputs": [],
|
589 | 619 | "source": [
|
590 | 620 | "# TODO: Inverse transform the centers\n",
|
|
629 | 659 | {
|
630 | 660 | "cell_type": "code",
|
631 | 661 | "execution_count": null,
|
632 |
| - "metadata": {}, |
| 662 | + "metadata": { |
| 663 | + "collapsed": true |
| 664 | + }, |
633 | 665 | "outputs": [],
|
634 | 666 | "source": [
|
635 | 667 | "# Display the predictions\n",
|
|
708 | 740 | "cell_type": "code",
|
709 | 741 | "execution_count": null,
|
710 | 742 | "metadata": {
|
| 743 | + "collapsed": true, |
711 | 744 | "scrolled": false
|
712 | 745 | },
|
713 | 746 | "outputs": [],
|
|
742 | 775 | ],
|
743 | 776 | "metadata": {
|
744 | 777 | "kernelspec": {
|
745 |
| - "display_name": "Python 3", |
| 778 | + "display_name": "Python 2", |
746 | 779 | "language": "python",
|
747 |
| - "name": "python3" |
| 780 | + "name": "python2" |
748 | 781 | },
|
749 | 782 | "language_info": {
|
750 | 783 | "codemirror_mode": {
|
751 | 784 | "name": "ipython",
|
752 |
| - "version": 3 |
| 785 | + "version": 2 |
753 | 786 | },
|
754 | 787 | "file_extension": ".py",
|
755 | 788 | "mimetype": "text/x-python",
|
756 | 789 | "name": "python",
|
757 | 790 | "nbconvert_exporter": "python",
|
758 |
| - "pygments_lexer": "ipython3", |
759 |
| - "version": "3.6.0" |
| 791 | + "pygments_lexer": "ipython2", |
| 792 | + "version": "2.7.12" |
760 | 793 | }
|
761 | 794 | },
|
762 | 795 | "nbformat": 4,
|
|
0 commit comments