<jupyter_start><jupyter_text>Where only TR signal is present, set to 0 by subtract itself<jupyter_code>air_pwr[tr] -= air_pwr[tr]<jupyter_output><empty_output><jupyter_text>Where TR signal is mixed with Air signal, remove the mean value of TR signal<jupyter_code>air_pwr[tr_air] -= u_tr<jupyter_output><empty_output><jupyter_text>Comparation<jupyter_code>fig, ax = plt.subplots(figsize=(10,4), sharex=True)
ax.plot(air_old[:1440])
ax.plot(air_pwr[:1440], c='g', ls = '--')
tr_signal = (air_old - air_pwr)
datasets['air']['TR'] = tr_signal<jupyter_output><empty_output><jupyter_text>Fridge<jupyter_code>fridge_old = datasets['fridge'].copy()
fridge = datasets['fridge']
fg_pwr = fridge['Pwr']
lp =  (fg_pwr > 5) & (fg_pwr < 30)
u_lp = fg_pwr[lp].mean()
fg_pwr[lp] -= fg_pwr[lp]
fig, ax = plt.subplots(figsize=(18,4), sharex=True)
plt.plot(fridge_old['Pwr'][:1440])
plt.plot(fg_pwr[:1440], c='g', ls = '--')<jupyter_output><empty_output><jupyter_text>Fan<jupyter_code>fan_old = datasets['fan'].copy()
fan = datasets['fan']
fan_pwr = fan['Pwr']
lp_f = (fan_pwr > 3) & (fan_pwr < 20)
u_lpf = fan_pwr[lp_f].mean()
fan_pwr[lp_f] -= fan_pwr[lp_f]
fig, ax = plt.subplots(figsize=(18,4), sharex=True)
plt.plot(fan_old['Pwr'][:5440])
plt.plot(fan_pwr[:5440], c='g', ls = '--')
pc_old = datasets['computer'].copy()
pc = datasets['computer']
pc_pwr = pc['Pwr']
rasp = (pc_pwr > 2) & (pc_pwr < 15)
u_rasp = pc_pwr[rasp].mean()
pc_pwr[rasp] -= pc_pwr[rasp]
fig, ax = plt.subplots(figsize=(18,4), sharex=True)
plt.plot(pc_old['Pwr'][:5440])
plt.plot(pc_pwr[:5440], c='g', ls = '--')
for key in datasets:
    print(key)
    datasets[key].name = str(key)
    datasets[key].to_csv(OFFSTD_DB_DIR+"/{}.csv".format(key), float_format='%.4f')<jupyter_output>external
fan
air
pump
fridge
computer
house
{'fraction_non_alphanumeric': 0.19842608206857784, 'fraction_numerical': 0.030916245081506463, 'mean_word_length': 7.165137614678899, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '83946', 'license': 'MIT', 'n_tokens_mistral': 843, 'n_tokens_neox': 797, 'n_words': 123, 'path': 'data_processing/TREATER/2.offset_remover.ipynb', 'repo_name': 'XxKavosxX/consumption_data_analysis', 'size': '1779'}