parameters: (dataSet, shuffle=0, runDetails=None)
docstring: randomizes the activity values of a dataset
  
        **Arguments**
  
          - dataSet: a _ML.Data.MLQuantDataSet_, the activities here will be randomized
  
          - shuffle: an optional toggle. If this is set, the activity values
            will be shuffled (so the number in each class remains constant)
  
          - runDetails: an optional CompositeRun object
  
        **Note**
  
          - _examples_ are randomized in place
docstring_summary: randomizes the activity values of a dataset
docstring_tokens: randomizes the activity values of a dataset
function: def RandomizeActivities(dataSet, shuffle=0, runDetails=None):
      """ randomizes the activity values of a dataset
  
        **Arguments**
  
          - dataSet: a _ML.Data.MLQuantDataSet_, the activities here will be randomized
  
          - shuffle: an optional toggle. If this is set, the activity values
            will be shuffled (so the number in each class remains constant)
  
          - runDetails: an optional CompositeRun object
  
        **Note**
  
          - _examples_ are randomized in place
  
  
      """
      nPts = dataSet.GetNPts()
      if shuffle:
          if runDetails:
              runDetails.shuffled = 1
          acts = dataSet.GetResults()[:]
          # While the random argument is the default, removing it will cause the shuffle
          # tests in UnitTestScreenComposite to fail.
          random.shuffle(acts, random=random.random)
      else:  # This part of the code isn't working as examples is not defined
          if runDetails:
              runDetails.randomized = 1
          nPossible = dataSet.GetNPossibleVals()[-1]
          acts = [random.randint(0, nPossible) for _ in len(examples)]
      for i in range(nPts):
          tmp = dataSet[i]
          tmp[-1] = acts[i]
          dataSet[i] = tmp
function_tokens: def RandomizeActivities ( dataSet , shuffle = 0 , runDetails = None ) : nPts = dataSet . GetNPts ( ) if shuffle : if runDetails : runDetails . shuffled = 1 acts = dataSet . GetResults ( ) [ : ] # While the random argument is the default, removing it will cause the shuffle # tests in UnitTestScreenComposite to fail. random . shuffle ( acts , random = random . random ) else : # This part of the code isn't working as examples is not defined if runDetails : runDetails . randomized = 1 nPossible = dataSet . GetNPossibleVals ( ) [ - 1 ] acts = [ random . randint ( 0 , nPossible ) for _ in len ( examples ) ] for i in range ( nPts ) : tmp = dataSet [ i ] tmp [ - 1 ] = acts [ i ] dataSet [ i ] = tmp