original_docstring: Reduce the samples in a label to the given value of it
      Parameters
      ----------
      data : dictionary
          The data dictionary, each element is array-like
      label_key : key
          The key of the class to be reduced in the array
          Default: None (choose the first in the key list)
      proportion: double
          The 0..1 value of the remaining size of the array
          Default: 0.2
      shuffle : boolean
          Shuffle the dictionary before split.
          Default: True
      Returns
      -------
      data
          The reduced dictionary
      label_key
          The key to the reduced type
docstring: Reduce the samples in a label to the given value of it
  Parameters
  
  
  
  data
  The reduced dictionary
  label_key
  The key to the reduced type
docstring_tokens: Reduce the samples in a label to the given value of it Parameters data The reduced dictionary label_key The key to the reduced type
code: def reduce_class_samples(data, label_key=None,
                          proportion=0.2, shuffle=True):
      """Reduce the samples in a label to the given value of it
      Parameters
      ----------
      data : dictionary
          The data dictionary, each element is array-like
      label_key : key
          The key of the class to be reduced in the array
          Default: None (choose the first in the key list)
      proportion: double
          The 0..1 value of the remaining size of the array
          Default: 0.2
      shuffle : boolean
          Shuffle the dictionary before split.
          Default: True
      Returns
      -------
      data
          The reduced dictionary
      label_key
          The key to the reduced type"""
      data_new = copy.deepcopy(data)
      if(label_key==None):
          label_key = data_new.keys()[0]
      label_size = len(data_new[label_key])
      data_port = (int) (label_size*proportion)
      data_temp = copy.deepcopy(data_new[label_key])
      if(shuffle):
          perm = random_state.permutation(len(data_temp))
          data_temp = np.array(data_temp)[perm]
      data_new[label_key] = copy.deepcopy(data_temp[:data_port])
      return data_new, label_key
code_tokens: def reduce_class_samples ( data , label_key = None , proportion = 0.2 , shuffle = True ) : data_new = copy . deepcopy ( data ) if ( label_key == None ) : label_key = data_new . keys ( ) [ 0 ] label_size = len ( data_new [ label_key ] ) data_port = ( int ) ( label_size * proportion ) data_temp = copy . deepcopy ( data_new [ label_key ] ) if ( shuffle ) : perm = random_state . permutation ( len ( data_temp ) ) data_temp = np . array ( data_temp ) [ perm ] data_new [ label_key ] = copy . deepcopy ( data_temp [ : data_port ] ) return data_new , label_key
short_docstring: Reduce the samples in a label to the given value of it
  Parameters
short_docstring_tokens: Reduce the samples in a label to the given value of it Parameters
comment: """Reduce the samples in a label to the given value of it
      Parameters
      ----------
      data : dictionary
          The data dictionary, each element is array-like
      label_key : key
          The key of the class to be reduced in the array
          Default: None (choose the first in the key list)
      proportion: double
          The 0..1 value of the remaining size of the array
          Default: 0.2
      shuffle : boolean
          Shuffle the dictionary before split.
          Default: True
      Returns
      -------
      data
          The reduced dictionary
      label_key
          The key to the reduced type"""