From 29ed6fd9be7cbfedbee588ce28c81d118a77d1d6 Mon Sep 17 00:00:00 2001 From: mhjensen Date: Fri, 8 Nov 2019 06:41:51 +0100 Subject: [PATCH] added examples --- .../html/._DecisionTrees-bs000.html | 26 ++- .../html/._DecisionTrees-bs001.html | 26 ++- .../html/._DecisionTrees-bs002.html | 26 ++- .../html/._DecisionTrees-bs003.html | 26 ++- .../html/._DecisionTrees-bs004.html | 26 ++- .../html/._DecisionTrees-bs005.html | 26 ++- .../html/._DecisionTrees-bs006.html | 26 ++- .../html/._DecisionTrees-bs007.html | 26 ++- .../html/._DecisionTrees-bs008.html | 26 ++- .../html/._DecisionTrees-bs009.html | 26 ++- .../html/._DecisionTrees-bs010.html | 26 ++- .../html/._DecisionTrees-bs011.html | 26 ++- .../html/._DecisionTrees-bs012.html | 26 ++- .../html/._DecisionTrees-bs013.html | 26 ++- .../html/._DecisionTrees-bs014.html | 26 ++- .../html/._DecisionTrees-bs015.html | 26 ++- .../html/._DecisionTrees-bs016.html | 26 ++- .../html/._DecisionTrees-bs017.html | 26 ++- .../html/._DecisionTrees-bs018.html | 26 ++- .../html/._DecisionTrees-bs019.html | 26 ++- .../html/._DecisionTrees-bs020.html | 26 ++- .../html/._DecisionTrees-bs021.html | 26 ++- .../html/._DecisionTrees-bs022.html | 26 ++- .../html/._DecisionTrees-bs023.html | 26 ++- .../html/._DecisionTrees-bs024.html | 26 ++- .../html/._DecisionTrees-bs025.html | 26 ++- .../html/._DecisionTrees-bs026.html | 26 ++- .../html/._DecisionTrees-bs027.html | 26 ++- .../html/._DecisionTrees-bs028.html | 26 ++- .../html/._DecisionTrees-bs029.html | 26 ++- .../html/._DecisionTrees-bs030.html | 26 ++- .../html/._DecisionTrees-bs031.html | 26 ++- .../html/._DecisionTrees-bs032.html | 26 ++- .../html/._DecisionTrees-bs033.html | 26 ++- .../html/._DecisionTrees-bs034.html | 26 ++- .../html/._DecisionTrees-bs035.html | 26 ++- .../html/._DecisionTrees-bs036.html | 26 ++- .../html/._DecisionTrees-bs037.html | 26 ++- .../html/._DecisionTrees-bs038.html | 26 ++- .../html/._DecisionTrees-bs039.html | 26 ++- .../html/._DecisionTrees-bs040.html | 26 ++- .../html/._DecisionTrees-bs041.html | 26 ++- .../html/._DecisionTrees-bs042.html | 26 ++- .../html/._DecisionTrees-bs043.html | 26 ++- .../html/._DecisionTrees-bs044.html | 26 ++- .../html/._DecisionTrees-bs045.html | 26 ++- .../html/._DecisionTrees-bs046.html | 26 ++- .../html/._DecisionTrees-bs047.html | 26 ++- .../html/._DecisionTrees-bs048.html | 26 ++- .../html/._DecisionTrees-bs049.html | 26 ++- .../html/._DecisionTrees-bs050.html | 28 ++- .../html/._DecisionTrees-bs051.html | 25 +- .../html/._DecisionTrees-bs052.html | 29 ++- .../html/._DecisionTrees-bs053.html | 25 +- .../html/._DecisionTrees-bs054.html | 28 ++- .../html/._DecisionTrees-bs055.html | 27 ++- .../html/._DecisionTrees-bs056.html | 140 +++++------- .../html/._DecisionTrees-bs057.html | 77 +++++-- .../DecisionTrees/html/DecisionTrees-bs.html | 26 ++- .../html/DecisionTrees-reveal.html | 199 +++++++++------- .../html/DecisionTrees-solarized.html | 213 ++++++++++-------- doc/pub/DecisionTrees/html/DecisionTrees.html | 213 ++++++++++-------- .../DecisionTrees/ipynb/DecisionTrees.ipynb | 203 ++++++++++------- .../ipynb/ipynb-DecisionTrees-src.tar.gz | Bin 294061 -> 294061 bytes .../pdf/DecisionTrees-minted.pdf | Bin 538479 -> 538425 bytes doc/src/DecisionTrees/DecisionTrees.do.txt | 193 +++++++++------- doc/src/DecisionTrees/Programs/gdclas.py | 37 +++ doc/src/DecisionTrees/Programs/gdreg.py | 48 ++++ doc/src/DecisionTrees/Programs/xgcancer.py | 17 +- 69 files changed, 1778 insertions(+), 1050 deletions(-) create mode 100644 doc/src/DecisionTrees/Programs/gdclas.py create mode 100644 doc/src/DecisionTrees/Programs/gdreg.py diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs000.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs000.html index d31b30fcf..e0e5b5550 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs000.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs000.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -296,7 +304,7 @@ MathJax.Hub.Config({
  • 9
  • 10
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs001.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs001.html index 2afd33009..a888defaf 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs001.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs001.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -301,7 +309,7 @@ given some assumptions, make predictions about the target feature value
  • 10
  • 11
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs002.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs002.html index cbbd1c968..6f298e5ea 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs002.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs002.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -279,7 +287,7 @@ This tree was produced using the Wisconsin cancer data (discussed here as well,
  • 11
  • 12
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs003.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs003.html index 51832aeb7..7063f5a1c 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs003.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs003.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -287,7 +295,7 @@ node.
  • 12
  • 13
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs004.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs004.html index 8e264322d..d0fce1a33 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs004.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs004.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -288,7 +296,7 @@ Then we are essentially done!
  • 13
  • 14
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs005.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs005.html index 22decf3ee..bf7a721b9 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs005.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs005.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -367,7 +375,7 @@ plt.show()
  • 14
  • 15
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs006.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs006.html index 8b2fea7d8..be9495135 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs006.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs006.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -300,7 +308,7 @@ within box \( j \).
  • 15
  • 16
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs007.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs007.html index 80384b7ee..ae6d1fb91 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs007.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs007.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -292,7 +300,7 @@ better tree in some future step.
  • 16
  • 17
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs008.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs008.html index 862c152bb..00d431a57 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs008.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs008.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -325,7 +333,7 @@ region contains more than five observations.
  • 17
  • 18
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs009.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs009.html index 63c607dba..60b0c27b8 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs009.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs009.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -294,7 +302,7 @@ parameter \( \alpha \).
  • 18
  • 19
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs010.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs010.html index 4d2c470ea..57b04a8ba 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs010.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs010.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -307,7 +315,7 @@ subtree corresponding to \( \alpha \).
  • 19
  • 20
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs011.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs011.html index a0dfc1482..e77203ccb 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs011.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs011.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -303,7 +311,7 @@ MathJax.Hub.Config({
  • 20
  • 21
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs012.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs012.html index 307928c3b..17c28772e 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs012.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs012.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -295,7 +303,7 @@ fall into that region.
  • 21
  • 22
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs013.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs013.html index e83a0edee..2d70d5ee0 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs013.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs013.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -300,7 +308,7 @@ than is the classification error rate.
  • 22
  • 23
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs014.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs014.html index 1b54b1216..ae7f566e4 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs014.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs014.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -326,7 +334,7 @@ $$
  • 23
  • 24
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs015.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs015.html index f3b7886b8..ef768d85b 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs015.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs015.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -317,7 +325,7 @@ os.system(cmd)
  • 24
  • 25
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs016.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs016.html index db70db9c3..d8760b22f 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs016.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs016.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -308,7 +316,7 @@ os.system(cmd)
  • 25
  • 26
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs017.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs017.html index 97c12abd8..08a95f228 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs017.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs017.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -291,7 +299,7 @@ We discuss both algorithms with applications here. The popular library Scikit
  • 26
  • 27
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs018.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs018.html index 155449b1c..64712ebdf 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs018.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs018.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -281,7 +289,7 @@ MathJax.Hub.Config({
  • 27
  • 28
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs019.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs019.html index 87963dc06..82cbc14f8 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs019.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs019.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -281,7 +289,7 @@ MathJax.Hub.Config({
  • 28
  • 29
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs020.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs020.html index 320ecdc88..2a01165ad 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs020.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs020.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -321,7 +329,7 @@ The table here summarizes the various attributes and
  • 29
  • 30
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs021.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs021.html index f3ae0716d..68aad3519 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs021.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs021.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -352,7 +360,7 @@ os.system(cmd)
  • 30
  • 31
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs022.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs022.html index f0bb8b8cc..70628a021 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs022.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs022.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -354,7 +362,7 @@ split = get_split(dataset)
  • 31
  • 32
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs023.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs023.html index 5b989bab8..aaeccf360 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs023.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs023.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -312,7 +320,7 @@ attributes at each step while growing the tree.
  • 32
  • 33
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs024.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs024.html index dde04c8bf..025cd50cf 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs024.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs024.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -472,7 +480,7 @@ MathJax.Hub.Config({
  • 33
  • 34
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs025.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs025.html index 789101480..3f35cd4cd 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs025.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs025.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -325,7 +333,7 @@ deep_tree_clf.fit(X_train_scaled, y_train)
  • 34
  • 35
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs026.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs026.html index 278ccd3ac..688a8b7cf 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs026.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs026.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -348,7 +356,7 @@ plt.show()
  • 35
  • 36
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs027.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs027.html index 24fde23be..90d8e8172 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs027.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs027.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -304,7 +312,7 @@ plt.show()
  • 36
  • 37
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs028.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs028.html index 464a8b414..8b34df1b5 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs028.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs028.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -298,7 +306,7 @@ tree_reg.fit(X, y)
  • 37
  • 38
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs029.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs029.html index 873ef4b6d..77ddfe102 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs029.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs029.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -354,7 +362,7 @@ plt.show()
  • 38
  • 39
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs030.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs030.html index e22c46713..02e29297d 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs030.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs030.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -290,7 +298,7 @@ MathJax.Hub.Config({
  • 39
  • 40
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs031.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs031.html index 535763ff4..5287de334 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs031.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs031.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -293,7 +301,7 @@ However, by aggregating many decision trees, using methods like bagging, random
  • 40
  • 41
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs032.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs032.html index 4aa7638b3..d48fa8fa2 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs032.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs032.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -300,7 +308,7 @@ We discuss these methods here.
  • 41
  • 42
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs033.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs033.html index 8115eb7f9..92d3900c4 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs033.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs033.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -284,7 +292,7 @@ MathJax.Hub.Config({
  • 42
  • 43
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs034.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs034.html index f96456a4e..1d797fbef 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs034.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs034.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -295,7 +303,7 @@ learning method.
  • 43
  • 44
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs035.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs035.html index 45b0f7be8..34a2b635b 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs035.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs035.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -305,7 +313,7 @@ predictor, averaged over all \( B \) trees.
  • 44
  • 45
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs036.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs036.html index 052c35278..eace42fbd 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs036.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs036.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -296,7 +304,7 @@ plt.show()
  • 45
  • 46
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs037.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs037.html index f17c49156..4b2d4e885 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs037.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs037.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -327,7 +335,7 @@ voting_clf.fit(X_train, y_train)
  • 46
  • 47
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs038.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs038.html index 98e569faf..3906f7550 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs038.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs038.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -334,7 +342,7 @@ voting_clf.fit(X_train, y_train)
  • 47
  • 48
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs039.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs039.html index 96ba695ca..bcad02a86 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs039.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs039.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -337,7 +345,7 @@ plt.show()
  • 48
  • 49
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs040.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs040.html index 614a4fd0e..29ad457ea 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs040.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs040.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -335,7 +343,7 @@ plt.show()
  • 49
  • 50
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs041.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs041.html index a17eb4c62..39ad88d78 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs041.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs041.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -320,7 +328,7 @@ this setting.
  • 50
  • 51
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs042.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs042.html index b0e4b74ca..4ad66132f 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs042.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs042.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -302,7 +310,7 @@ We will grow of forest of say \( M \) trees.
  • 51
  • 52
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs043.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs043.html index f01bfcb7c..562b96059 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs043.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs043.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -349,7 +357,7 @@ plt.show()
  • 52
  • 53
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs044.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs044.html index 70c1bc490..8c72f9d61 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs044.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs044.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -298,7 +306,7 @@ np.sum(y_pred =
  • 53
  • 54
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs045.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs045.html index bf01d5de8..8fba28c37 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs045.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs045.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -293,7 +301,7 @@ them with a factor.
  • 54
  • 55
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs046.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs046.html index 4684f6bfa..4e99b9984 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs046.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs046.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -316,7 +324,7 @@ In iterative fitting or additive modeling, we minimize the cost function with re
  • 55
  • 56
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs047.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs047.html index 434279628..3e5ad4023 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs047.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs047.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -299,7 +307,7 @@ We could use any of the algorithms we have discussed till now. If we use trees,
  • 56
  • 57
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs048.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs048.html index 53c3c256c..4f7c2eaa4 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs048.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs048.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -310,7 +318,7 @@ $$
  • 57
  • 58
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs049.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs049.html index f4c85b9db..6e932b87b 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs049.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs049.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -304,7 +312,7 @@ where we have defined \( w_i^m= \exp{-(y_if_{m-1}(x_i))} \).
  • 58
  • 59
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs050.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs050.html index 5d38dfcdb..0fb2ffda3 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs050.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs050.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -281,7 +289,7 @@ $$ where we have redefined the error as $$ -\mathrm{\overline{err}}_m=\frac{1}{n}\frac{\sum_{i=0}^{n-1}w_i^mI(y_i\ne G(\boldsymbol{X}_{i*})}{\sum_{i=0}^{n-1}w_i^m}, +\mathrm{\overline{err}}_m=\frac{1}{n}\frac{\sum_{i=0}^{n-1}w_i^mI(y_i\ne G(x_i)}{\sum_{i=0}^{n-1}w_i^m}, $$ which leads to an update of @@ -318,6 +326,8 @@ $$
  • 58
  • 59
  • 60
  • +
  • ...
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs051.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs051.html index c59656a50..e13bc2556 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs051.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs051.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -296,6 +304,7 @@ where the function \( I() \) is one if we misclassify and zero if we classify co
  • 58
  • 59
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs052.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs052.html index 025ffee3a..0273afd61 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs052.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs052.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -265,7 +273,7 @@ The basic idea is to set up weights which will be used to scale the correctly cl $$ -\mathrm{err}=\frac{\sum_{i=0}^{n-1}w_iI(y_i\ne G(x_i})}{\sum_{i=0}^{n-1}w_i}, +\mathrm{\overline{err}}_m=\frac{\sum_{i=0}^{n-1}w_i^m I(y_i\ne G(x_i))}{\sum_{i=0}^{n-1}w_i}, $$ @@ -275,7 +283,7 @@ $$
    1. Fit then a given classifier to the training using the weights \( w_i \).
    2. Compute then \( \mathrm{err} \) and figure out which events are classified properly and which are classified wrongly.
    3. -
    4. Define a quantity \( \alpha_{m} = \log{(1-\mathrm{err})/\mathrm{err}} \)
    5. +
    6. Define a quantity \( \alpha_{m} = \log{(1-\mathrm{\overline{err}}_m)/\mathrm{\overline{err}}_m} \)
    7. Set the new weights to \( w_i = w_i\times \exp{(\alpha_m I(y_i\ne G(x_i)} \).
    @@ -313,6 +321,7 @@ observations that are missed in the previous iterations.
  • 58
  • 59
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs053.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs053.html index ee603a5aa..85f3962ed 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs053.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs053.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -305,6 +313,7 @@ plt.show()
  • 58
  • 59
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs054.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs054.html index d9a967a93..06730e732 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs054.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs054.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -265,6 +273,9 @@ In order to understand the method, let us illustrate its basics by bringing back the essential steps in linear regression, where our cost function was the least squares function. +

    +See discussion during lecture November 8. +

    @@ -286,6 +297,7 @@ function was the least squares function.

  • 58
  • 59
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs055.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs055.html index 29892cfcd..c7df4254c 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs055.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs055.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -269,7 +277,7 @@ The way we proceed in an iterative fashion is to
  • For \( m=1:M \), we
      -
    1. compute the negative gradient vector \( \boldsymbol{u}_m = -\partial C(\boldsymbol{y},\boldsymbol{f})/\partial \boldsymbol{f}(x) \) at $f(x) = f_{m-1}(x);
    2. +
    3. compute the negative gradient vector \( \boldsymbol{u}_m = -\partial C(\boldsymbol{y},\boldsymbol{f})/\partial \boldsymbol{f}(x) \) at \( f(x) = f_{m-1}(x) \);
    4. fit the so-called base-learner to the negative gradient \( h_m(u_m,x) \);
    5. update the estimate \( f_m(x) = f_{m-1}(x)+\nu h_m(u_m,x) \);
    @@ -296,6 +304,7 @@ The way we proceed in an iterative fashion is to
  • 58
  • 59
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs056.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs056.html index 3f89e4212..dce64e77d 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs056.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs056.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -253,91 +261,54 @@ MathJax.Hub.Config({ -

    Gradient Boosting, Examples

    +

    Gradient Boosting, Examples of Regression

    -

    np.random.seed(42)
    -X = np.random.rand(100, 1) - 0.5
    -y = 3*X[:, 0]**2 + 0.05 * np.random.randn(100)
    -
    -from sklearn.tree import DecisionTreeRegressor
    -
    -tree_reg1 = DecisionTreeRegressor(max_depth=2, random_state=42)
    -tree_reg1.fit(X, y)
    -
    -y2 = y - tree_reg1.predict(X)
    -tree_reg2 = DecisionTreeRegressor(max_depth=2, random_state=42)
    -tree_reg2.fit(X, y2)
    -
    -y3 = y2 - tree_reg2.predict(X)
    -tree_reg3 = DecisionTreeRegressor(max_depth=2, random_state=42)
    -tree_reg3.fit(X, y3)
    -
    -X_new = np.array([[0.8]])
    -y_pred = sum(tree.predict(X_new) for tree in (tree_reg1, tree_reg2, tree_reg3))
    -
    -def plot_predictions(regressors, X, y, axes, label=None, style="r-", data_style="b.", data_label=None):
    -    x1 = np.linspace(axes[0], axes[1], 500)
    -    y_pred = sum(regressor.predict(x1.reshape(-1, 1)) for regressor in regressors)
    -    plt.plot(X[:, 0], y, data_style, label=data_label)
    -    plt.plot(x1, y_pred, style, linewidth=2, label=label)
    -    if label or data_label:
    -        plt.legend(loc="upper center", fontsize=16)
    -    plt.axis(axes)
    -
    -plt.figure(figsize=(11,11))
    -
    -plt.subplot(321)
    -plot_predictions([tree_reg1], X, y, axes=[-0.5, 0.5, -0.1, 0.8], label="$h_1(x_1)$", style="g-", data_label="Training set")
    -plt.ylabel("$y$", fontsize=16, rotation=0)
    -plt.title("Residuals and tree predictions", fontsize=16)
    -
    -plt.subplot(322)
    -plot_predictions([tree_reg1], X, y, axes=[-0.5, 0.5, -0.1, 0.8], label="$h(x_1) = h_1(x_1)$", data_label="Training set")
    -plt.ylabel("$y$", fontsize=16, rotation=0)
    -plt.title("Ensemble predictions", fontsize=16)
    -
    -plt.subplot(323)
    -plot_predictions([tree_reg2], X, y2, axes=[-0.5, 0.5, -0.5, 0.5], label="$h_2(x_1)$", style="g-", data_style="k+", data_label="Residuals")
    -plt.ylabel("$y - h_1(x_1)$", fontsize=16)
    -
    -plt.subplot(324)
    -plot_predictions([tree_reg1, tree_reg2], X, y, axes=[-0.5, 0.5, -0.1, 0.8], label="$h(x_1) = h_1(x_1) + h_2(x_1)$")
    -plt.ylabel("$y$", fontsize=16, rotation=0)
    -
    -plt.subplot(325)
    -plot_predictions([tree_reg3], X, y3, axes=[-0.5, 0.5, -0.5, 0.5], label="$h_3(x_1)$", style="g-", data_style="k+")
    -plt.ylabel("$y - h_1(x_1) - h_2(x_1)$", fontsize=16)
    -plt.xlabel("$x_1$", fontsize=16)
    -
    -plt.subplot(326)
    -plot_predictions([tree_reg1, tree_reg2, tree_reg3], X, y, axes=[-0.5, 0.5, -0.1, 0.8], label="$h(x_1) = h_1(x_1) + h_2(x_1) + h_3(x_1)$")
    -plt.xlabel("$x_1$", fontsize=16)
    -plt.ylabel("$y$", fontsize=16, rotation=0)
    -
    -save_fig("gradient_boosting_plot")
    -plt.show()
    -
    +
    import matplotlib.pyplot as plt
    +import numpy as np
    +from sklearn.model_selection import train_test_split
     from sklearn.ensemble import GradientBoostingRegressor
    +from sklearn.preprocessing import StandardScaler
    +import scikitplot as skplt
    +from sklearn.metrics import mean_squared_error
     
    -gbrt = GradientBoostingRegressor(max_depth=2, n_estimators=3, learning_rate=1.0, random_state=42)
    -gbrt.fit(X, y)
    +n = 100
    +maxdegree = 6
     
    -gbrt_slow = GradientBoostingRegressor(max_depth=2, n_estimators=200, learning_rate=0.1, random_state=42)
    -gbrt_slow.fit(X, y)
    +# Make data set.
    +x = np.linspace(-3, 3, n).reshape(-1, 1)
    +y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.normal(0, 0.1, x.shape)
     
    -plt.figure(figsize=(11,4))
    +error = np.zeros(maxdegree)
    +bias = np.zeros(maxdegree)
    +variance = np.zeros(maxdegree)
    +polydegree = np.zeros(maxdegree)
    +X_train, X_test, y_train, y_test = train_test_split(x, y, test_size=0.2)
    +scaler = StandardScaler()
    +scaler.fit(X_train)
    +X_train_scaled = scaler.transform(X_train)
    +X_test_scaled = scaler.transform(X_test)
     
    -plt.subplot(121)
    -plot_predictions([gbrt], X, y, axes=[-0.5, 0.5, -0.1, 0.8], label="Ensemble predictions")
    -plt.title("learning_rate={}, n_estimators={}".format(gbrt.learning_rate, gbrt.n_estimators), fontsize=14)
    +for degree in range(1,maxdegree):
    +    model = GradientBoostingRegressor(max_depth=degree, n_estimators=100, learning_rate=1.0)  
    +    model.fit(X_train_scaled,y_train)
    +    y_pred = model.predict(X_test_scaled)
    +    polydegree[degree] = degree
    +    error[degree] = np.mean( np.mean((y_test - y_pred)**2) )
    +    bias[degree] = np.mean( (y_test - np.mean(y_pred))**2 )
    +    variance[degree] = np.mean( np.var(y_pred) )
    +    print('Max depth:', degree)
    +    print('Error:', error[degree])
    +    print('Bias^2:', bias[degree])
    +    print('Var:', variance[degree])
    +    print('{} >= {} + {} = {}'.format(error[degree], bias[degree], variance[degree], bias[degree]+variance[degree]))
     
    -plt.subplot(122)
    -plot_predictions([gbrt_slow], X, y, axes=[-0.5, 0.5, -0.1, 0.8])
    -plt.title("learning_rate={}, n_estimators={}".format(gbrt_slow.learning_rate, gbrt_slow.n_estimators), fontsize=14)
    -
    -save_fig("gbrt_learning_rate_plot")
    +plt.xlim(1,maxdegree-1)
    +plt.plot(polydegree, error, label='Error')
    +plt.plot(polydegree, bias, label='bias')
    +plt.plot(polydegree, variance, label='Variance')
    +plt.legend()
     plt.show()
     

    @@ -359,6 +330,7 @@ plt.show()

  • 58
  • 59
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/._DecisionTrees-bs057.html b/doc/pub/DecisionTrees/html/._DecisionTrees-bs057.html index ed0000d63..92b6b8885 100644 --- a/doc/pub/DecisionTrees/html/._DecisionTrees-bs057.html +++ b/doc/pub/DecisionTrees/html/._DecisionTrees-bs057.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -253,24 +261,48 @@ MathJax.Hub.Config({ -

    XGBoost: Extreme Gradient Boosting

    - +

    Gradient Boosting, Examples of Classification

    -XGBoost or Extreme Gradient -Boosting, is an optimized distributed gradient boosting library -designed to be highly efficient, flexible and portable. It implements -machine learning algorithms under the Gradient Boosting -framework. XGBoost provides a parallel tree boosting that solve many -data science problems in a fast and accurate way. See the article by Chen and Guestrin. -

    -The authors design and build a highly scalable end-to-end tree -boosting system. It has a theoretically justified weighted quantile -sketch for efficient proposal calculation. It introduces a novel sparsity-aware algorithm for parallel tree learning and an effective cache-aware block structure for out-of-core tree learning. + +

    import matplotlib.pyplot as plt
    +import numpy as np
    +from sklearn.model_selection import  train_test_split 
    +from sklearn.datasets import load_breast_cancer
    +import scikitplot as skplt
    +from sklearn.ensemble import GradientBoostingClassifier
    +from sklearn.model_selection import cross_validate
     
    -

    -It is now the algorithm which wins essentially all ML competitions!!! +# Load the data +cancer = load_breast_cancer() +X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0) +print(X_train.shape) +print(X_test.shape) +#now scale the data +from sklearn.preprocessing import StandardScaler +scaler = StandardScaler() +scaler.fit(X_train) +X_train_scaled = scaler.transform(X_train) +X_test_scaled = scaler.transform(X_test) + +gd_clf = GradientBoostingClassifier(max_depth=3, n_estimators=100, learning_rate=1.0) +gd_clf.fit(X_train_scaled, y_train) +#Cross validation +accuracy = cross_validate(gd_clf,X_test_scaled,y_test,cv=10)['test_score'] +print(accuracy) +print("Test set accuracy with Random Forests and scaled data: {:.2f}".format(gd_clf.score(X_test_scaled,y_test))) + +import scikitplot as skplt +y_pred = gd_clf.predict(X_test_scaled) +skplt.metrics.plot_confusion_matrix(y_test, y_pred, normalize=True) +plt.show() +y_probas = gd_clf.predict_proba(X_test_scaled) +skplt.metrics.plot_roc(y_test, y_probas) +plt.show() +skplt.metrics.plot_cumulative_gain(y_test, y_probas) +plt.show() +

    @@ -289,6 +321,7 @@ It is now the algorithm which wins essentially all ML competitions!!!

  • 58
  • 59
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/DecisionTrees-bs.html b/doc/pub/DecisionTrees/html/DecisionTrees-bs.html index d31b30fcf..e0e5b5550 100644 --- a/doc/pub/DecisionTrees/html/DecisionTrees-bs.html +++ b/doc/pub/DecisionTrees/html/DecisionTrees-bs.html @@ -138,10 +138,17 @@ Automatically generated HTML file from DocOnce source ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -234,10 +241,11 @@ MathJax.Hub.Config({
  • AdaBoost Examples
  • Gradient boosting: Basics
  • Gradient Boosting, algorithm
  • -
  • Gradient Boosting, Examples
  • -
  • XGBoost: Extreme Gradient Boosting
  • -
  • Regression Case
  • -
  • Xgboost on the Cancer Data
  • +
  • Gradient Boosting, Examples of Regression
  • +
  • Gradient Boosting, Examples of Classification
  • +
  • XGBoost: Extreme Gradient Boosting
  • +
  • Regression Case
  • +
  • Xgboost on the Cancer Data
  • @@ -296,7 +304,7 @@ MathJax.Hub.Config({
  • 9
  • 10
  • ...
  • -
  • 60
  • +
  • 61
  • »
  • diff --git a/doc/pub/DecisionTrees/html/DecisionTrees-reveal.html b/doc/pub/DecisionTrees/html/DecisionTrees-reveal.html index cb3a30ebc..64672f5a8 100644 --- a/doc/pub/DecisionTrees/html/DecisionTrees-reveal.html +++ b/doc/pub/DecisionTrees/html/DecisionTrees-reveal.html @@ -2150,7 +2150,7 @@ $$ where we have redefined the error as

     
    $$ -\mathrm{\overline{err}}_m=\frac{1}{n}\frac{\sum_{i=0}^{n-1}w_i^mI(y_i\ne G(\boldsymbol{X}_{i*})}{\sum_{i=0}^{n-1}w_i^m}, +\mathrm{\overline{err}}_m=\frac{1}{n}\frac{\sum_{i=0}^{n-1}w_i^mI(y_i\ne G(x_i)}{\sum_{i=0}^{n-1}w_i^m}, $$

     
    @@ -2207,7 +2207,7 @@ The basic idea is to set up weights which will be used to scale the correctly cl

     
    $$ -\mathrm{err}=\frac{\sum_{i=0}^{n-1}w_iI(y_i\ne G(x_i})}{\sum_{i=0}^{n-1}w_i}, +\mathrm{\overline{err}}_m=\frac{\sum_{i=0}^{n-1}w_i^m I(y_i\ne G(x_i))}{\sum_{i=0}^{n-1}w_i}, $$

     
    @@ -2218,7 +2218,7 @@ $$

    1. Fit then a given classifier to the training using the weights \( w_i \).
    2. Compute then \( \mathrm{err} \) and figure out which events are classified properly and which are classified wrongly.
    3. -

    4. Define a quantity \( \alpha_{m} = \log{(1-\mathrm{err})/\mathrm{err}} \)
    5. +

    6. Define a quantity \( \alpha_{m} = \log{(1-\mathrm{\overline{err}}_m)/\mathrm{\overline{err}}_m} \)
    7. Set the new weights to \( w_i = w_i\times \exp{(\alpha_m I(y_i\ne G(x_i)} \).

  • Compute the new classifier \( G(x)= \sum_{i=0}^{n-1}\alpha_m I(y_i\ne G(x_i) \).
  • @@ -2281,6 +2281,9 @@ method via a series of iterations. In order to understand the method, let us illustrate its basics by bringing back the essential steps in linear regression, where our cost function was the least squares function. + +

    +See discussion during lecture November 8. @@ -2303,7 +2306,7 @@ The way we proceed in an iterative fashion is to

  • For \( m=1:M \), we
      -

    1. compute the negative gradient vector \( \boldsymbol{u}_m = -\partial C(\boldsymbol{y},\boldsymbol{f})/\partial \boldsymbol{f}(x) \) at $f(x) = f_{m-1}(x);
    2. +

    3. compute the negative gradient vector \( \boldsymbol{u}_m = -\partial C(\boldsymbol{y},\boldsymbol{f})/\partial \boldsymbol{f}(x) \) at \( f(x) = f_{m-1}(x) \);
    4. fit the so-called base-learner to the negative gradient \( h_m(u_m,x) \);
    5. update the estimate \( f_m(x) = f_{m-1}(x)+\nu h_m(u_m,x) \);
    @@ -2313,98 +2316,107 @@ The way we proceed in an iterative fashion is to
    -

    Gradient Boosting, Examples

    +

    Gradient Boosting, Examples of Regression

    -

    np.random.seed(42)
    -X = np.random.rand(100, 1) - 0.5
    -y = 3*X[:, 0]**2 + 0.05 * np.random.randn(100)
    -
    -from sklearn.tree import DecisionTreeRegressor
    -
    -tree_reg1 = DecisionTreeRegressor(max_depth=2, random_state=42)
    -tree_reg1.fit(X, y)
    -
    -y2 = y - tree_reg1.predict(X)
    -tree_reg2 = DecisionTreeRegressor(max_depth=2, random_state=42)
    -tree_reg2.fit(X, y2)
    -
    -y3 = y2 - tree_reg2.predict(X)
    -tree_reg3 = DecisionTreeRegressor(max_depth=2, random_state=42)
    -tree_reg3.fit(X, y3)
    -
    -X_new = np.array([[0.8]])
    -y_pred = sum(tree.predict(X_new) for tree in (tree_reg1, tree_reg2, tree_reg3))
    -
    -def plot_predictions(regressors, X, y, axes, label=None, style="r-", data_style="b.", data_label=None):
    -    x1 = np.linspace(axes[0], axes[1], 500)
    -    y_pred = sum(regressor.predict(x1.reshape(-1, 1)) for regressor in regressors)
    -    plt.plot(X[:, 0], y, data_style, label=data_label)
    -    plt.plot(x1, y_pred, style, linewidth=2, label=label)
    -    if label or data_label:
    -        plt.legend(loc="upper center", fontsize=16)
    -    plt.axis(axes)
    -
    -plt.figure(figsize=(11,11))
    -
    -plt.subplot(321)
    -plot_predictions([tree_reg1], X, y, axes=[-0.5, 0.5, -0.1, 0.8], label="$h_1(x_1)$", style="g-", data_label="Training set")
    -plt.ylabel("$y$", fontsize=16, rotation=0)
    -plt.title("Residuals and tree predictions", fontsize=16)
    -
    -plt.subplot(322)
    -plot_predictions([tree_reg1], X, y, axes=[-0.5, 0.5, -0.1, 0.8], label="$h(x_1) = h_1(x_1)$", data_label="Training set")
    -plt.ylabel("$y$", fontsize=16, rotation=0)
    -plt.title("Ensemble predictions", fontsize=16)
    -
    -plt.subplot(323)
    -plot_predictions([tree_reg2], X, y2, axes=[-0.5, 0.5, -0.5, 0.5], label="$h_2(x_1)$", style="g-", data_style="k+", data_label="Residuals")
    -plt.ylabel("$y - h_1(x_1)$", fontsize=16)
    -
    -plt.subplot(324)
    -plot_predictions([tree_reg1, tree_reg2], X, y, axes=[-0.5, 0.5, -0.1, 0.8], label="$h(x_1) = h_1(x_1) + h_2(x_1)$")
    -plt.ylabel("$y$", fontsize=16, rotation=0)
    -
    -plt.subplot(325)
    -plot_predictions([tree_reg3], X, y3, axes=[-0.5, 0.5, -0.5, 0.5], label="$h_3(x_1)$", style="g-", data_style="k+")
    -plt.ylabel("$y - h_1(x_1) - h_2(x_1)$", fontsize=16)
    -plt.xlabel("$x_1$", fontsize=16)
    -
    -plt.subplot(326)
    -plot_predictions([tree_reg1, tree_reg2, tree_reg3], X, y, axes=[-0.5, 0.5, -0.1, 0.8], label="$h(x_1) = h_1(x_1) + h_2(x_1) + h_3(x_1)$")
    -plt.xlabel("$x_1$", fontsize=16)
    -plt.ylabel("$y$", fontsize=16, rotation=0)
    -
    -save_fig("gradient_boosting_plot")
    -plt.show()
    -
    +
    import matplotlib.pyplot as plt
    +import numpy as np
    +from sklearn.model_selection import train_test_split
     from sklearn.ensemble import GradientBoostingRegressor
    +from sklearn.preprocessing import StandardScaler
    +import scikitplot as skplt
    +from sklearn.metrics import mean_squared_error
     
    -gbrt = GradientBoostingRegressor(max_depth=2, n_estimators=3, learning_rate=1.0, random_state=42)
    -gbrt.fit(X, y)
    +n = 100
    +maxdegree = 6
     
    -gbrt_slow = GradientBoostingRegressor(max_depth=2, n_estimators=200, learning_rate=0.1, random_state=42)
    -gbrt_slow.fit(X, y)
    +# Make data set.
    +x = np.linspace(-3, 3, n).reshape(-1, 1)
    +y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.normal(0, 0.1, x.shape)
     
    -plt.figure(figsize=(11,4))
    +error = np.zeros(maxdegree)
    +bias = np.zeros(maxdegree)
    +variance = np.zeros(maxdegree)
    +polydegree = np.zeros(maxdegree)
    +X_train, X_test, y_train, y_test = train_test_split(x, y, test_size=0.2)
    +scaler = StandardScaler()
    +scaler.fit(X_train)
    +X_train_scaled = scaler.transform(X_train)
    +X_test_scaled = scaler.transform(X_test)
     
    -plt.subplot(121)
    -plot_predictions([gbrt], X, y, axes=[-0.5, 0.5, -0.1, 0.8], label="Ensemble predictions")
    -plt.title("learning_rate={}, n_estimators={}".format(gbrt.learning_rate, gbrt.n_estimators), fontsize=14)
    +for degree in range(1,maxdegree):
    +    model = GradientBoostingRegressor(max_depth=degree, n_estimators=100, learning_rate=1.0)  
    +    model.fit(X_train_scaled,y_train)
    +    y_pred = model.predict(X_test_scaled)
    +    polydegree[degree] = degree
    +    error[degree] = np.mean( np.mean((y_test - y_pred)**2) )
    +    bias[degree] = np.mean( (y_test - np.mean(y_pred))**2 )
    +    variance[degree] = np.mean( np.var(y_pred) )
    +    print('Max depth:', degree)
    +    print('Error:', error[degree])
    +    print('Bias^2:', bias[degree])
    +    print('Var:', variance[degree])
    +    print('{} >= {} + {} = {}'.format(error[degree], bias[degree], variance[degree], bias[degree]+variance[degree]))
     
    -plt.subplot(122)
    -plot_predictions([gbrt_slow], X, y, axes=[-0.5, 0.5, -0.1, 0.8])
    -plt.title("learning_rate={}, n_estimators={}".format(gbrt_slow.learning_rate, gbrt_slow.n_estimators), fontsize=14)
    -
    -save_fig("gbrt_learning_rate_plot")
    +plt.xlim(1,maxdegree-1)
    +plt.plot(polydegree, error, label='Error')
    +plt.plot(polydegree, bias, label='bias')
    +plt.plot(polydegree, variance, label='Variance')
    +plt.legend()
     plt.show()
     
    -

    XGBoost: Extreme Gradient Boosting

    +

    Gradient Boosting, Examples of Classification

    +

    + + +

    import matplotlib.pyplot as plt
    +import numpy as np
    +from sklearn.model_selection import  train_test_split 
    +from sklearn.datasets import load_breast_cancer
    +import scikitplot as skplt
    +from sklearn.ensemble import GradientBoostingClassifier
    +from sklearn.model_selection import cross_validate
    +
    +# Load the data
    +cancer = load_breast_cancer()
    +
    +X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0)
    +print(X_train.shape)
    +print(X_test.shape)
    +#now scale the data
    +from sklearn.preprocessing import StandardScaler
    +scaler = StandardScaler()
    +scaler.fit(X_train)
    +X_train_scaled = scaler.transform(X_train)
    +X_test_scaled = scaler.transform(X_test)
    +
    +gd_clf = GradientBoostingClassifier(max_depth=3, n_estimators=100, learning_rate=1.0)  
    +gd_clf.fit(X_train_scaled, y_train)
    +#Cross validation
    +accuracy = cross_validate(gd_clf,X_test_scaled,y_test,cv=10)['test_score']
    +print(accuracy)
    +print("Test set accuracy with Random Forests and scaled data: {:.2f}".format(gd_clf.score(X_test_scaled,y_test)))
    +
    +import scikitplot as skplt
    +y_pred = gd_clf.predict(X_test_scaled)
    +skplt.metrics.plot_confusion_matrix(y_test, y_pred, normalize=True)
    +plt.show()
    +y_probas = gd_clf.predict_proba(X_test_scaled)
    +skplt.metrics.plot_roc(y_test, y_probas)
    +plt.show()
    +skplt.metrics.plot_cumulative_gain(y_test, y_probas)
    +plt.show()
    +
    +
    + + +
    +

    XGBoost: Extreme Gradient Boosting

    XGBoost or Extreme Gradient @@ -2425,7 +2437,7 @@ It is now the algorithm which wins essentially all ML competitions!!!

    -

    Regression Case

    +

    Regression Case

    @@ -2456,8 +2468,8 @@ X_train_scaled = scaler.transform(X_train) X_test_scaled = scaler.transform(X_test) for degree in range(maxdegree): - model = xgb.XGBRegressor(objective ='reg:squarederror', colsample_bytree = 0.3, learning_rate = 0.1, - max_depth = degree, alpha = 10, n_estimators = 10) + model = xgb.XGBRegressor(objective ='reg:squarederror', colsaobjective ='reg:squarederror', colsample_bytree = 0.3, learning_rate = 0.1,max_depth = degree, alpha = 10, n_estimators = 200) + model.fit(X_train_scaled,y_train) y_pred = model.predict(X_test_scaled) polydegree[degree] = degree @@ -2481,7 +2493,7 @@ plt.show()

    -

    Xgboost on the Cancer Data

    +

    Xgboost on the Cancer Data

    @@ -2508,9 +2520,26 @@ X_test_scaled = scaler.transform(X_test) xg_clf = xgb.XGBClassifier() xg_clf.fit(X_train_scaled,y_train) + +y_test = xg_clf.predict(X_test_scaled) + +print("Test set accuracy with Random Forests and scaled data: {:.2f}".format(xg_clf.score(X_test_scaled,y_test))) + +import scikitplot as skplt +y_pred = xg_clf.predict(X_test_scaled) +skplt.metrics.plot_confusion_matrix(y_test, y_pred, normalize=True) +plt.show() +y_probas = xg_clf.predict_proba(X_test_scaled) +skplt.metrics.plot_roc(y_test, y_probas) +plt.show() +skplt.metrics.plot_cumulative_gain(y_test, y_probas) +plt.show() + + xgb.plot_tree(xg_clf,num_trees=0) plt.rcParams['figure.figsize'] = [50, 10] plt.show() + xgb.plot_importance(xg_clf) plt.rcParams['figure.figsize'] = [5, 5] plt.show() diff --git a/doc/pub/DecisionTrees/html/DecisionTrees-solarized.html b/doc/pub/DecisionTrees/html/DecisionTrees-solarized.html index 8c73017c1..70eb4082b 100644 --- a/doc/pub/DecisionTrees/html/DecisionTrees-solarized.html +++ b/doc/pub/DecisionTrees/html/DecisionTrees-solarized.html @@ -158,10 +158,17 @@ div { text-align: justify; text-justify: inter-word; } ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -2120,7 +2127,7 @@ $$ where we have redefined the error as $$ -\mathrm{\overline{err}}_m=\frac{1}{n}\frac{\sum_{i=0}^{n-1}w_i^mI(y_i\ne G(\boldsymbol{X}_{i*})}{\sum_{i=0}^{n-1}w_i^m}, +\mathrm{\overline{err}}_m=\frac{1}{n}\frac{\sum_{i=0}^{n-1}w_i^mI(y_i\ne G(x_i)}{\sum_{i=0}^{n-1}w_i^m}, $$ which leads to an update of @@ -2169,7 +2176,7 @@ The basic idea is to set up weights which will be used to scale the correctly cl $$ -\mathrm{err}=\frac{\sum_{i=0}^{n-1}w_iI(y_i\ne G(x_i})}{\sum_{i=0}^{n-1}w_i}, +\mathrm{\overline{err}}_m=\frac{\sum_{i=0}^{n-1}w_i^m I(y_i\ne G(x_i))}{\sum_{i=0}^{n-1}w_i}, $$ @@ -2179,7 +2186,7 @@ $$

    1. Fit then a given classifier to the training using the weights \( w_i \).
    2. Compute then \( \mathrm{err} \) and figure out which events are classified properly and which are classified wrongly.
    3. -
    4. Define a quantity \( \alpha_{m} = \log{(1-\mathrm{err})/\mathrm{err}} \)
    5. +
    6. Define a quantity \( \alpha_{m} = \log{(1-\mathrm{\overline{err}}_m)/\mathrm{\overline{err}}_m} \)
    7. Set the new weights to \( w_i = w_i\times \exp{(\alpha_m I(y_i\ne G(x_i)} \).
    @@ -2242,6 +2249,9 @@ In order to understand the method, let us illustrate its basics by bringing back the essential steps in linear regression, where our cost function was the least squares function. +

    +See discussion during lecture November 8. +











    @@ -2261,7 +2271,7 @@ The way we proceed in an iterative fashion is to

  • For \( m=1:M \), we
      -
    1. compute the negative gradient vector \( \boldsymbol{u}_m = -\partial C(\boldsymbol{y},\boldsymbol{f})/\partial \boldsymbol{f}(x) \) at $f(x) = f_{m-1}(x);
    2. +
    3. compute the negative gradient vector \( \boldsymbol{u}_m = -\partial C(\boldsymbol{y},\boldsymbol{f})/\partial \boldsymbol{f}(x) \) at \( f(x) = f_{m-1}(x) \);
    4. fit the so-called base-learner to the negative gradient \( h_m(u_m,x) \);
    5. update the estimate \( f_m(x) = f_{m-1}(x)+\nu h_m(u_m,x) \);
    @@ -2271,97 +2281,105 @@ The way we proceed in an iterative fashion is to









    -

    Gradient Boosting, Examples

    +

    Gradient Boosting, Examples of Regression

    -

    np.random.seed(42)
    -X = np.random.rand(100, 1) - 0.5
    -y = 3*X[:, 0]**2 + 0.05 * np.random.randn(100)
    -
    -from sklearn.tree import DecisionTreeRegressor
    -
    -tree_reg1 = DecisionTreeRegressor(max_depth=2, random_state=42)
    -tree_reg1.fit(X, y)
    -
    -y2 = y - tree_reg1.predict(X)
    -tree_reg2 = DecisionTreeRegressor(max_depth=2, random_state=42)
    -tree_reg2.fit(X, y2)
    -
    -y3 = y2 - tree_reg2.predict(X)
    -tree_reg3 = DecisionTreeRegressor(max_depth=2, random_state=42)
    -tree_reg3.fit(X, y3)
    -
    -X_new = np.array([[0.8]])
    -y_pred = sum(tree.predict(X_new) for tree in (tree_reg1, tree_reg2, tree_reg3))
    -
    -def plot_predictions(regressors, X, y, axes, label=None, style="r-", data_style="b.", data_label=None):
    -    x1 = np.linspace(axes[0], axes[1], 500)
    -    y_pred = sum(regressor.predict(x1.reshape(-1, 1)) for regressor in regressors)
    -    plt.plot(X[:, 0], y, data_style, label=data_label)
    -    plt.plot(x1, y_pred, style, linewidth=2, label=label)
    -    if label or data_label:
    -        plt.legend(loc="upper center", fontsize=16)
    -    plt.axis(axes)
    -
    -plt.figure(figsize=(11,11))
    -
    -plt.subplot(321)
    -plot_predictions([tree_reg1], X, y, axes=[-0.5, 0.5, -0.1, 0.8], label="$h_1(x_1)$", style="g-", data_label="Training set")
    -plt.ylabel("$y$", fontsize=16, rotation=0)
    -plt.title("Residuals and tree predictions", fontsize=16)
    -
    -plt.subplot(322)
    -plot_predictions([tree_reg1], X, y, axes=[-0.5, 0.5, -0.1, 0.8], label="$h(x_1) = h_1(x_1)$", data_label="Training set")
    -plt.ylabel("$y$", fontsize=16, rotation=0)
    -plt.title("Ensemble predictions", fontsize=16)
    -
    -plt.subplot(323)
    -plot_predictions([tree_reg2], X, y2, axes=[-0.5, 0.5, -0.5, 0.5], label="$h_2(x_1)$", style="g-", data_style="k+", data_label="Residuals")
    -plt.ylabel("$y - h_1(x_1)$", fontsize=16)
    -
    -plt.subplot(324)
    -plot_predictions([tree_reg1, tree_reg2], X, y, axes=[-0.5, 0.5, -0.1, 0.8], label="$h(x_1) = h_1(x_1) + h_2(x_1)$")
    -plt.ylabel("$y$", fontsize=16, rotation=0)
    -
    -plt.subplot(325)
    -plot_predictions([tree_reg3], X, y3, axes=[-0.5, 0.5, -0.5, 0.5], label="$h_3(x_1)$", style="g-", data_style="k+")
    -plt.ylabel("$y - h_1(x_1) - h_2(x_1)$", fontsize=16)
    -plt.xlabel("$x_1$", fontsize=16)
    -
    -plt.subplot(326)
    -plot_predictions([tree_reg1, tree_reg2, tree_reg3], X, y, axes=[-0.5, 0.5, -0.1, 0.8], label="$h(x_1) = h_1(x_1) + h_2(x_1) + h_3(x_1)$")
    -plt.xlabel("$x_1$", fontsize=16)
    -plt.ylabel("$y$", fontsize=16, rotation=0)
    -
    -save_fig("gradient_boosting_plot")
    -plt.show()
    -
    +
    import matplotlib.pyplot as plt
    +import numpy as np
    +from sklearn.model_selection import train_test_split
     from sklearn.ensemble import GradientBoostingRegressor
    +from sklearn.preprocessing import StandardScaler
    +import scikitplot as skplt
    +from sklearn.metrics import mean_squared_error
     
    -gbrt = GradientBoostingRegressor(max_depth=2, n_estimators=3, learning_rate=1.0, random_state=42)
    -gbrt.fit(X, y)
    +n = 100
    +maxdegree = 6
     
    -gbrt_slow = GradientBoostingRegressor(max_depth=2, n_estimators=200, learning_rate=0.1, random_state=42)
    -gbrt_slow.fit(X, y)
    +# Make data set.
    +x = np.linspace(-3, 3, n).reshape(-1, 1)
    +y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.normal(0, 0.1, x.shape)
     
    -plt.figure(figsize=(11,4))
    +error = np.zeros(maxdegree)
    +bias = np.zeros(maxdegree)
    +variance = np.zeros(maxdegree)
    +polydegree = np.zeros(maxdegree)
    +X_train, X_test, y_train, y_test = train_test_split(x, y, test_size=0.2)
    +scaler = StandardScaler()
    +scaler.fit(X_train)
    +X_train_scaled = scaler.transform(X_train)
    +X_test_scaled = scaler.transform(X_test)
     
    -plt.subplot(121)
    -plot_predictions([gbrt], X, y, axes=[-0.5, 0.5, -0.1, 0.8], label="Ensemble predictions")
    -plt.title("learning_rate={}, n_estimators={}".format(gbrt.learning_rate, gbrt.n_estimators), fontsize=14)
    +for degree in range(1,maxdegree):
    +    model = GradientBoostingRegressor(max_depth=degree, n_estimators=100, learning_rate=1.0)  
    +    model.fit(X_train_scaled,y_train)
    +    y_pred = model.predict(X_test_scaled)
    +    polydegree[degree] = degree
    +    error[degree] = np.mean( np.mean((y_test - y_pred)**2) )
    +    bias[degree] = np.mean( (y_test - np.mean(y_pred))**2 )
    +    variance[degree] = np.mean( np.var(y_pred) )
    +    print('Max depth:', degree)
    +    print('Error:', error[degree])
    +    print('Bias^2:', bias[degree])
    +    print('Var:', variance[degree])
    +    print('{} >= {} + {} = {}'.format(error[degree], bias[degree], variance[degree], bias[degree]+variance[degree]))
     
    -plt.subplot(122)
    -plot_predictions([gbrt_slow], X, y, axes=[-0.5, 0.5, -0.1, 0.8])
    -plt.title("learning_rate={}, n_estimators={}".format(gbrt_slow.learning_rate, gbrt_slow.n_estimators), fontsize=14)
    -
    -save_fig("gbrt_learning_rate_plot")
    +plt.xlim(1,maxdegree-1)
    +plt.plot(polydegree, error, label='Error')
    +plt.plot(polydegree, bias, label='bias')
    +plt.plot(polydegree, variance, label='Variance')
    +plt.legend()
     plt.show()
     











    -

    XGBoost: Extreme Gradient Boosting

    +

    Gradient Boosting, Examples of Classification

    +

    + + +

    import matplotlib.pyplot as plt
    +import numpy as np
    +from sklearn.model_selection import  train_test_split 
    +from sklearn.datasets import load_breast_cancer
    +import scikitplot as skplt
    +from sklearn.ensemble import GradientBoostingClassifier
    +from sklearn.model_selection import cross_validate
    +
    +# Load the data
    +cancer = load_breast_cancer()
    +
    +X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0)
    +print(X_train.shape)
    +print(X_test.shape)
    +#now scale the data
    +from sklearn.preprocessing import StandardScaler
    +scaler = StandardScaler()
    +scaler.fit(X_train)
    +X_train_scaled = scaler.transform(X_train)
    +X_test_scaled = scaler.transform(X_test)
    +
    +gd_clf = GradientBoostingClassifier(max_depth=3, n_estimators=100, learning_rate=1.0)  
    +gd_clf.fit(X_train_scaled, y_train)
    +#Cross validation
    +accuracy = cross_validate(gd_clf,X_test_scaled,y_test,cv=10)['test_score']
    +print(accuracy)
    +print("Test set accuracy with Random Forests and scaled data: {:.2f}".format(gd_clf.score(X_test_scaled,y_test)))
    +
    +import scikitplot as skplt
    +y_pred = gd_clf.predict(X_test_scaled)
    +skplt.metrics.plot_confusion_matrix(y_test, y_pred, normalize=True)
    +plt.show()
    +y_probas = gd_clf.predict_proba(X_test_scaled)
    +skplt.metrics.plot_roc(y_test, y_probas)
    +plt.show()
    +skplt.metrics.plot_cumulative_gain(y_test, y_probas)
    +plt.show()
    +
    +

    +









    + +

    XGBoost: Extreme Gradient Boosting

    XGBoost or Extreme Gradient @@ -2382,7 +2400,7 @@ It is now the algorithm which wins essentially all ML competitions!!!











    -

    Regression Case

    +

    Regression Case

    @@ -2413,8 +2431,8 @@ X_train_scaled = scaler.transform(X_train) X_test_scaled = scaler.transform(X_test) for degree in range(maxdegree): - model = xgb.XGBRegressor(objective ='reg:squarederror', colsample_bytree = 0.3, learning_rate = 0.1, - max_depth = degree, alpha = 10, n_estimators = 10) + model = xgb.XGBRegressor(objective ='reg:squarederror', colsaobjective ='reg:squarederror', colsample_bytree = 0.3, learning_rate = 0.1,max_depth = degree, alpha = 10, n_estimators = 200) + model.fit(X_train_scaled,y_train) y_pred = model.predict(X_test_scaled) polydegree[degree] = degree @@ -2437,7 +2455,7 @@ plt.show()











    -

    Xgboost on the Cancer Data

    +

    Xgboost on the Cancer Data

    @@ -2464,9 +2482,26 @@ X_test_scaled = scaler.transform(X_test) xg_clf = xgb.XGBClassifier() xg_clf.fit(X_train_scaled,y_train) + +y_test = xg_clf.predict(X_test_scaled) + +print("Test set accuracy with Random Forests and scaled data: {:.2f}".format(xg_clf.score(X_test_scaled,y_test))) + +import scikitplot as skplt +y_pred = xg_clf.predict(X_test_scaled) +skplt.metrics.plot_confusion_matrix(y_test, y_pred, normalize=True) +plt.show() +y_probas = xg_clf.predict_proba(X_test_scaled) +skplt.metrics.plot_roc(y_test, y_probas) +plt.show() +skplt.metrics.plot_cumulative_gain(y_test, y_probas) +plt.show() + + xgb.plot_tree(xg_clf,num_trees=0) plt.rcParams['figure.figsize'] = [50, 10] plt.show() + xgb.plot_importance(xg_clf) plt.rcParams['figure.figsize'] = [5, 5] plt.show() diff --git a/doc/pub/DecisionTrees/html/DecisionTrees.html b/doc/pub/DecisionTrees/html/DecisionTrees.html index a396507d9..a0192166f 100644 --- a/doc/pub/DecisionTrees/html/DecisionTrees.html +++ b/doc/pub/DecisionTrees/html/DecisionTrees.html @@ -163,10 +163,17 @@ div { text-align: justify; text-justify: inter-word; } ('AdaBoost Examples', 2, None, '___sec52'), ('Gradient boosting: Basics', 2, None, '___sec53'), ('Gradient Boosting, algorithm', 2, None, '___sec54'), - ('Gradient Boosting, Examples', 2, None, '___sec55'), - ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec56'), - ('Regression Case', 2, None, '___sec57'), - ('Xgboost on the Cancer Data', 2, None, '___sec58')]} + ('Gradient Boosting, Examples of Regression', + 2, + None, + '___sec55'), + ('Gradient Boosting, Examples of Classification', + 2, + None, + '___sec56'), + ('XGBoost: Extreme Gradient Boosting', 2, None, '___sec57'), + ('Regression Case', 2, None, '___sec58'), + ('Xgboost on the Cancer Data', 2, None, '___sec59')]} end of tocinfo --> @@ -2125,7 +2132,7 @@ $$ where we have redefined the error as $$ -\mathrm{\overline{err}}_m=\frac{1}{n}\frac{\sum_{i=0}^{n-1}w_i^mI(y_i\ne G(\boldsymbol{X}_{i*})}{\sum_{i=0}^{n-1}w_i^m}, +\mathrm{\overline{err}}_m=\frac{1}{n}\frac{\sum_{i=0}^{n-1}w_i^mI(y_i\ne G(x_i)}{\sum_{i=0}^{n-1}w_i^m}, $$ which leads to an update of @@ -2174,7 +2181,7 @@ The basic idea is to set up weights which will be used to scale the correctly cl $$ -\mathrm{err}=\frac{\sum_{i=0}^{n-1}w_iI(y_i\ne G(x_i})}{\sum_{i=0}^{n-1}w_i}, +\mathrm{\overline{err}}_m=\frac{\sum_{i=0}^{n-1}w_i^m I(y_i\ne G(x_i))}{\sum_{i=0}^{n-1}w_i}, $$ @@ -2184,7 +2191,7 @@ $$

    1. Fit then a given classifier to the training using the weights \( w_i \).
    2. Compute then \( \mathrm{err} \) and figure out which events are classified properly and which are classified wrongly.
    3. -
    4. Define a quantity \( \alpha_{m} = \log{(1-\mathrm{err})/\mathrm{err}} \)
    5. +
    6. Define a quantity \( \alpha_{m} = \log{(1-\mathrm{\overline{err}}_m)/\mathrm{\overline{err}}_m} \)
    7. Set the new weights to \( w_i = w_i\times \exp{(\alpha_m I(y_i\ne G(x_i)} \).
    @@ -2247,6 +2254,9 @@ In order to understand the method, let us illustrate its basics by bringing back the essential steps in linear regression, where our cost function was the least squares function. +

    +See discussion during lecture November 8. +











    @@ -2266,7 +2276,7 @@ The way we proceed in an iterative fashion is to

  • For \( m=1:M \), we
      -
    1. compute the negative gradient vector \( \boldsymbol{u}_m = -\partial C(\boldsymbol{y},\boldsymbol{f})/\partial \boldsymbol{f}(x) \) at $f(x) = f_{m-1}(x);
    2. +
    3. compute the negative gradient vector \( \boldsymbol{u}_m = -\partial C(\boldsymbol{y},\boldsymbol{f})/\partial \boldsymbol{f}(x) \) at \( f(x) = f_{m-1}(x) \);
    4. fit the so-called base-learner to the negative gradient \( h_m(u_m,x) \);
    5. update the estimate \( f_m(x) = f_{m-1}(x)+\nu h_m(u_m,x) \);
    @@ -2276,97 +2286,105 @@ The way we proceed in an iterative fashion is to









    -

    Gradient Boosting, Examples

    +

    Gradient Boosting, Examples of Regression

    -

    np.random.seed(42)
    -X = np.random.rand(100, 1) - 0.5
    -y = 3*X[:, 0]**2 + 0.05 * np.random.randn(100)
    -
    -from sklearn.tree import DecisionTreeRegressor
    -
    -tree_reg1 = DecisionTreeRegressor(max_depth=2, random_state=42)
    -tree_reg1.fit(X, y)
    -
    -y2 = y - tree_reg1.predict(X)
    -tree_reg2 = DecisionTreeRegressor(max_depth=2, random_state=42)
    -tree_reg2.fit(X, y2)
    -
    -y3 = y2 - tree_reg2.predict(X)
    -tree_reg3 = DecisionTreeRegressor(max_depth=2, random_state=42)
    -tree_reg3.fit(X, y3)
    -
    -X_new = np.array([[0.8]])
    -y_pred = sum(tree.predict(X_new) for tree in (tree_reg1, tree_reg2, tree_reg3))
    -
    -def plot_predictions(regressors, X, y, axes, label=None, style="r-", data_style="b.", data_label=None):
    -    x1 = np.linspace(axes[0], axes[1], 500)
    -    y_pred = sum(regressor.predict(x1.reshape(-1, 1)) for regressor in regressors)
    -    plt.plot(X[:, 0], y, data_style, label=data_label)
    -    plt.plot(x1, y_pred, style, linewidth=2, label=label)
    -    if label or data_label:
    -        plt.legend(loc="upper center", fontsize=16)
    -    plt.axis(axes)
    -
    -plt.figure(figsize=(11,11))
    -
    -plt.subplot(321)
    -plot_predictions([tree_reg1], X, y, axes=[-0.5, 0.5, -0.1, 0.8], label="$h_1(x_1)$", style="g-", data_label="Training set")
    -plt.ylabel("$y$", fontsize=16, rotation=0)
    -plt.title("Residuals and tree predictions", fontsize=16)
    -
    -plt.subplot(322)
    -plot_predictions([tree_reg1], X, y, axes=[-0.5, 0.5, -0.1, 0.8], label="$h(x_1) = h_1(x_1)$", data_label="Training set")
    -plt.ylabel("$y$", fontsize=16, rotation=0)
    -plt.title("Ensemble predictions", fontsize=16)
    -
    -plt.subplot(323)
    -plot_predictions([tree_reg2], X, y2, axes=[-0.5, 0.5, -0.5, 0.5], label="$h_2(x_1)$", style="g-", data_style="k+", data_label="Residuals")
    -plt.ylabel("$y - h_1(x_1)$", fontsize=16)
    -
    -plt.subplot(324)
    -plot_predictions([tree_reg1, tree_reg2], X, y, axes=[-0.5, 0.5, -0.1, 0.8], label="$h(x_1) = h_1(x_1) + h_2(x_1)$")
    -plt.ylabel("$y$", fontsize=16, rotation=0)
    -
    -plt.subplot(325)
    -plot_predictions([tree_reg3], X, y3, axes=[-0.5, 0.5, -0.5, 0.5], label="$h_3(x_1)$", style="g-", data_style="k+")
    -plt.ylabel("$y - h_1(x_1) - h_2(x_1)$", fontsize=16)
    -plt.xlabel("$x_1$", fontsize=16)
    -
    -plt.subplot(326)
    -plot_predictions([tree_reg1, tree_reg2, tree_reg3], X, y, axes=[-0.5, 0.5, -0.1, 0.8], label="$h(x_1) = h_1(x_1) + h_2(x_1) + h_3(x_1)$")
    -plt.xlabel("$x_1$", fontsize=16)
    -plt.ylabel("$y$", fontsize=16, rotation=0)
    -
    -save_fig("gradient_boosting_plot")
    -plt.show()
    -
    +
    import matplotlib.pyplot as plt
    +import numpy as np
    +from sklearn.model_selection import train_test_split
     from sklearn.ensemble import GradientBoostingRegressor
    +from sklearn.preprocessing import StandardScaler
    +import scikitplot as skplt
    +from sklearn.metrics import mean_squared_error
     
    -gbrt = GradientBoostingRegressor(max_depth=2, n_estimators=3, learning_rate=1.0, random_state=42)
    -gbrt.fit(X, y)
    +n = 100
    +maxdegree = 6
     
    -gbrt_slow = GradientBoostingRegressor(max_depth=2, n_estimators=200, learning_rate=0.1, random_state=42)
    -gbrt_slow.fit(X, y)
    +# Make data set.
    +x = np.linspace(-3, 3, n).reshape(-1, 1)
    +y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.normal(0, 0.1, x.shape)
     
    -plt.figure(figsize=(11,4))
    +error = np.zeros(maxdegree)
    +bias = np.zeros(maxdegree)
    +variance = np.zeros(maxdegree)
    +polydegree = np.zeros(maxdegree)
    +X_train, X_test, y_train, y_test = train_test_split(x, y, test_size=0.2)
    +scaler = StandardScaler()
    +scaler.fit(X_train)
    +X_train_scaled = scaler.transform(X_train)
    +X_test_scaled = scaler.transform(X_test)
     
    -plt.subplot(121)
    -plot_predictions([gbrt], X, y, axes=[-0.5, 0.5, -0.1, 0.8], label="Ensemble predictions")
    -plt.title("learning_rate={}, n_estimators={}".format(gbrt.learning_rate, gbrt.n_estimators), fontsize=14)
    +for degree in range(1,maxdegree):
    +    model = GradientBoostingRegressor(max_depth=degree, n_estimators=100, learning_rate=1.0)  
    +    model.fit(X_train_scaled,y_train)
    +    y_pred = model.predict(X_test_scaled)
    +    polydegree[degree] = degree
    +    error[degree] = np.mean( np.mean((y_test - y_pred)**2) )
    +    bias[degree] = np.mean( (y_test - np.mean(y_pred))**2 )
    +    variance[degree] = np.mean( np.var(y_pred) )
    +    print('Max depth:', degree)
    +    print('Error:', error[degree])
    +    print('Bias^2:', bias[degree])
    +    print('Var:', variance[degree])
    +    print('{} >= {} + {} = {}'.format(error[degree], bias[degree], variance[degree], bias[degree]+variance[degree]))
     
    -plt.subplot(122)
    -plot_predictions([gbrt_slow], X, y, axes=[-0.5, 0.5, -0.1, 0.8])
    -plt.title("learning_rate={}, n_estimators={}".format(gbrt_slow.learning_rate, gbrt_slow.n_estimators), fontsize=14)
    -
    -save_fig("gbrt_learning_rate_plot")
    +plt.xlim(1,maxdegree-1)
    +plt.plot(polydegree, error, label='Error')
    +plt.plot(polydegree, bias, label='bias')
    +plt.plot(polydegree, variance, label='Variance')
    +plt.legend()
     plt.show()
     











    -

    XGBoost: Extreme Gradient Boosting

    +

    Gradient Boosting, Examples of Classification

    +

    + + +

    import matplotlib.pyplot as plt
    +import numpy as np
    +from sklearn.model_selection import  train_test_split 
    +from sklearn.datasets import load_breast_cancer
    +import scikitplot as skplt
    +from sklearn.ensemble import GradientBoostingClassifier
    +from sklearn.model_selection import cross_validate
    +
    +# Load the data
    +cancer = load_breast_cancer()
    +
    +X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0)
    +print(X_train.shape)
    +print(X_test.shape)
    +#now scale the data
    +from sklearn.preprocessing import StandardScaler
    +scaler = StandardScaler()
    +scaler.fit(X_train)
    +X_train_scaled = scaler.transform(X_train)
    +X_test_scaled = scaler.transform(X_test)
    +
    +gd_clf = GradientBoostingClassifier(max_depth=3, n_estimators=100, learning_rate=1.0)  
    +gd_clf.fit(X_train_scaled, y_train)
    +#Cross validation
    +accuracy = cross_validate(gd_clf,X_test_scaled,y_test,cv=10)['test_score']
    +print(accuracy)
    +print("Test set accuracy with Random Forests and scaled data: {:.2f}".format(gd_clf.score(X_test_scaled,y_test)))
    +
    +import scikitplot as skplt
    +y_pred = gd_clf.predict(X_test_scaled)
    +skplt.metrics.plot_confusion_matrix(y_test, y_pred, normalize=True)
    +plt.show()
    +y_probas = gd_clf.predict_proba(X_test_scaled)
    +skplt.metrics.plot_roc(y_test, y_probas)
    +plt.show()
    +skplt.metrics.plot_cumulative_gain(y_test, y_probas)
    +plt.show()
    +
    +

    +









    + +

    XGBoost: Extreme Gradient Boosting

    XGBoost or Extreme Gradient @@ -2387,7 +2405,7 @@ It is now the algorithm which wins essentially all ML competitions!!!











    -

    Regression Case

    +

    Regression Case

    @@ -2418,8 +2436,8 @@ X_train_scaled = scaler= scaler.transform(X_test) for degree in range(maxdegree): - model = xgb.XGBRegressor(objective ='reg:squarederror', colsample_bytree = 0.3, learning_rate = 0.1, - max_depth = degree, alpha = 10, n_estimators = 10) + model = xgb.XGBRegressor(objective ='reg:squarederror', colsaobjective ='reg:squarederror', colsample_bytree = 0.3, learning_rate = 0.1,max_depth = degree, alpha = 10, n_estimators = 200) + model.fit(X_train_scaled,y_train) y_pred = model.predict(X_test_scaled) polydegree[degree] = degree @@ -2442,7 +2460,7 @@ plt.show()











    -

    Xgboost on the Cancer Data

    +

    Xgboost on the Cancer Data

    @@ -2469,9 +2487,26 @@ X_test_scaled = scaler= xgb.XGBClassifier() xg_clf.fit(X_train_scaled,y_train) + +y_test = xg_clf.predict(X_test_scaled) + +print("Test set accuracy with Random Forests and scaled data: {:.2f}".format(xg_clf.score(X_test_scaled,y_test))) + +import scikitplot as skplt +y_pred = xg_clf.predict(X_test_scaled) +skplt.metrics.plot_confusion_matrix(y_test, y_pred, normalize=True) +plt.show() +y_probas = xg_clf.predict_proba(X_test_scaled) +skplt.metrics.plot_roc(y_test, y_probas) +plt.show() +skplt.metrics.plot_cumulative_gain(y_test, y_probas) +plt.show() + + xgb.plot_tree(xg_clf,num_trees=0) plt.rcParams['figure.figsize'] = [50, 10] plt.show() + xgb.plot_importance(xg_clf) plt.rcParams['figure.figsize'] = [5, 5] plt.show() diff --git a/doc/pub/DecisionTrees/ipynb/DecisionTrees.ipynb b/doc/pub/DecisionTrees/ipynb/DecisionTrees.ipynb index 2beee1adf..bb4157450 100644 --- a/doc/pub/DecisionTrees/ipynb/DecisionTrees.ipynb +++ b/doc/pub/DecisionTrees/ipynb/DecisionTrees.ipynb @@ -2283,7 +2283,7 @@ "metadata": {}, "source": [ "$$\n", - "\\mathrm{\\overline{err}}_m=\\frac{1}{n}\\frac{\\sum_{i=0}^{n-1}w_i^mI(y_i\\ne G(\\boldsymbol{X}_{i*})}{\\sum_{i=0}^{n-1}w_i^m},\n", + "\\mathrm{\\overline{err}}_m=\\frac{1}{n}\\frac{\\sum_{i=0}^{n-1}w_i^mI(y_i\\ne G(x_i)}{\\sum_{i=0}^{n-1}w_i^m},\n", "$$" ] }, @@ -2365,7 +2365,7 @@ "metadata": {}, "source": [ "$$\n", - "\\mathrm{err}=\\frac{\\sum_{i=0}^{n-1}w_iI(y_i\\ne G(x_i})}{\\sum_{i=0}^{n-1}w_i},\n", + "\\mathrm{\\overline{err}}_m=\\frac{\\sum_{i=0}^{n-1}w_i^m I(y_i\\ne G(x_i))}{\\sum_{i=0}^{n-1}w_i},\n", "$$" ] }, @@ -2379,7 +2379,7 @@ "\n", "b. Compute then $\\mathrm{err}$ and figure out which events are classified properly and which are classified wrongly.\n", "\n", - "c. Define a quantity $\\alpha_{m} = \\log{(1-\\mathrm{err})/\\mathrm{err}}$\n", + "c. Define a quantity $\\alpha_{m} = \\log{(1-\\mathrm{\\overline{err}}_m)/\\mathrm{\\overline{err}}_m}$\n", "\n", "d. Set the new weights to $w_i = w_i\\times \\exp{(\\alpha_m I(y_i\\ne G(x_i)}$.\n", "\n", @@ -2446,6 +2446,8 @@ "bringing back the essential steps in linear regression, where our cost\n", "function was the least squares function.\n", "\n", + "See discussion during lecture November 8.\n", + "\n", "## Gradient Boosting, algorithm\n", "\n", "Suppose we have a cost function $C(f)=\\sum_{i=0}^{n-1}L(y_i, f(x_i))$ where $y_i$ is our target and $f(x_i)$ the function which is meant to model $y_i$. The above cost function could be our standard square-error function" @@ -2469,7 +2471,7 @@ "\n", "2. For $m=1:M$, we\n", "\n", - "a. compute the negative gradient vector $\\boldsymbol{u}_m = -\\partial C(\\boldsymbol{y},\\boldsymbol{f})/\\partial \\boldsymbol{f}(x)$ at $f(x) = f_{m-1}(x);\n", + "a. compute the negative gradient vector $\\boldsymbol{u}_m = -\\partial C(\\boldsymbol{y},\\boldsymbol{f})/\\partial \\boldsymbol{f}(x)$ at $f(x) = f_{m-1}(x)$;\n", "\n", "b. fit the so-called base-learner to the negative gradient $h_m(u_m,x)$;\n", "\n", @@ -2478,7 +2480,7 @@ "\n", "4. The final estimate is then $f_M(x) = \\sum_{m=1}^M\\nu h_m(u_m,x)$.\n", "\n", - "## Gradient Boosting, Examples" + "## Gradient Boosting, Examples of Regression" ] }, { @@ -2489,87 +2491,104 @@ }, "outputs": [], "source": [ - "np.random.seed(42)\n", - "X = np.random.rand(100, 1) - 0.5\n", - "y = 3*X[:, 0]**2 + 0.05 * np.random.randn(100)\n", - "\n", - "from sklearn.tree import DecisionTreeRegressor\n", - "\n", - "tree_reg1 = DecisionTreeRegressor(max_depth=2, random_state=42)\n", - "tree_reg1.fit(X, y)\n", - "\n", - "y2 = y - tree_reg1.predict(X)\n", - "tree_reg2 = DecisionTreeRegressor(max_depth=2, random_state=42)\n", - "tree_reg2.fit(X, y2)\n", - "\n", - "y3 = y2 - tree_reg2.predict(X)\n", - "tree_reg3 = DecisionTreeRegressor(max_depth=2, random_state=42)\n", - "tree_reg3.fit(X, y3)\n", - "\n", - "X_new = np.array([[0.8]])\n", - "y_pred = sum(tree.predict(X_new) for tree in (tree_reg1, tree_reg2, tree_reg3))\n", - "\n", - "def plot_predictions(regressors, X, y, axes, label=None, style=\"r-\", data_style=\"b.\", data_label=None):\n", - " x1 = np.linspace(axes[0], axes[1], 500)\n", - " y_pred = sum(regressor.predict(x1.reshape(-1, 1)) for regressor in regressors)\n", - " plt.plot(X[:, 0], y, data_style, label=data_label)\n", - " plt.plot(x1, y_pred, style, linewidth=2, label=label)\n", - " if label or data_label:\n", - " plt.legend(loc=\"upper center\", fontsize=16)\n", - " plt.axis(axes)\n", - "\n", - "plt.figure(figsize=(11,11))\n", - "\n", - "plt.subplot(321)\n", - "plot_predictions([tree_reg1], X, y, axes=[-0.5, 0.5, -0.1, 0.8], label=\"$h_1(x_1)$\", style=\"g-\", data_label=\"Training set\")\n", - "plt.ylabel(\"$y$\", fontsize=16, rotation=0)\n", - "plt.title(\"Residuals and tree predictions\", fontsize=16)\n", - "\n", - "plt.subplot(322)\n", - "plot_predictions([tree_reg1], X, y, axes=[-0.5, 0.5, -0.1, 0.8], label=\"$h(x_1) = h_1(x_1)$\", data_label=\"Training set\")\n", - "plt.ylabel(\"$y$\", fontsize=16, rotation=0)\n", - "plt.title(\"Ensemble predictions\", fontsize=16)\n", - "\n", - "plt.subplot(323)\n", - "plot_predictions([tree_reg2], X, y2, axes=[-0.5, 0.5, -0.5, 0.5], label=\"$h_2(x_1)$\", style=\"g-\", data_style=\"k+\", data_label=\"Residuals\")\n", - "plt.ylabel(\"$y - h_1(x_1)$\", fontsize=16)\n", - "\n", - "plt.subplot(324)\n", - "plot_predictions([tree_reg1, tree_reg2], X, y, axes=[-0.5, 0.5, -0.1, 0.8], label=\"$h(x_1) = h_1(x_1) + h_2(x_1)$\")\n", - "plt.ylabel(\"$y$\", fontsize=16, rotation=0)\n", - "\n", - "plt.subplot(325)\n", - "plot_predictions([tree_reg3], X, y3, axes=[-0.5, 0.5, -0.5, 0.5], label=\"$h_3(x_1)$\", style=\"g-\", data_style=\"k+\")\n", - "plt.ylabel(\"$y - h_1(x_1) - h_2(x_1)$\", fontsize=16)\n", - "plt.xlabel(\"$x_1$\", fontsize=16)\n", - "\n", - "plt.subplot(326)\n", - "plot_predictions([tree_reg1, tree_reg2, tree_reg3], X, y, axes=[-0.5, 0.5, -0.1, 0.8], label=\"$h(x_1) = h_1(x_1) + h_2(x_1) + h_3(x_1)$\")\n", - "plt.xlabel(\"$x_1$\", fontsize=16)\n", - "plt.ylabel(\"$y$\", fontsize=16, rotation=0)\n", - "\n", - "save_fig(\"gradient_boosting_plot\")\n", - "plt.show()\n", - "\n", + "import matplotlib.pyplot as plt\n", + "import numpy as np\n", + "from sklearn.model_selection import train_test_split\n", "from sklearn.ensemble import GradientBoostingRegressor\n", + "from sklearn.preprocessing import StandardScaler\n", + "import scikitplot as skplt\n", + "from sklearn.metrics import mean_squared_error\n", "\n", - "gbrt = GradientBoostingRegressor(max_depth=2, n_estimators=3, learning_rate=1.0, random_state=42)\n", - "gbrt.fit(X, y)\n", + "n = 100\n", + "maxdegree = 6\n", "\n", - "gbrt_slow = GradientBoostingRegressor(max_depth=2, n_estimators=200, learning_rate=0.1, random_state=42)\n", - "gbrt_slow.fit(X, y)\n", + "# Make data set.\n", + "x = np.linspace(-3, 3, n).reshape(-1, 1)\n", + "y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.normal(0, 0.1, x.shape)\n", "\n", - "plt.figure(figsize=(11,4))\n", + "error = np.zeros(maxdegree)\n", + "bias = np.zeros(maxdegree)\n", + "variance = np.zeros(maxdegree)\n", + "polydegree = np.zeros(maxdegree)\n", + "X_train, X_test, y_train, y_test = train_test_split(x, y, test_size=0.2)\n", + "scaler = StandardScaler()\n", + "scaler.fit(X_train)\n", + "X_train_scaled = scaler.transform(X_train)\n", + "X_test_scaled = scaler.transform(X_test)\n", "\n", - "plt.subplot(121)\n", - "plot_predictions([gbrt], X, y, axes=[-0.5, 0.5, -0.1, 0.8], label=\"Ensemble predictions\")\n", - "plt.title(\"learning_rate={}, n_estimators={}\".format(gbrt.learning_rate, gbrt.n_estimators), fontsize=14)\n", + "for degree in range(1,maxdegree):\n", + " model = GradientBoostingRegressor(max_depth=degree, n_estimators=100, learning_rate=1.0) \n", + " model.fit(X_train_scaled,y_train)\n", + " y_pred = model.predict(X_test_scaled)\n", + " polydegree[degree] = degree\n", + " error[degree] = np.mean( np.mean((y_test - y_pred)**2) )\n", + " bias[degree] = np.mean( (y_test - np.mean(y_pred))**2 )\n", + " variance[degree] = np.mean( np.var(y_pred) )\n", + " print('Max depth:', degree)\n", + " print('Error:', error[degree])\n", + " print('Bias^2:', bias[degree])\n", + " print('Var:', variance[degree])\n", + " print('{} >= {} + {} = {}'.format(error[degree], bias[degree], variance[degree], bias[degree]+variance[degree]))\n", "\n", - "plt.subplot(122)\n", - "plot_predictions([gbrt_slow], X, y, axes=[-0.5, 0.5, -0.1, 0.8])\n", - "plt.title(\"learning_rate={}, n_estimators={}\".format(gbrt_slow.learning_rate, gbrt_slow.n_estimators), fontsize=14)\n", + "plt.xlim(1,maxdegree-1)\n", + "plt.plot(polydegree, error, label='Error')\n", + "plt.plot(polydegree, bias, label='bias')\n", + "plt.plot(polydegree, variance, label='Variance')\n", + "plt.legend()\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Gradient Boosting, Examples of Classification" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import matplotlib.pyplot as plt\n", + "import numpy as np\n", + "from sklearn.model_selection import train_test_split \n", + "from sklearn.datasets import load_breast_cancer\n", + "import scikitplot as skplt\n", + "from sklearn.ensemble import GradientBoostingClassifier\n", + "from sklearn.model_selection import cross_validate\n", "\n", - "save_fig(\"gbrt_learning_rate_plot\")\n", + "# Load the data\n", + "cancer = load_breast_cancer()\n", + "\n", + "X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0)\n", + "print(X_train.shape)\n", + "print(X_test.shape)\n", + "#now scale the data\n", + "from sklearn.preprocessing import StandardScaler\n", + "scaler = StandardScaler()\n", + "scaler.fit(X_train)\n", + "X_train_scaled = scaler.transform(X_train)\n", + "X_test_scaled = scaler.transform(X_test)\n", + "\n", + "gd_clf = GradientBoostingClassifier(max_depth=3, n_estimators=100, learning_rate=1.0) \n", + "gd_clf.fit(X_train_scaled, y_train)\n", + "#Cross validation\n", + "accuracy = cross_validate(gd_clf,X_test_scaled,y_test,cv=10)['test_score']\n", + "print(accuracy)\n", + "print(\"Test set accuracy with Random Forests and scaled data: {:.2f}\".format(gd_clf.score(X_test_scaled,y_test)))\n", + "\n", + "import scikitplot as skplt\n", + "y_pred = gd_clf.predict(X_test_scaled)\n", + "skplt.metrics.plot_confusion_matrix(y_test, y_pred, normalize=True)\n", + "plt.show()\n", + "y_probas = gd_clf.predict_proba(X_test_scaled)\n", + "skplt.metrics.plot_roc(y_test, y_probas)\n", + "plt.show()\n", + "skplt.metrics.plot_cumulative_gain(y_test, y_probas)\n", "plt.show()" ] }, @@ -2598,7 +2617,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 31, "metadata": { "collapsed": false }, @@ -2630,8 +2649,8 @@ "X_test_scaled = scaler.transform(X_test)\n", "\n", "for degree in range(maxdegree):\n", - " model = xgb.XGBRegressor(objective ='reg:squarederror', colsample_bytree = 0.3, learning_rate = 0.1,\n", - " max_depth = degree, alpha = 10, n_estimators = 10)\n", + " model = xgb.XGBRegressor(objective ='reg:squarederror', colsaobjective ='reg:squarederror', colsample_bytree = 0.3, learning_rate = 0.1,max_depth = degree, alpha = 10, n_estimators = 200)\n", + "\n", " model.fit(X_train_scaled,y_train)\n", " y_pred = model.predict(X_test_scaled)\n", " polydegree[degree] = degree\n", @@ -2661,12 +2680,13 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 32, "metadata": { "collapsed": false }, "outputs": [], "source": [ + "\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "from sklearn.model_selection import train_test_split \n", @@ -2690,9 +2710,26 @@ "\n", "xg_clf = xgb.XGBClassifier()\n", "xg_clf.fit(X_train_scaled,y_train)\n", + "\n", + "y_test = xg_clf.predict(X_test_scaled)\n", + "\n", + "print(\"Test set accuracy with Random Forests and scaled data: {:.2f}\".format(xg_clf.score(X_test_scaled,y_test)))\n", + "\n", + "import scikitplot as skplt\n", + "y_pred = xg_clf.predict(X_test_scaled)\n", + "skplt.metrics.plot_confusion_matrix(y_test, y_pred, normalize=True)\n", + "plt.show()\n", + "y_probas = xg_clf.predict_proba(X_test_scaled)\n", + "skplt.metrics.plot_roc(y_test, y_probas)\n", + "plt.show()\n", + "skplt.metrics.plot_cumulative_gain(y_test, y_probas)\n", + "plt.show()\n", + "\n", + "\n", "xgb.plot_tree(xg_clf,num_trees=0)\n", "plt.rcParams['figure.figsize'] = [50, 10]\n", "plt.show()\n", + "\n", "xgb.plot_importance(xg_clf)\n", "plt.rcParams['figure.figsize'] = [5, 5]\n", "plt.show()" diff --git a/doc/pub/DecisionTrees/ipynb/ipynb-DecisionTrees-src.tar.gz b/doc/pub/DecisionTrees/ipynb/ipynb-DecisionTrees-src.tar.gz index 461a4ebebef71fd668dbac4ad4ca028f6ba71458..3edcdce6c46954c0a2f72652188c3a26a37c1ab1 100644 GIT binary patch delta 30 mcmZ4cQ*iB1L3a6W4hCk1qmAsX?2N7KOs(w9TiIEb)c^pU83_ac delta 30 mcmZ4cQ*iB1L3a6W4u;6jM;h5%*%@2enOfPIx3aS=s{sJCfC@|i diff --git a/doc/pub/DecisionTrees/pdf/DecisionTrees-minted.pdf b/doc/pub/DecisionTrees/pdf/DecisionTrees-minted.pdf index 22edceb81e7a5d9676c3b05fdc2474c92dd35d10..eb8c1971180eed90b908bf2d69656b2d65850dee 100644 GIT binary patch delta 19001 zcmZs>Q47n<4(-fU=|q;y};=TsOJVdOx(zq*ugY?xB(STJ_!9ad&m z$|E&PY*w!f$*DT?_XTu6{AzF8u8Lc=TjAxrmuJND=;knM_Ro<<0VE#gkVhf+?= z&_%60>y0nzMJ`v#-^%dM=U18zcKp(nULUfqARV12d$1}BC74e>h(<3SF@4*37^VNT z<>1P5Sm&OMNZ5MWhL{8vBon6rA|du|=A}?a-PX#Ji?EfO3wRbJ2N}_9t8ZU?gGkRP zupf&;7UpYYtH&Y=dkS_+h9UHE{#vAbEK+zz6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*M85*s7L@Wb-YP99EU$z%NX^QgR6rxbF!Qznl(n>bhv Np$3+b!I&F>{|9PK= {} + {} = {}'.format(error[degree], bias[degree], variance[degree], bias[degree]+variance[degree])) -plt.subplot(122) -plot_predictions([gbrt_slow], X, y, axes=[-0.5, 0.5, -0.1, 0.8]) -plt.title("learning_rate={}, n_estimators={}".format(gbrt_slow.learning_rate, gbrt_slow.n_estimators), fontsize=14) - -save_fig("gbrt_learning_rate_plot") +plt.xlim(1,maxdegree-1) +plt.plot(polydegree, error, label='Error') +plt.plot(polydegree, bias, label='bias') +plt.plot(polydegree, variance, label='Variance') +plt.legend() plt.show() +!ec + +!split +===== Gradient Boosting, Examples of Classification ===== +!bc pycod +import matplotlib.pyplot as plt +import numpy as np +from sklearn.model_selection import train_test_split +from sklearn.datasets import load_breast_cancer +import scikitplot as skplt +from sklearn.ensemble import GradientBoostingClassifier +from sklearn.model_selection import cross_validate + +# Load the data +cancer = load_breast_cancer() + +X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0) +print(X_train.shape) +print(X_test.shape) +#now scale the data +from sklearn.preprocessing import StandardScaler +scaler = StandardScaler() +scaler.fit(X_train) +X_train_scaled = scaler.transform(X_train) +X_test_scaled = scaler.transform(X_test) + +gd_clf = GradientBoostingClassifier(max_depth=3, n_estimators=100, learning_rate=1.0) +gd_clf.fit(X_train_scaled, y_train) +#Cross validation +accuracy = cross_validate(gd_clf,X_test_scaled,y_test,cv=10)['test_score'] +print(accuracy) +print("Test set accuracy with Random Forests and scaled data: {:.2f}".format(gd_clf.score(X_test_scaled,y_test))) + +import scikitplot as skplt +y_pred = gd_clf.predict(X_test_scaled) +skplt.metrics.plot_confusion_matrix(y_test, y_pred, normalize=True) +plt.show() +y_probas = gd_clf.predict_proba(X_test_scaled) +skplt.metrics.plot_roc(y_test, y_probas) +plt.show() +skplt.metrics.plot_cumulative_gain(y_test, y_probas) +plt.show() !ec @@ -2027,8 +2034,8 @@ X_train_scaled = scaler.transform(X_train) X_test_scaled = scaler.transform(X_test) for degree in range(maxdegree): - model = xgb.XGBRegressor(objective ='reg:squarederror', colsample_bytree = 0.3, learning_rate = 0.1, - max_depth = degree, alpha = 10, n_estimators = 10) + model = xgb.XGBRegressor(objective ='reg:squarederror', colsaobjective ='reg:squarederror', colsample_bytree = 0.3, learning_rate = 0.1,max_depth = degree, alpha = 10, n_estimators = 200) + model.fit(X_train_scaled,y_train) y_pred = model.predict(X_test_scaled) polydegree[degree] = degree @@ -2048,14 +2055,12 @@ plt.plot(polydegree, variance, label='Variance') plt.legend() plt.show() - !ec - - !split ===== Xgboost on the Cancer Data ===== !bc pycod + import matplotlib.pyplot as plt import numpy as np from sklearn.model_selection import train_test_split @@ -2079,10 +2084,28 @@ X_test_scaled = scaler.transform(X_test) xg_clf = xgb.XGBClassifier() xg_clf.fit(X_train_scaled,y_train) + +y_test = xg_clf.predict(X_test_scaled) + +print("Test set accuracy with Random Forests and scaled data: {:.2f}".format(xg_clf.score(X_test_scaled,y_test))) + +import scikitplot as skplt +y_pred = xg_clf.predict(X_test_scaled) +skplt.metrics.plot_confusion_matrix(y_test, y_pred, normalize=True) +plt.show() +y_probas = xg_clf.predict_proba(X_test_scaled) +skplt.metrics.plot_roc(y_test, y_probas) +plt.show() +skplt.metrics.plot_cumulative_gain(y_test, y_probas) +plt.show() + + xgb.plot_tree(xg_clf,num_trees=0) plt.rcParams['figure.figsize'] = [50, 10] plt.show() + xgb.plot_importance(xg_clf) plt.rcParams['figure.figsize'] = [5, 5] plt.show() + !ec diff --git a/doc/src/DecisionTrees/Programs/gdclas.py b/doc/src/DecisionTrees/Programs/gdclas.py new file mode 100644 index 000000000..c7e81b05e --- /dev/null +++ b/doc/src/DecisionTrees/Programs/gdclas.py @@ -0,0 +1,37 @@ +import matplotlib.pyplot as plt +import numpy as np +from sklearn.model_selection import train_test_split +from sklearn.datasets import load_breast_cancer +import scikitplot as skplt +from sklearn.ensemble import GradientBoostingClassifier +from sklearn.model_selection import cross_validate + +# Load the data +cancer = load_breast_cancer() + +X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0) +print(X_train.shape) +print(X_test.shape) +#now scale the data +from sklearn.preprocessing import StandardScaler +scaler = StandardScaler() +scaler.fit(X_train) +X_train_scaled = scaler.transform(X_train) +X_test_scaled = scaler.transform(X_test) + +gd_clf = GradientBoostingClassifier(max_depth=3, n_estimators=100, learning_rate=1.0) +gd_clf.fit(X_train_scaled, y_train) +#Cross validation +accuracy = cross_validate(gd_clf,X_test_scaled,y_test,cv=10)['test_score'] +print(accuracy) +print("Test set accuracy with Random Forests and scaled data: {:.2f}".format(gd_clf.score(X_test_scaled,y_test))) + +import scikitplot as skplt +y_pred = gd_clf.predict(X_test_scaled) +skplt.metrics.plot_confusion_matrix(y_test, y_pred, normalize=True) +plt.show() +y_probas = gd_clf.predict_proba(X_test_scaled) +skplt.metrics.plot_roc(y_test, y_probas) +plt.show() +skplt.metrics.plot_cumulative_gain(y_test, y_probas) +plt.show() diff --git a/doc/src/DecisionTrees/Programs/gdreg.py b/doc/src/DecisionTrees/Programs/gdreg.py new file mode 100644 index 000000000..d6c1601c7 --- /dev/null +++ b/doc/src/DecisionTrees/Programs/gdreg.py @@ -0,0 +1,48 @@ +import matplotlib.pyplot as plt +import numpy as np +from sklearn.model_selection import train_test_split +from sklearn.ensemble import GradientBoostingRegressor +from sklearn.preprocessing import StandardScaler +import scikitplot as skplt +from sklearn.metrics import mean_squared_error + +n = 1000 +maxdegree = 6 + +# Make data set. +x = np.linspace(-3, 3, n).reshape(-1, 1) +y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.normal(0, 0.1, x.shape) + +error = np.zeros(maxdegree) +bias = np.zeros(maxdegree) +variance = np.zeros(maxdegree) +polydegree = np.zeros(maxdegree) +X_train, X_test, y_train, y_test = train_test_split(x, y, test_size=0.2) +scaler = StandardScaler() +scaler.fit(X_train) +X_train_scaled = scaler.transform(X_train) +X_test_scaled = scaler.transform(X_test) + +for degree in range(1,maxdegree): + model = GradientBoostingRegressor(max_depth=degree, n_estimators=100, learning_rate=1.0) + model.fit(X_train_scaled,y_train) + y_pred = model.predict(X_test_scaled) + polydegree[degree] = degree + error[degree] = np.mean( np.mean((y_test - y_pred)**2) ) + bias[degree] = np.mean( (y_test - np.mean(y_pred))**2 ) + variance[degree] = np.mean( np.var(y_pred) ) + print('Max depth:', degree) + print('Error:', error[degree]) + print('Bias^2:', bias[degree]) + print('Var:', variance[degree]) + print('{} >= {} + {} = {}'.format(error[degree], bias[degree], variance[degree], bias[degree]+variance[degree])) + +plt.xlim(1,maxdegree-1) +plt.plot(polydegree, error, label='Error') +plt.plot(polydegree, bias, label='bias') +plt.plot(polydegree, variance, label='Variance') +plt.legend() +plt.show() + + + diff --git a/doc/src/DecisionTrees/Programs/xgcancer.py b/doc/src/DecisionTrees/Programs/xgcancer.py index 55d910b0d..bad114975 100644 --- a/doc/src/DecisionTrees/Programs/xgcancer.py +++ b/doc/src/DecisionTrees/Programs/xgcancer.py @@ -19,10 +19,23 @@ scaler.fit(X_train) X_train_scaled = scaler.transform(X_train) X_test_scaled = scaler.transform(X_test) -xg_clf = xgb.XGBClassifier() +xg_clf = xgb.XGBClassifier(max_depth = 4, n_estimators = 200) xg_clf.fit(X_train_scaled,y_train) -preds = xg_clf.predict(X_test_scaled) +y_test = xg_clf.predict(X_test_scaled) + +print("Test set accuracy with Random Forests and scaled data: {:.2f}".format(xg_clf.score(X_test_scaled,y_test))) + +import scikitplot as skplt +y_pred = xg_clf.predict(X_test_scaled) +skplt.metrics.plot_confusion_matrix(y_test, y_pred, normalize=True) +plt.show() +y_probas = xg_clf.predict_proba(X_test_scaled) +skplt.metrics.plot_roc(y_test, y_probas) +plt.show() +skplt.metrics.plot_cumulative_gain(y_test, y_probas) +plt.show() + xgb.plot_tree(xg_clf,num_trees=0) plt.rcParams['figure.figsize'] = [50, 10]