{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## 1. Bagging ensemble:" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Requirement already satisfied: xgboost in c:\\anaconda3\\lib\\site-packages (0.90)\n", "Requirement already satisfied: scipy in c:\\anaconda3\\lib\\site-packages (from xgboost) (1.3.1)\n", "Requirement already satisfied: numpy in c:\\anaconda3\\lib\\site-packages (from xgboost) (1.16.5)\n" ] } ], "source": [ "# Install once.\n", "!pip install xgboost" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import pandas as pd\n", "import warnings \n", "import seaborn as sns\n", "import matplotlib.pyplot as plt\n", "from sklearn.model_selection import train_test_split,GridSearchCV\n", "from sklearn.tree import DecisionTreeClassifier\n", "from sklearn.ensemble import RandomForestClassifier,AdaBoostClassifier, GradientBoostingClassifier\n", "from xgboost import XGBClassifier\n", "from sklearn import metrics\n", "from sklearn.datasets import load_breast_cancer\n", "warnings.filterwarnings(action='ignore') # Turn off the warnings." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 1.1. Read in data:" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "# Load data.\n", "data = load_breast_cancer()" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "['mean radius' 'mean texture' 'mean perimeter' 'mean area'\n", " 'mean smoothness' 'mean compactness' 'mean concavity'\n", " 'mean concave points' 'mean symmetry' 'mean fractal dimension'\n", " 'radius error' 'texture error' 'perimeter error' 'area error'\n", " 'smoothness error' 'compactness error' 'concavity error'\n", " 'concave points error' 'symmetry error' 'fractal dimension error'\n", " 'worst radius' 'worst texture' 'worst perimeter' 'worst area'\n", " 'worst smoothness' 'worst compactness' 'worst concavity'\n", " 'worst concave points' 'worst symmetry' 'worst fractal dimension']\n" ] } ], "source": [ "#설명변수\n", "X = data['data']\n", "variable_names = data['feature_names']\n", "print(variable_names)" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(569, 30)" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "X.shape" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "['benign', 'malignant']\n" ] } ], "source": [ "#반응변수\n", "#0은 양성, 1은 악성이 되도록 레이블 다시 지정\n", "Y = 1 - data['target']\n", "label = list(data['target_names'])\n", "label.reverse()\n", "print(label)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size=0.3, random_state=1234)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 1.2. Random Forest:" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Random Forest accuracy : 0.924\n" ] } ], "source": [ "# Classification by Random Forest.\n", "RFC = RandomForestClassifier(n_estimators=100,max_depth=5,min_samples_leaf=2,random_state=123)\n", "RFC.fit(X_train, Y_train)\n", "Y_pred = RFC.predict(X_test)\n", "print( \"Random Forest accuracy : \" + str(np.round(metrics.accuracy_score(Y_test,Y_pred),3)))" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAc4AAAD4CAYAAABlsga0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3de7xVdZ3/8ddbJVA4Al4TyzmGt8S4xAETUfGSTTUhpo6peauRtJ+ajmgXf+OQTo2MlpM6ZgzjmD9JDExTckJRkCModzgHVLKESmW08oKgqM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bf4P77/x4uep3I/33xz0HB13g0h74uyV2p9U7ce0qM1YOvbmoPYc097AIrIbbnYApgOfr8I4vwn8N9nqpTvwFNC/UnEWtL2dD94ctDId196pvEsVxvkh4BHgko7677IccRZtO4cqvTmo4gH41Y4PDz4H/IbsWsWVqe5qYGQqdyO7w/O3wDzgYwV9r0z9VgCfrcY4gf9Ldp1rScFrj2qMtWiMsXRg4izDZ/9lshuYlgH/Vo1xAj1S/XKypHl5heMcQraSWgf8BVhe0PcrKf7fAudWY5zpM3+36N/SwGqLs2iMc6jSxOmv3DMzM8vB1zjNzMxycOI0MzPLwYnTzMwsBydOMzOzHJw4zczMcnDiNDMzy8GJ08zMLIf/Dy2taXFplbp6AAAAAElFTkSuQmCC\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "# Display the top 10 most important variables.\n", "variable_importance = pd.Series(RFC.feature_importances_, index = variable_names)\n", "top_variables_10 = variable_importance.sort_values(ascending=False)[:10]\n", "sns.barplot(x=top_variables_10.values, y = top_variables_10.index, ci=None)\n", "plt.show()\n", "\n", "#변수 중에서 중요하다는 순위대로 나타내줌" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 2. Boosting Ensemble:" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 2.1. AdaBoost:" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "AdaBoost accuracy : 0.924\n" ] } ], "source": [ "# Classification by AdaBoost.\n", "ABC = AdaBoostClassifier(base_estimator=DecisionTreeClassifier(max_depth=10),n_estimators=100,learning_rate=0.01,random_state=123)\n", "ABC.fit(X_train, Y_train)\n", "Y_pred = ABC.predict(X_test)\n", "print( \"AdaBoost accuracy : \" + str(np.round(metrics.accuracy_score(Y_test,Y_pred),3)))" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAdkAAA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ikZxDga9jfOTwM9bGlFjTcUp6W8lPUSVxE7vp9g69BijpH2AN9u+vj8Dq9Pse/7hcongaklv7p/QOmkmzp2BnSXdLulOSe/tt+he1fS/oXKpZQfg1n6Ia60lya6fGs1I62cszdRptcEQQzOajlPSx4A2YHJLI2qsqThtf9v2KOAfgH9seVSddRujpA2AC4HP91tEjTVzLn8KjLS9F/BLXl0Z6k/NxLkR1ZLxwVQzxKmStmhxXPV682/9I8DVtle1MJ4+kyS7fnoUqP2t+k3A77uqI2kjYATwx36JrkEMRaM4B4Om4pR0OHAucITtFf0UW63ens8rgPEtjei1eopxOLAHMFPSUuBdwPQBuPmpx3Np+w817/MlwJh+iq1Ws//Wr7P9iu1HqB4QslM/xVcbQ7M/mx9hHVkqhiTZ9dXdwE6SdpC0MdUP7fS6OtOBE8v20cCtLncc9KNm4hwMeoyzLHF+jyrBDsQ1L2guztr/XN8P/KYf44MeYrT9rO2tbY+0PZLq+vYRtucOpjgBJG1b8/II4P5+jK9DM/+GrqW6MQ9JW1MtHz/cr1E2+W9d0i7A64E7+jm+NTfQd17la2C+gL8Gfk11R9+5pex8qv+wADYFrgJ+C9wF7DhI4xxL9VvwC8AfgPsGaZy/BB4HFpSv6YM0zm8A95UYZwC7D7YY6+rOZADuLm7yXP5rOZf3lnO56yCNU8DXgSXAIuAjgzHO8noicMFAxLemX/lYxYiIiBbJcnFERESLJMlGRES0SJJsREREiyTJRkREtEiSbERERIskyUZERLRIkmxERESL/H8/tdZogreAwgAAAABJRU5ErkJggg==\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "# Display the top 10 most important variables.\n", "variable_importance = pd.Series(ABC.feature_importances_, index = variable_names)\n", "top_variables_10 = variable_importance.sort_values(ascending=False)[:10] #탑 10만 그림\n", "sns.barplot(x=top_variables_10.values, y = top_variables_10.index, ci=None)\n", "plt.show()\n", "\n", "#mean~이 제일 중요한 변수이다\n", "#순위는 앞과 비슷하지만 mean이 압도적" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 2.2. Gradient Boosting:" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Gradient Boosting accuracy : 0.906\n" ] } ], "source": [ "# Classification by Gradient Boosting.\n", "GBC = GradientBoostingClassifier(n_estimators=100,learning_rate=0.01,min_samples_leaf=2,max_leaf_nodes=30,random_state=123)\n", "GBC.fit(X_train, Y_train)\n", "Y_pred = GBC.predict(X_test)\n", "print( \"Gradient Boosting accuracy : \" + str(np.round(metrics.accuracy_score(Y_test,Y_pred),3)))\n", "\n", "\n", "#앞에서보다 성능이 저조해짐" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAdkAAAD4CAYAAACgwJwlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3de5xeVX3v8c8XiFySGOSiAoLByEVACGYSDHKHYlvbEDQcRUSglggeSEGB6qFFitqSYsurXiFGT+SQNhYQQUoFgVxGAoEk5EYALUJPqTlcKhBuARK+54+9pjwzPnMLs2cmzPf9ej2vWc/a67bXBH7PWnvPs2WbiIiI6HubDfQAIiIi3qwSZCMiImqSIBsREVGTBNmIiIiaJMhGRETUZIuBHkAMLjvssINHjx490MOIiNikLFmy5CnbO3bMT5CNdkaPHs3ixYsHehgREZsUSf/eLD/bxRERETXJSjbaeeCx/2Lc+VcN9DAiIvrVkss+XUu7WclGRETUJEE2IiKiJgmyERERNUmQjYiIqMkmFWQlTZa0z0CPY6BIukTSMd2UOULSwf01poiI6NygDLKSNu/k0GRgyAZZ2xfZvq2bYkcACbIREYNAnwZZSRdImlbSl0u6o6SPlnR1SZ8oaaWkVZKmN9R9vqz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P7dwG/6ayMpC2AUcBv+2V0g0dP5il6OE+SjgEuBCbZfrmfxjaY9Pbf0xxgcq0jGpy6m6eRwH7APEmPAh8EbhysNz8lyA5N9wJ7SNpd0luobmy6sUOZG4FTSnoKcIfL3QZDSE/mKXowT2V770qqAPvEAIxxMOjJPO3R8PYjwK/6cXyDRZfzZPtZ2zvYHm17NNU1/km2Fw/McLuWIDsElWusZwG3AA8A/2z7fkmXSJpUin0f2F7SvwGfBzq9jf7NqifzJGm8pMeAE4ArJd0/cCMeGD3893QZMAK4pvx5ypD7sNLDeTpL0v2SllH9d3dKJ829afVwnjYZ+VrFiIiImmQlGxERUZME2YiIiJokyEZERNQkQTYiIqImCbIRERE1SZCNiIioSYJsRERETf4/bytc80ogoKsAAAAASUVORK5CYII=\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "# Display the top 10 most important variables.\n", "variable_importance = pd.Series(GBC.feature_importances_, index = variable_names)\n", "top_variables_10 = variable_importance.sort_values(ascending=False)[:10]\n", "sns.barplot(x=top_variables_10.values, y = top_variables_10.index, ci=None)\n", "plt.show()\n", "\n", "#어떻게 유방암을 검출해내느냐\n", "#worst~(모양)을 가장 많이 보고 한다는 뜻" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 2.3. XGBoost:" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "XGBoost accuracy : 0.942\n" ] } ], "source": [ "# Classification by XGBoost.\n", "XGBC = XGBClassifier(n_estimator = 500, learning_Rate = 0.1, max_depth = 4, random_state=123)\n", "XGBC.fit(X_train, Y_train)\n", "Y_pred = XGBC.predict(X_test)\n", "print( \"XGBoost accuracy : \" + str(np.round(metrics.accuracy_score(Y_test,Y_pred),3)))\n", "\n", "#성능이 가장 좋음(데이터만 가지고 유방암 판별을 94%할 수 있다는 뜻)" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": {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3fSxoD3CxpZLtvub1tQ87xQP18OrOb7WckvQ+4R9JS24/30NjWV5fnJOlTQAtwRHfr9qINmQ/0v8+oS/Ox/R3gO5I+Cfw/wGe6Wnd9ZCW78XgaeE/D+3cDz3RURtJmwDDgD12s29vWez5lS+j3ALYXUF1/2av2EXduQ87xQP18OmT7mfLzCWAWcEBPDm49dWlOko4BLgSOs/1ad+r2sg2ZT3/8jLp7jqcDbSvw+j6fvr5YnVfvvKh2LZ6guqjfdlPAyHZl/gdr3yj045Ieydo3BTxB39/4tCHz2bFt/FQ3Sfwa2K6/z6eh7NW89canJ6luqNm2pAfyfLYFBpX0DsAvaXcDS3+dE1WgeRzYs13+gPyMOplPv/uMujifPRvSHwXml3Rt/8b16X+0efXuC/gw8IvyP82FJe8Sqm+oAFsA11Nd9H8AeF9D3QtLvceAP+/ruWzIfIATgYfL/1QLgY/29Vy6OJ+xVN+4XwZ+DzzcUPdzZZ6/Ak7v67lsyHyAQ4Cl5fNZCny+r+fSjTndBTwLLCqvWwf4Z9R0Pv31M+rCfL5V/t9fBMykIQjX9W9c/qxiRERETXJNNiIioiYJshERETVJkI2IiKhJgmxERERNEmQjIiJqkiAbERFRkwTZiIiImvwf97iljWQHEgMAAAAASUVORK5CYII=\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "# Display the top 10 most important variables.\n", "variable_importance = pd.Series(XGBC.feature_importances_, index = variable_names)\n", "top_variables_10 = variable_importance.sort_values(ascending=False)[:10]\n", "sns.barplot(x=top_variables_10.values, y = top_variables_10.index, ci=None)\n", "plt.show()\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "NOTE: The hyperparameters of XGBClassifier can be optimized using GridSearchCV() and RandomSearchCV(). Students are encouraged to explore. " ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.4" } }, "nbformat": 4, "nbformat_minor": 2 }