<jupyter_start><jupyter_text><jupyter_code>import numpy as np
print('\nmean are as follows')
print(np.mean(abs(dsp_0)))
print(np.mean(abs(dsp_1)))
print(np.mean(abs(dsp_2)))
print(np.mean(abs(dsp_3)))
print(np.mean(abs(dsp_4)))
print(np.mean(abs(dsp_5)))
print(np.mean(abs(dsp_6)))
#print(np.mean(abs(dsp_7)))
print('\nstandard deviation are as follows')
print(np.std(dsp_0))
print(np.std(dsp_1))
print(np.std(dsp_2))
print(np.std(dsp_3))
print(np.std(dsp_4))
print(np.std(dsp_5))
print(np.std(dsp_6))
#print(np.std(dsp_7))
print('\nVariance are as follows')
print(statistics.variance(dsp_0))
print(statistics.variance(dsp_1))
print(statistics.variance(dsp_2))
print(statistics.variance(dsp_3))
print(statistics.variance(dsp_4))
print(statistics.variance(dsp_5))
print(statistics.variance(dsp_6))
#print(statistics.variance(dsp_7))

print('\n dominant frequency is 650khz')

print('Entrophy are as follows')
print('Entrophy for 231_s')

def entropy4(labels, base=None):
  value,counts = np.unique(labels, return_counts=True)
  norm_counts = counts / counts.sum()
  base = e if base is None else base
  return -(norm_counts * np.log(norm_counts)/np.log(base)).sum()
print(entropy4(IMF[0]))
print(entropy4(IMF[1]))
print(entropy4(IMF[2]))
print(entropy4(IMF[3]))
print(entropy4(IMF[4]))
print(entropy4(IMF[5]))
print(entropy4(IMF[6]))
print('For Imf[0]')
print('energy during cell growth(blue)')
dsp_g = np.fft.fftshift(np.abs(np.fft.fft(IMF[0][1:420])) ** 2)
plt.plot(np.arange(0, 419, dtype=float), dsp_g,'-b',label='growth')
print('energy during confluenece(yellow)')
dsp_c = np.fft.fftshift(np.abs(np.fft.fft(IMF[0][421:1140])) ** 2)
plt.plot(np.arange(0, 719, dtype=float), dsp_c,'-y',label='conluence')
print('energy during death phase(green)')
dsp_d = np.fft.fftshift(np.abs(np.fft.fft(IMF[0][1142:1309])) ** 2)
plt.plot(np.arange(0, 167, dtype=float), dsp_d,'-g',label='death')
print(np.mean(abs(dsp_g)))
print(np.mean(abs(dsp_c)))
print(np.mean(abs(dsp_d)))
plt.xlabel('frequency', fontsize=12)
plt.ylabel('energy-imf0', fontsize=12)
plt.legend(loc='upper left')
plt.show()
plt.savefig("emd_231_s_imf0.png",dpi=300)

print('For Imf[1]')
print('energy during cell growth(blue)')
dsp_g = np.fft.fftshift(np.abs(np.fft.fft(IMF[1][1:420])) ** 2)
plt.plot(np.arange(0, 419, dtype=float), dsp_g,'-b',label='growth')
print('energy during confluenece(yellow)')
dsp_c = np.fft.fftshift(np.abs(np.fft.fft(IMF[1][421:1140])) ** 2)
plt.plot(np.arange(0, 719, dtype=float), dsp_c,'-y',label='conluence')
print('energy during death phase(green)')
dsp_d = np.fft.fftshift(np.abs(np.fft.fft(IMF[1][1142:1309])) ** 2)
plt.plot(np.arange(0, 167, dtype=float), dsp_d,'-g',label='death')
print(np.mean(abs(dsp_g)))
print(np.mean(abs(dsp_c)))
print(np.mean(abs(dsp_d)))
plt.xlabel('frequency', fontsize=12)
plt.ylabel('energy-imf1', fontsize=12)
plt.legend(loc='upper left')
plt.show()
plt.savefig("emd_231_s_imf1.png",dpi=300)

print('For Imf[2]')
print('energy during cell growth(blue)')
dsp_g = np.fft.fftshift(np.abs(np.fft.fft(IMF[2][1:420])) ** 2)
plt.plot(np.arange(0, 419, dtype=float), dsp_g,'-b',label='growth')
print('energy during confluenece(yellow)')
dsp_c = np.fft.fftshift(np.abs(np.fft.fft(IMF[2][421:1140])) ** 2)
plt.plot(np.arange(0, 719, dtype=float), dsp_c,'-y',label='conluence')
print('energy during death phase(green)')
dsp_d = np.fft.fftshift(np.abs(np.fft.fft(IMF[2][1142:1309])) ** 2)
plt.plot(np.arange(0, 167, dtype=float), dsp_d,'-g',label='death')
print(np.mean(abs(dsp_g)))
print(np.mean(abs(dsp_c)))
print(np.mean(abs(dsp_d)))
plt.xlabel('frequency', fontsize=12)
plt.ylabel('energy-imf2', fontsize=12)
plt.legend(loc='upper left')
plt.show()
plt.savefig("emd_231_s_imf1.png",dpi=300)

print('For Imf[3]')
print('energy during cell growth(blue)')
dsp_g = np.fft.fftshift(np.abs(np.fft.fft(IMF[3][1:420])) ** 2)
plt.plot(np.arange(0, 419, dtype=float), dsp_g,'-b',label='growth')
print('energy during confluenece(yellow)')
dsp_c = np.fft.fftshift(np.abs(np.fft.fft(IMF[3][421:1140])) ** 2)
plt.plot(np.arange(0, 719, dtype=float), dsp_c,'-y',label='conluence')
print('energy during death phase(green)')
dsp_d = np.fft.fftshift(np.abs(np.fft.fft(IMF[3][1142:1309])) ** 2)
plt.plot(np.arange(0, 167, dtype=float), dsp_d,'-g',label='death')
print(np.mean(abs(dsp_g)))
print(np.mean(abs(dsp_c)))
print(np.mean(abs(dsp_d)))
plt.xlabel('frequency', fontsize=12)
plt.ylabel('energy-imf3', fontsize=12)
plt.legend(loc='upper left')
plt.show()
plt.savefig("emd_231_s_imf2.png",dpi=300)

print('For Imf[4]')
print('energy during cell growth(blue)')
dsp_g = np.fft.fftshift(np.abs(np.fft.fft(IMF[4][1:420])) ** 2)
plt.plot(np.arange(0, 419, dtype=float), dsp_g,'-b',label='growth')
print('energy during confluenece(yellow)')
dsp_c = np.fft.fftshift(np.abs(np.fft.fft(IMF[4][421:1140])) ** 2)
plt.plot(np.arange(0, 719, dtype=float), dsp_c,'-y',label='conluence')
print('energy during death phase(green)')
dsp_d = np.fft.fftshift(np.abs(np.fft.fft(IMF[4][1142:1309])) ** 2)
plt.plot(np.arange(0, 167, dtype=float), dsp_d,'-g',label='death')
print(np.mean(abs(dsp_g)))
print(np.mean(abs(dsp_c)))
print(np.mean(abs(dsp_d)))
plt.xlabel('frequency', fontsize=12)
plt.ylabel('energy-imf4', fontsize=12)
plt.legend(loc='upper left')
plt.show()
plt.savefig("emd_231_s_imf3.png",dpi=300)<jupyter_output>For Imf[4]
energy during cell growth(blue)
energy during confluenece(yellow)
energy during death phase(green)
0.9549140039462833
1.6153647703368001
0.23647511035265809
{'fraction_non_alphanumeric': 0.21941854086670323, 'fraction_numerical': 0.06363137685134394, 'mean_word_length': 8.447322970639032, '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': '278296', 'license': 'MIT', 'n_tokens_mistral': 2730, 'n_tokens_neox': 2498, 'n_words': 320, 'path': 'src/codes/emd_231_s.ipynb', 'repo_name': 'nayanika15101/hht', 'size': '5469'}