diff --git a/examples/model_selection/RF_vs_SPORF_random_search.ipynb b/examples/model_selection/RF_vs_SPORF_random_search.ipynb index d34bd65085e78..e27c3c20b64fa 100644 --- a/examples/model_selection/RF_vs_SPORF_random_search.ipynb +++ b/examples/model_selection/RF_vs_SPORF_random_search.ipynb @@ -34,7 +34,6 @@ "print(__doc__)\n", "\n", "from sklearn.model_selection import RandomizedSearchCV\n", - "from sklearn.model_selection import GridSearchCV\n", "\n", "import pandas as pd\n", "import numpy as np\n", @@ -44,16 +43,14 @@ "from sklearn.datasets import fetch_openml\n", "from sklearn.model_selection import train_test_split\n", "from sklearn import metrics\n", - "from warnings import simplefilter\n", "\n", + "from warnings import simplefilter\n", "simplefilter(action=\"ignore\", category=FutureWarning)\n", "from warnings import simplefilter\n", - "\n", "simplefilter(action=\"ignore\", category=FutureWarning)\n", "\n", "import matplotlib\n", - "import matplotlib.pyplot as plt\n", - "import numpy as np" + "import matplotlib.pyplot as plt" ] }, { @@ -303,13 +300,6 @@ "\n", "plt.show()" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/examples/model_selection/RF_vs_SPORF_random_search.py b/examples/model_selection/RF_vs_SPORF_random_search.py index e2bb100da4585..34497549c4e47 100644 --- a/examples/model_selection/RF_vs_SPORF_random_search.py +++ b/examples/model_selection/RF_vs_SPORF_random_search.py @@ -14,9 +14,7 @@ """ print(__doc__) -from myconfig import api_key from sklearn.model_selection import RandomizedSearchCV -from sklearn.model_selection import GridSearchCV import pandas as pd import numpy as np @@ -27,14 +25,12 @@ from sklearn.model_selection import train_test_split from sklearn import metrics from warnings import simplefilter - simplefilter(action="ignore", category=FutureWarning) from warnings import simplefilter simplefilter(action="ignore", category=FutureWarning) import matplotlib import matplotlib.pyplot as plt -import numpy as np def hyperparameter_optimization_random(X, y, *argv):