diff notebooks/test_hubness.ipynb @ 71:04fc6e809a42 branch-tests

notebooks
author mpanteli <m.x.panteli@gmail.com>
date Fri, 22 Sep 2017 18:03:41 +0100
parents b0e194bfb71d
children 930c35ab894c
line wrap: on
line diff
--- a/notebooks/test_hubness.ipynb	Thu Sep 21 20:11:43 2017 +0100
+++ b/notebooks/test_hubness.ipynb	Fri Sep 22 18:03:41 2017 +0100
@@ -2,11 +2,18 @@
  "cells": [
   {
    "cell_type": "code",
-   "execution_count": 1,
-   "metadata": {
-    "collapsed": true
-   },
-   "outputs": [],
+   "execution_count": 16,
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "The autoreload extension is already loaded. To reload it, use:\n",
+      "  %reload_ext autoreload\n"
+     ]
+    }
+   ],
    "source": [
     "import numpy as np\n",
     "import pickle\n",
@@ -28,7 +35,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 3,
+   "execution_count": 17,
    "metadata": {
     "collapsed": true
    },
@@ -46,7 +53,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 4,
+   "execution_count": 18,
    "metadata": {},
    "outputs": [
     {
@@ -55,7 +62,7 @@
        "(8200, 380)"
       ]
      },
-     "execution_count": 4,
+     "execution_count": 18,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -79,12 +86,13 @@
    },
    "outputs": [],
    "source": [
-    "D = pairwise_distances(X, metric='mahalanobis')"
+    "D = pairwise_distances(X, metric='mahalanobis')\n",
+    "np.savetxt('../data/D_mahal.csv', D)"
    ]
   },
   {
    "cell_type": "code",
-   "execution_count": 5,
+   "execution_count": 19,
    "metadata": {},
    "outputs": [
     {
@@ -93,13 +101,12 @@
        "(8200, 8200)"
       ]
      },
-     "execution_count": 5,
+     "execution_count": 19,
      "metadata": {},
      "output_type": "execute_result"
     }
    ],
    "source": [
-    "np.savetxt('../data/D_mahal.csv', D)\n",
     "D = np.loadtxt('../data/D_mahal.csv')\n",
     "D.shape"
    ]