original_docstring: 
      Changes the sample label according to the number of positive pixels.
      :param threshold:
      :return:
      
docstring: Changes the sample label according to the number of positive pixels.
docstring_tokens: Changes the sample label according to the number of positive pixels .
code: def is_positive(self, threshold: float):
      """
      Changes the sample label according to the number of positive pixels.
      :param threshold:
      :return:
      """
  
      semantic_image = self.get_semantic_image()
      positive_colorss = self.get_positive_colors()
      positive_pixels = 0
  
      for index in np.ndindex(semantic_image.shape[:2]):
          if semantic_image[index].tolist() in positive_colorss:
              positive_pixels += 1
  
      if positive_pixels > semantic_image.shape[0] * semantic_image.shape[1] * threshold / 100:
          self.set_label(1)
      else:
          self.set_label(0)
code_tokens: def is_positive ( self , threshold : float ) : semantic_image = self . get_semantic_image ( ) positive_colorss = self . get_positive_colors ( ) positive_pixels = 0 for index in np . ndindex ( semantic_image . shape [ : 2 ] ) : if semantic_image [ index ] . tolist ( ) in positive_colorss : positive_pixels += 1 if positive_pixels > semantic_image . shape [ 0 ] * semantic_image . shape [ 1 ] * threshold / 100 : self . set_label ( 1 ) else : self . set_label ( 0 )
short_docstring: Changes the sample label according to the number of positive pixels.
short_docstring_tokens: Changes the sample label according to the number of positive pixels .
comment: """
      Changes the sample label according to the number of positive pixels.
      :param threshold:
      :return:
      """