|
34 | 34 | {
|
35 | 35 | "cell_type": "code",
|
36 | 36 | "execution_count": null,
|
37 |
| - "metadata": { |
38 |
| - "collapsed": false |
39 |
| - }, |
| 37 | + "metadata": {}, |
40 | 38 | "outputs": [],
|
41 | 39 | "source": [
|
42 | 40 | "# Import libraries necessary for this project\n",
|
|
84 | 82 | {
|
85 | 83 | "cell_type": "code",
|
86 | 84 | "execution_count": null,
|
87 |
| - "metadata": { |
88 |
| - "collapsed": false |
89 |
| - }, |
| 85 | + "metadata": {}, |
90 | 86 | "outputs": [],
|
91 | 87 | "source": [
|
92 | 88 | "# TODO: Minimum price of the data\n",
|
|
161 | 157 | {
|
162 | 158 | "cell_type": "code",
|
163 | 159 | "execution_count": null,
|
164 |
| - "metadata": { |
165 |
| - "collapsed": false |
166 |
| - }, |
| 160 | + "metadata": {}, |
167 | 161 | "outputs": [],
|
168 | 162 | "source": [
|
169 | 163 | "# TODO: Import 'r2_score'\n",
|
|
201 | 195 | {
|
202 | 196 | "cell_type": "code",
|
203 | 197 | "execution_count": null,
|
204 |
| - "metadata": { |
205 |
| - "collapsed": false |
206 |
| - }, |
| 198 | + "metadata": {}, |
207 | 199 | "outputs": [],
|
208 | 200 | "source": [
|
209 | 201 | "# Calculate the performance of this model\n",
|
|
235 | 227 | {
|
236 | 228 | "cell_type": "code",
|
237 | 229 | "execution_count": null,
|
238 |
| - "metadata": { |
239 |
| - "collapsed": false |
240 |
| - }, |
| 230 | + "metadata": {}, |
241 | 231 | "outputs": [],
|
242 | 232 | "source": [
|
243 | 233 | "# TODO: Import 'train_test_split'\n",
|
|
289 | 279 | "cell_type": "code",
|
290 | 280 | "execution_count": null,
|
291 | 281 | "metadata": {
|
292 |
| - "collapsed": false, |
293 | 282 | "scrolled": false
|
294 | 283 | },
|
295 | 284 | "outputs": [],
|
|
327 | 316 | {
|
328 | 317 | "cell_type": "code",
|
329 | 318 | "execution_count": null,
|
330 |
| - "metadata": { |
331 |
| - "collapsed": false |
332 |
| - }, |
| 319 | + "metadata": {}, |
333 | 320 | "outputs": [],
|
334 | 321 | "source": [
|
335 | 322 | "vs.ModelComplexity(X_train, y_train)"
|
|
432 | 419 | {
|
433 | 420 | "cell_type": "code",
|
434 | 421 | "execution_count": null,
|
435 |
| - "metadata": { |
436 |
| - "collapsed": false |
437 |
| - }, |
| 422 | + "metadata": {}, |
438 | 423 | "outputs": [],
|
439 | 424 | "source": [
|
440 | 425 | "# TODO: Import 'make_scorer', 'DecisionTreeRegressor', and 'GridSearchCV'\n",
|
|
446 | 431 | " # Create cross-validation sets from the training data\n",
|
447 | 432 | " # sklearn version 0.18: ShuffleSplit(n_splits=10, test_size=0.1, train_size=None, random_state=None)\n",
|
448 | 433 | " # sklearn versiin 0.17: ShuffleSplit(n, n_iter=10, test_size=0.1, train_size=None, random_state=None)\n",
|
449 |
| - " cv_sets = ShuffleSplit(X.shape[0], n_splits = 10, test_size = 0.20, random_state = 0)\n", |
| 434 | + " cv_sets = ShuffleSplit(X.shape[0], n_iter = 10, test_size = 0.20, random_state = 0)\n", |
450 | 435 | "\n",
|
451 | 436 | " # TODO: Create a decision tree regressor object\n",
|
452 | 437 | " regressor = None\n",
|
|
489 | 474 | "cell_type": "code",
|
490 | 475 | "execution_count": null,
|
491 | 476 | "metadata": {
|
492 |
| - "collapsed": false, |
493 | 477 | "scrolled": true
|
494 | 478 | },
|
495 | 479 | "outputs": [],
|
|
529 | 513 | {
|
530 | 514 | "cell_type": "code",
|
531 | 515 | "execution_count": null,
|
532 |
| - "metadata": { |
533 |
| - "collapsed": false |
534 |
| - }, |
| 516 | + "metadata": {}, |
535 | 517 | "outputs": [],
|
536 | 518 | "source": [
|
537 | 519 | "# Produce a matrix for client data\n",
|
|
562 | 544 | {
|
563 | 545 | "cell_type": "code",
|
564 | 546 | "execution_count": null,
|
565 |
| - "metadata": { |
566 |
| - "collapsed": false |
567 |
| - }, |
| 547 | + "metadata": {}, |
568 | 548 | "outputs": [],
|
569 | 549 | "source": [
|
570 | 550 | "vs.PredictTrials(features, prices, fit_model, client_data)"
|
|
602 | 582 | "metadata": {
|
603 | 583 | "anaconda-cloud": {},
|
604 | 584 | "kernelspec": {
|
605 |
| - "display_name": "Python 2", |
| 585 | + "display_name": "Python 3", |
606 | 586 | "language": "python",
|
607 |
| - "name": "python2" |
| 587 | + "name": "python3" |
608 | 588 | },
|
609 | 589 | "language_info": {
|
610 | 590 | "codemirror_mode": {
|
611 | 591 | "name": "ipython",
|
612 |
| - "version": 2 |
| 592 | + "version": 3 |
613 | 593 | },
|
614 | 594 | "file_extension": ".py",
|
615 | 595 | "mimetype": "text/x-python",
|
616 | 596 | "name": "python",
|
617 | 597 | "nbconvert_exporter": "python",
|
618 |
| - "pygments_lexer": "ipython2", |
619 |
| - "version": "2.7.12" |
| 598 | + "pygments_lexer": "ipython3", |
| 599 | + "version": "3.6.0" |
620 | 600 | }
|
621 | 601 | },
|
622 | 602 | "nbformat": 4,
|
623 |
| - "nbformat_minor": 0 |
| 603 | + "nbformat_minor": 1 |
624 | 604 | }
|
0 commit comments