original_docstring:  Plot the hyperplane (in 3D a surface).
          
docstring: Plot the hyperplane (in 3D a surface).
docstring_tokens: Plot the hyperplane ( in 3D a surface ) .
code: def plot_hyperplane_3D(self):
          """ Plot the hyperplane (in 3D a surface).
          """
          ax = plt.gca(projection='3d')
          ax.set_title("$wx + b = 0$\n$[%.4f; %.4f; %.4f]x + %.4f = 0$"\
                       % (self.w[0], self.w[1], self.w[2], self.b))
  
          if self.surf is not None:
              self.surf.remove()
              self.surf = None
  
          # create x,y
          xx, yy = numpy.meshgrid(numpy.arange(-2.0, 2.0, 0.05),\
                                  numpy.arange(-2.0, 2.0, 0.05))
  
          # calculate corresponding z
          z = (-self.w[0] * xx - self.w[1] * yy - self.b) * 1. / self.w[2]
          self.surf = ax.plot_surface(xx, yy, z, alpha=0.2)
code_tokens: def plot_hyperplane_3D ( self ) : ax = plt . gca ( projection = '3d' ) ax . set_title ( "$wx + b = 0$\n$[%.4f; %.4f; %.4f]x + %.4f = 0$" % ( self . w [ 0 ] , self . w [ 1 ] , self . w [ 2 ] , self . b ) ) if self . surf is not None : self . surf . remove ( ) self . surf = None xx , yy = numpy . meshgrid ( numpy . arange ( - 2.0 , 2.0 , 0.05 ) , numpy . arange ( - 2.0 , 2.0 , 0.05 ) ) z = ( - self . w [ 0 ] * xx - self . w [ 1 ] * yy - self . b ) * 1. / self . w [ 2 ] self . surf = ax . plot_surface ( xx , yy , z , alpha = 0.2 )
short_docstring: Plot the hyperplane (in 3D a surface).
short_docstring_tokens: Plot the hyperplane ( in 3D a surface ) .
comment: """ Plot the hyperplane (in 3D a surface).
          """$SEP$# create x,y$SEP$# calculate corresponding z