質問編集履歴

1

文法の修正

2018/11/16 14:11

投稿

shiek
shiek

スコア12

test CHANGED
File without changes
test CHANGED
@@ -26,7 +26,7 @@
26
26
 
27
27
 
28
28
 
29
- X_new = np.hstack([X, X[:,1:]**2])
29
+ X_new = np.hstack([X, X[:,1:]*2]) # うまくteratail上で表示できませんが, X[:,1:]の2乗としたいです.
30
30
 
31
31
  from mpl_toolkits.mplot3d import Axes3D, axes3d
32
32
 
@@ -42,7 +42,7 @@
42
42
 
43
43
  ax.scatter(X_new[~mask,0], X_new[~mask,1], X_new[~mask,2], c='r',
44
44
 
45
- marker='^', cmap=mglearn.cm2, s=60)
45
+ marker='^', cmap=mglearn.cm2, s=60) # この行の~maskの意味がわかりません
46
46
 
47
47
  ax.set_xlabel('feature0')
48
48