---------------------------------------------------------------------------
KeyboardInterrupt Traceback (most recent call last)
<ipython-input-7-725ca8ef1bf0> in <module>()
----> 1 X = k.transform(X_train)
/home/jmatsen/Machine_Learning_CSE_546/HW3/code/rbf_kernel.py in transform(self, X)
51 """
52 # TODO: could apply only to the first 1/2 of point (I think)
---> 53 return np.apply_along_axis(func1d=self.transform_vector, axis=1, arr=X)
/home/jmatsen/miniconda2/envs/mlpy3/lib/python3.5/site-packages/numpy/lib/shape_base.py in apply_along_axis(func1d, axis, arr, *args, **kwargs)
126 n -= 1
127 i.put(indlist, ind)
--> 128 res = func1d(arr[tuple(i.tolist())], *args, **kwargs)
129 outarr[tuple(i.tolist())] = res
130 k += 1
/home/jmatsen/Machine_Learning_CSE_546/HW3/code/rbf_kernel.py in transform_vector(self, xi)
42 transforms a single point
43 """
---> 44 dist = np.linalg.norm(self.X - xi, axis=1)
45 dist_squared = np.multiply(dist, dist)
46 return np.exp(dist_squared/(-2.)/self.sigma**2)
/home/jmatsen/miniconda2/envs/mlpy3/lib/python3.5/site-packages/numpy/linalg/linalg.py in norm(x, ord, axis, keepdims)
2157 elif ord is None or ord == 2:
2158 # special case for speedup
-> 2159 s = (x.conj() * x).real
2160 return sqrt(add.reduce(s, axis=axis, keepdims=keepdims))
2161 else:
KeyboardInterrupt: