|
489 | 489 | "cell_type": "code", |
490 | 490 | "execution_count": null, |
491 | 491 | "metadata": { |
492 | | - "collapsed": true |
| 492 | + "collapsed": false |
493 | 493 | }, |
494 | 494 | "outputs": [], |
495 | 495 | "source": [ |
|
526 | 526 | }, |
527 | 527 | "outputs": [], |
528 | 528 | "source": [ |
529 | | - "var_df = pd.DataFrame(covtype_model_v1.varimp(return_list=True), \n", |
| 529 | + "var_df = pd.DataFrame(covtype_model_v1.varimp(), \n", |
530 | 530 | " columns=[\"Variable\", \"Relative Importance\", \"Scaled Importance\", \"Percentage\"])\n", |
531 | 531 | "print var_df.shape\n", |
532 | 532 | "var_df.head(10)" |
|
574 | 574 | "cell_type": "code", |
575 | 575 | "execution_count": null, |
576 | 576 | "metadata": { |
577 | | - "collapsed": true |
| 577 | + "collapsed": false |
578 | 578 | }, |
579 | 579 | "outputs": [], |
580 | 580 | "source": [ |
|
590 | 590 | }, |
591 | 591 | "outputs": [], |
592 | 592 | "source": [ |
593 | | - "plt.plot(cov_v2_df['training_MSE'], label=\"training_mse\")\n", |
594 | | - "plt.plot(cov_v2_df['validation_MSE'], label=\"validation_mse\")\n", |
| 593 | + "plt.plot(cov_v2_df['training_classification_error'], label=\"training_classification_error\")\n", |
| 594 | + "plt.plot(cov_v2_df['validation_classification_error'], label=\"validation_classification_error\")\n", |
595 | 595 | "plt.title(\"Covertype Deep Learner (Early Stop)\")\n", |
596 | 596 | "plt.legend();" |
597 | 597 | ] |
|
627 | 627 | "covtype_model_tuned = H2ODeepLearningEstimator(\n", |
628 | 628 | " model_id=\"covtype_tuned\",\n", |
629 | 629 | " overwrite_with_best_model=False,\n", |
630 | | - " hidden=[128,128,128], # more hidden layers -> more complex interactions\n", |
| 630 | + " hidden=[128,128,128], # more hidden layers -> more complex interactions\n", |
631 | 631 | " epochs=10, # to keep it short enough\n", |
632 | 632 | " score_validation_samples=10000, # downsample validation set for faster scoring\n", |
633 | 633 | " score_duty_cycle=0.025, # don't score more than 2.5% of the wall time\n", |
634 | | - " adaptive_rate=False, # manually tuned learning rate\n", |
| 634 | + " adaptive_rate=False, # manually tuned learning rate\n", |
635 | 635 | " rate=0.01, \n", |
636 | 636 | " rate_annealing=0.000002, \n", |
637 | 637 | " momentum_start=0.2, # manually tuned momentum\n", |
638 | 638 | " momentum_stable=0.4, \n", |
639 | 639 | " momentum_ramp=10000000, \n", |
640 | | - " l1=0.00001, # add some L1/L2 regularization\n", |
| 640 | + " l1=0.00001, # add some L1/L2 regularization\n", |
641 | 641 | " l2=0.00001,\n", |
642 | 642 | " max_w2=10 # helps stability for Rectifier\n", |
643 | 643 | ")\n", |
|
655 | 655 | "cell_type": "code", |
656 | 656 | "execution_count": null, |
657 | 657 | "metadata": { |
658 | | - "collapsed": true |
| 658 | + "collapsed": false |
659 | 659 | }, |
660 | 660 | "outputs": [], |
661 | 661 | "source": [ |
|
672 | 672 | }, |
673 | 673 | "outputs": [], |
674 | 674 | "source": [ |
675 | | - "plt.plot(cov_tuned_df['training_MSE'], label=\"training_mse\")\n", |
676 | | - "plt.plot(cov_tuned_df['validation_MSE'], label=\"validation_mse\")\n", |
| 675 | + "plt.plot(cov_tuned_df['training_classification_error'], label=\"training_classification_error\")\n", |
| 676 | + "plt.plot(cov_tuned_df['validation_classification_error'], label=\"validation_classification_error\")\n", |
677 | 677 | "plt.title(\"Covertype Deep Learner (Tuned)\")\n", |
678 | 678 | "plt.legend();" |
679 | 679 | ] |
|
0 commit comments