Kernel: Python 2 (SageMath)
In [14]:
In [ ]:
In [ ]:
In [ ]:
In [6]:
In [7]:
Out[7]:
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-7-257ae005a5ab> in <module>()
----> 1 U = np.c_[X[:, 2], X[:, 3]]
2
3 plt.figure(figsize=(7.0, 6.0))
4 plot_map2d(clf, U)
5 plt.scatter(clf.support_vectors_[:, 0], clf.support_vectors_[:, 1], s = 225, c = 'w')
NameError: name 'np' is not defined
In [ ]:
In [12]:
Out[12]:
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-12-5aff663627e4> in <module>()
----> 1 cv = cross_validation.train_test_split(U, Y, test_size=0.4)
2 clf_list = []
3 train_scores = []
4 test_scores = []
5 for i in range(50):
NameError: name 'cross_validation' is not defined
In [11]:
Out[11]:
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-11-05b02b801ccb> in <module>()
----> 1 plt.figure(figsize=(14,6))
2 plt.subplot(1,2,1)
3 train_scores = list(sorted(train_scores))
4 plt.plot(range(len(train_scores)), train_scores, marker='o', markersize=10)
5 plt.subplot(1,2,2)
NameError: name 'plt' is not defined
In [ ]: