<jupyter_start><jupyter_text>Test Data<jupyter_code>filePattern_test = ["data/parsed_P0"+str(x)+"E.mat" for x in range(1,10)]
filePattern_test.append('data/parsed_P10E.mat')
raw_data = []

def standardize(data):
    return (data-np.mean(data))/np.std(data)

for train_file in filePattern_test:
    mat = scipy.io.loadmat(train_file)
    #print(mat['RawEEGData'][0][0])
    raw_data.append(standardize(np.array(mat['RawEEGData'])))
    # print((raw_data[0][0][0][0:4]))
    # df = pd.DataFrame(raw_data[0][0][0][0:200])
    # df.plot(figsize=(30,5))
    # plt.show()
    # break
    #print(df)
np_data = np.concatenate(raw_data,axis=0)
print(np_data.shape)


np_data = np.array(np.concatenate(np.split(np_data,16,axis=2),axis=0))
print(np_data.shape)

import pickle as pkl
pkl.dump(np_data,open("test_data.pkl",'wb'))
print("Done")<jupyter_output>Done
{'fraction_non_alphanumeric': 0.19176470588235295, 'fraction_numerical': 0.03294117647058824, 'mean_word_length': 6.033057851239669, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '299285', 'license': 'MIT', 'n_tokens_mistral': 373, 'n_tokens_neox': 368, 'n_words': 40, 'path': 'T1/ParseData.ipynb', 'repo_name': 'AndreiPi/MetodeDeNatura', 'size': '850'}