|
541 | 541 | "id": "oEWYHNt4eOKD"
|
542 | 542 | },
|
543 | 543 | "source": [
|
544 |
| - "In TensorFlow 1, you could use `tf.estimator.BoostedTreesEstimator` to create a baseline to create a baseline Gradient Boosting model using an ensemble of decision trees for regression and classification problems. This functionality is not included in TensorFlow 2." |
| 544 | + "In TensorFlow 1, you could use `tf.estimator.BoostedTreesEstimator` to create a baseline to create a baseline Gradient Boosting model using an ensemble of decision trees for regression and classification problems. This functionality is no longer included in TensorFlow 2." |
545 | 545 | ]
|
546 | 546 | },
|
547 | 547 | {
|
548 |
| - "cell_type": "code", |
549 |
| - "execution_count": null, |
| 548 | + "cell_type": "markdown", |
550 | 549 | "metadata": {
|
551 |
| - "id": "uBIURLLMeOKE" |
| 550 | + "id": "wliVIER1jLnA" |
552 | 551 | },
|
553 |
| - "outputs": [], |
554 | 552 | "source": [
|
555 |
| - "# bt_estimator = tf1.estimator.BoostedTreesEstimator(\n", |
556 |
| - "# head=tf.estimator.BinaryClassHead(),\n", |
557 |
| - "# n_batches_per_layer=1,\n", |
558 |
| - "# max_depth=10,\n", |
559 |
| - "# n_trees=1000,\n", |
560 |
| - "# feature_columns=feature_columns)" |
| 553 | + "```\n", |
| 554 | + "bt_estimator = tf1.estimator.BoostedTreesEstimator(\n", |
| 555 | + " head=tf.estimator.BinaryClassHead(),\n", |
| 556 | + " n_batches_per_layer=1,\n", |
| 557 | + " max_depth=10,\n", |
| 558 | + " n_trees=1000,\n", |
| 559 | + " feature_columns=feature_columns)\n", |
| 560 | + "```" |
561 | 561 | ]
|
562 | 562 | },
|
563 | 563 | {
|
564 |
| - "cell_type": "code", |
565 |
| - "execution_count": null, |
| 564 | + "cell_type": "markdown", |
566 | 565 | "metadata": {
|
567 |
| - "id": "MUo5omt3eOKE" |
| 566 | + "id": "-K87uBrZjR0u" |
568 | 567 | },
|
569 |
| - "outputs": [], |
570 | 568 | "source": [
|
571 |
| - "# bt_estimator.train(input_fn=_input_fn, steps=1000)\n", |
572 |
| - "# bt_estimator.evaluate(input_fn=_eval_input_fn, steps=100)" |
| 569 | + "```\n", |
| 570 | + "bt_estimator.train(input_fn=_input_fn, steps=1000)\n", |
| 571 | + "bt_estimator.evaluate(input_fn=_eval_input_fn, steps=100)\n", |
| 572 | + "```" |
573 | 573 | ]
|
574 | 574 | },
|
575 | 575 | {
|
|
666 | 666 | "colab": {
|
667 | 667 | "collapsed_sections": [],
|
668 | 668 | "name": "canned_estimators.ipynb",
|
| 669 | + "provenance": [], |
669 | 670 | "toc_visible": true
|
670 | 671 | },
|
671 | 672 | "kernelspec": {
|
|
0 commit comments