diff --git a/README.md b/README.md index e11818a..e947cdf 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ RやPythonのコード(具体的なコンピュータプログラム)の読 本書には,次の三つの特徴があります. 1. 第1部「データサイエンスの準備」で,準備に時間をかけています. -1. ほぼ全ての例をコードに基づいて説明しています.本書掲載のコードはサポートサイト([ここ](#コード))でも公開しています(使用方法は2.6節を参照).ただし,コードは自分で入力して実行することを勧めます. +1. ほぼ全ての例をコードに基づいて説明しています.本書掲載のコードはサポートサイト([ここ](#コード))でも公開しています(使用方法は2.6節を参照). 1. 第2部「機械学習」では,ほぼ全ての課題をRとPythonで解決し,同じ結果を得ることを試みています. ## 目次 diff --git a/code/Python-notebook/ch08/08-colab.ipynb b/code/Python-notebook/ch08/08-colab.ipynb index 5ccc1a6..f6cab75 100644 --- a/code/Python-notebook/ch08/08-colab.ipynb +++ b/code/Python-notebook/ch08/08-colab.ipynb @@ -4,23 +4,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# 08" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Google Colaboratoryの環境設定\n", - "!pip install -U scikit-learn | tail -n 1" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ + "# 08\n", + "\n", "## 8.1 ブドウの生育条件とワインの価格" ] }, diff --git a/code/Python-notebook/ch10/10-colab.ipynb b/code/Python-notebook/ch10/10-colab.ipynb index 1c2e061..56da421 100644 --- a/code/Python-notebook/ch10/10-colab.ipynb +++ b/code/Python-notebook/ch10/10-colab.ipynb @@ -4,23 +4,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# 10" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Google Colaboratoryの環境設定\n", - "!pip install -U scikit-learn | tail -n 1" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ + "# 10\n", + "\n", "## 10.1 2値分類の性能指標\n", "\n", "### 10.1.1 陽性と陰性" diff --git a/code/R-notebook/ch03/03-colab.ipynb b/code/R-notebook/ch03/03-colab.ipynb index 2ec5367..1b169c0 100644 --- a/code/R-notebook/ch03/03-colab.ipynb +++ b/code/R-notebook/ch03/03-colab.ipynb @@ -14,6 +14,7 @@ "outputs": [], "source": [ "# Google Colaboratoryの環境設定\n", + "options(Ncpus = 2)\n", "install.packages(c(\"furrr\", \"keras\", \"proxy\"))" ] }, diff --git a/code/R-notebook/ch04/04-colab.ipynb b/code/R-notebook/ch04/04-colab.ipynb index 892c310..b59bc4f 100644 --- a/code/R-notebook/ch04/04-colab.ipynb +++ b/code/R-notebook/ch04/04-colab.ipynb @@ -14,6 +14,7 @@ "outputs": [], "source": [ "# Google Colaboratoryの環境設定\n", + "options(Ncpus = 2)\n", "install.packages(c(\"exactci\", \"ggmosaic\", \"pastecs\", \"psych\", \"vcd\"))" ] }, diff --git a/code/R-notebook/ch05/05-colab.ipynb b/code/R-notebook/ch05/05-colab.ipynb index 6a4f35d..35c4830 100644 --- a/code/R-notebook/ch05/05-colab.ipynb +++ b/code/R-notebook/ch05/05-colab.ipynb @@ -14,6 +14,7 @@ "outputs": [], "source": [ "# Google Colaboratoryの環境設定\n", + "options(Ncpus = 2)\n", "install.packages(\"caret\")" ] }, diff --git a/code/R-notebook/ch07/07-colab.ipynb b/code/R-notebook/ch07/07-colab.ipynb index 1167ea7..c7ea61a 100644 --- a/code/R-notebook/ch07/07-colab.ipynb +++ b/code/R-notebook/ch07/07-colab.ipynb @@ -14,6 +14,7 @@ "outputs": [], "source": [ "# Google Colaboratoryの環境設定\n", + "options(Ncpus = 2)\n", "install.packages(c(\"caret\", \"doParallel\", \"pastecs\"))" ] }, diff --git a/code/R-notebook/ch08/08-colab.ipynb b/code/R-notebook/ch08/08-colab.ipynb index 17e6136..4ba249e 100644 --- a/code/R-notebook/ch08/08-colab.ipynb +++ b/code/R-notebook/ch08/08-colab.ipynb @@ -14,6 +14,7 @@ "outputs": [], "source": [ "# Google Colaboratoryの環境設定\n", + "options(Ncpus = 2)\n", "install.packages(c(\"caret\", \"ggfortify\", \"glmnet\", \"glmnetUtils\", \"leaps\", \"neuralnet\", \"psych\"))" ] }, diff --git a/code/R-notebook/ch09/09-colab.ipynb b/code/R-notebook/ch09/09-colab.ipynb index 8057c91..6ecd7af 100644 --- a/code/R-notebook/ch09/09-colab.ipynb +++ b/code/R-notebook/ch09/09-colab.ipynb @@ -14,6 +14,7 @@ "outputs": [], "source": [ "# Google Colaboratoryの環境設定\n", + "options(Ncpus = 2)\n", "install.packages(c(\"caret\", \"e1071\", \"furrr\", \"psych\", \"randomForest\", \"rpart.plot\", \"xgboost\"))" ] }, diff --git a/code/R-notebook/ch10/10-colab.ipynb b/code/R-notebook/ch10/10-colab.ipynb index d41f68c..9726b7b 100644 --- a/code/R-notebook/ch10/10-colab.ipynb +++ b/code/R-notebook/ch10/10-colab.ipynb @@ -14,6 +14,7 @@ "outputs": [], "source": [ "# Google Colaboratoryの環境設定\n", + "options(Ncpus = 2)\n", "install.packages(c(\"caret\", \"e1071\", \"PRROC\", \"rpart.plot\"))" ] }, diff --git a/code/R-notebook/ch11/11-colab.ipynb b/code/R-notebook/ch11/11-colab.ipynb index 2260d3c..0ebc362 100644 --- a/code/R-notebook/ch11/11-colab.ipynb +++ b/code/R-notebook/ch11/11-colab.ipynb @@ -14,6 +14,7 @@ "outputs": [], "source": [ "# Google Colaboratoryの環境設定\n", + "options(Ncpus = 2)\n", "install.packages(c(\"h2o\", \"keras\"))" ] }, diff --git a/code/R-notebook/ch12/12-colab.ipynb b/code/R-notebook/ch12/12-colab.ipynb index 447fd37..69cb893 100644 --- a/code/R-notebook/ch12/12-colab.ipynb +++ b/code/R-notebook/ch12/12-colab.ipynb @@ -14,7 +14,8 @@ "outputs": [], "source": [ "# Google Colaboratoryの環境設定\n", - "system(\"sudo apt install -y libcurl4-openssl-dev libv8-dev r-cran-rcppeigen\")\n", + "system(\"apt-get install -y libcurl4-openssl-dev libv8-dev r-cran-rcppeigen\")\n", + "options(Ncpus = 2)\n", "install.packages(c(\"caret\", \"fable\", \"feasts\", \"prophet\", \"tsibble\", \"urca\"))" ] }, diff --git a/code/R-notebook/ch13/13-colab.ipynb b/code/R-notebook/ch13/13-colab.ipynb index 30ae416..e848959 100644 --- a/code/R-notebook/ch13/13-colab.ipynb +++ b/code/R-notebook/ch13/13-colab.ipynb @@ -14,6 +14,7 @@ "outputs": [], "source": [ "# Google Colaboratoryの環境設定\n", + "options(Ncpus = 2)\n", "install.packages(c(\"factoextra\", \"gplots\", \"igraph\"))\n", "devtools::install_github(\"vqv/ggbiplot\")" ]