def generate_class_label_presence_and_dynamic(data, state_variable='State'):
    "\n    generates class label only for presence on a copy of data using only the columns\n    Removes: Pause and merges 'Step' and 'Stand' to same class\n    "
    r_data = data.copy()
    r_data['target'] = r_data[state_variable].astype(np.str)
    r_data = r_data[(~ r_data['target'].str.contains('Pause'))]
    r_data = r_data[(~ r_data['target'].str.contains('Enter'))]
    r_data = r_data[(~ r_data['target'].str.contains('Leave'))]
    r_data.loc[(r_data['target'].str.contains('Step'), 'target')] = 'Step'
    r_data.loc[(r_data['target'].str.contains('Walki'), 'target')] = 'Walk'
    r_data.loc[(r_data['target'].str.contains('Stand'), 'target')] = 'Stand'
    r_data.loc[(r_data['target'].str.contains('Empty'), 'target')] = 'Empty'
    return r_data
generates class label only for presence on a copy of data using only the columns
Removes: Pause and merges 'Step' and 'Stand' to same class
def generate_class_label_presence_and_dynamic(data, state_variable='State'):
    "\n    generates class label only for presence on a copy of data using only the columns\n    Removes: Pause and merges 'Step' and 'Stand' to same class\n    "
    r_data = data.copy()
    r_data['target'] = r_data[state_variable].astype(np.str)
    r_data = r_data[(~ r_data['target'].str.contains('Pause'))]
    r_data = r_data[(~ r_data['target'].str.contains('Enter'))]
    r_data = r_data[(~ r_data['target'].str.contains('Leave'))]
    r_data.loc[(r_data['target'].str.contains('Step'), 'target')] = 'Step'
    r_data.loc[(r_data['target'].str.contains('Walki'), 'target')] = 'Walk'
    r_data.loc[(r_data['target'].str.contains('Stand'), 'target')] = 'Stand'
    r_data.loc[(r_data['target'].str.contains('Empty'), 'target')] = 'Empty'
    return r_data