Skip to content

Commit

Permalink
mlrose dep
Browse files Browse the repository at this point in the history
  • Loading branch information
JHoelli committed Jul 19, 2023
1 parent 1357bfa commit e2f4adb
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 21 deletions.
67 changes: 47 additions & 20 deletions docs/Notebooks/TSEvo_torch.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,45 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Collecting https://github.com/gkhayes/mlrose/archive/refs/heads/master.zip\n",
" Using cached https://github.com/gkhayes/mlrose/archive/refs/heads/master.zip\n",
" Preparing metadata (setup.py) ... \u001b[?25ldone\n",
"\u001b[?25hRequirement already satisfied: numpy in /home/jacqueline/.local/share/virtualenvs/TSInterpret-x4eqnPOt/lib/python3.9/site-packages (from mlrose==1.3.0) (1.24.3)\n",
"Requirement already satisfied: scipy in /home/jacqueline/.local/share/virtualenvs/TSInterpret-x4eqnPOt/lib/python3.9/site-packages (from mlrose==1.3.0) (1.11.1)\n",
"Requirement already satisfied: scikit-learn in /home/jacqueline/.local/share/virtualenvs/TSInterpret-x4eqnPOt/lib/python3.9/site-packages (from mlrose==1.3.0) (1.3.0)\n",
"Requirement already satisfied: joblib>=1.1.1 in /home/jacqueline/.local/share/virtualenvs/TSInterpret-x4eqnPOt/lib/python3.9/site-packages (from scikit-learn->mlrose==1.3.0) (1.3.1)\n",
"Requirement already satisfied: threadpoolctl>=2.0.0 in /home/jacqueline/.local/share/virtualenvs/TSInterpret-x4eqnPOt/lib/python3.9/site-packages (from scikit-learn->mlrose==1.3.0) (3.2.0)\n",
"\n",
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.1.2\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m23.2\u001b[0m\n",
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n"
]
}
],
"source": [
"!pip install https://github.com/gkhayes/mlrose/archive/refs/heads/master.zip"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/jacqueline/.local/share/virtualenvs/TSInterpret-x4eqnPOt/lib/python3.9/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
" from .autonotebook import tqdm as notebook_tqdm\n"
]
}
],
"source": [
"import os\n",
"os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' \n",
Expand Down Expand Up @@ -59,7 +95,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -83,7 +119,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -101,7 +137,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -111,7 +147,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 7,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -152,17 +188,9 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<class 'numpy.int64'>\n"
]
}
],
"outputs": [],
"source": [
"from TSInterpret.InterpretabilityModels.counterfactual.TSEvoCF import TSEvo\n",
"exp =TSEvo(model= model,data=(test_x,np.array(y_pred)), mode = 'feat',backend='PYT',epochs =500)"
Expand All @@ -185,14 +213,13 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(1, 1, 140)\n",
"No Target\n"
]
}
Expand All @@ -211,7 +238,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -246,7 +273,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.16"
"version": "3.9.17"
},
"orig_nbformat": 4,
"vscode": {
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"pytest>=4.5.0,< 5.0",
"pytest-cov>=2.6.1,< 3.0",
"pyupgrade>=3.2.0,< 4.0",
"mlrose @ https://github.com/gkhayes/mlrose/archive/refs/heads/master.zip"
#"mlrose @ https://github.com/gkhayes/mlrose/archive/refs/heads/master.zip"
]

docs_packages = [
Expand Down

0 comments on commit e2f4adb

Please sign in to comment.