<jupyter_start><jupyter_text>Pavia<jupyter_code>print(img_gt[1800])
plt.figure()
plt.plot(img[1800,:])
plt.title('Class 1 - original')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('/content/drive/My Drive/Major_Project/Figures/PUClass1.png',dpi=300, bbox_inches='tight')
plt.figure()
plt.plot(img_dr[1800,:])
plt.title('Class 1 - Supervised Reduced Dimension')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('/content/drive/My Drive/Major_Project/Figures/PUClass1_DR.png',dpi=300, bbox_inches='tight')
plt.figure()
plt.plot(img_dr_un[1800,:])
plt.title('Class 1 - Unsupervised Reduced Dimension')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('/content/drive/My Drive/Major_Project/Figures/PUClass1_DR_un.png',dpi=300, bbox_inches='tight')
print(img_gt[49432])
plt.figure()
plt.plot(img[49432,:])
plt.title('Class 5 - original')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('/content/drive/My Drive/Major_Project/Figures/PUClass5.png',dpi=300, bbox_inches='tight')
plt.figure()
plt.plot(img_dr[49432,:])
plt.title('Class 5 - Supervised Reduced Dimension')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('/content/drive/My Drive/Major_Project/Figures/PUClass5_DR.png',dpi=300, bbox_inches='tight')
plt.figure()
plt.plot(img_dr_un[49432,:])
plt.title('Class 5 - Unsupervised Reduced Dimension')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('/content/drive/My Drive/Major_Project/Figures/PUClass5_DR_un.png',dpi=300, bbox_inches='tight')
print(img_gt[112676])
plt.figure()
plt.plot(img[112676,:])
plt.title('Class 9 - original')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('/content/drive/My Drive/Major_Project/Figures/PUClass9.png',dpi=300, bbox_inches='tight')
plt.figure()
plt.plot(img_dr[112676,:])
plt.title('Class 9 - Supervised Reduced Dimension')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('/content/drive/My Drive/Major_Project/Figures/PUClass9_DR.png',dpi=300, bbox_inches='tight')
plt.figure()
plt.plot(img_dr_un[112676,:])
plt.title('Class 9 - Unsupervised Reduced Dimension')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('/content/drive/My Drive/Major_Project/Figures/PUClass9_DR_un.png',dpi=300, bbox_inches='tight')
print(img_gt[98948])
plt.figure()
plt.plot(img[98948,:])
plt.title('Class 3 - original')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('/content/drive/My Drive/Major_Project/Figures/PUClass3.png',dpi=300, bbox_inches='tight')
plt.figure()
plt.plot(img_dr[98948,:])
plt.title('Class 3 - Supervised Reduced Dimension')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('/content/drive/My Drive/Major_Project/Figures/PUClass3_DR.png',dpi=300, bbox_inches='tight')
plt.figure()
plt.plot(img_dr_un[98948,:])
plt.title('Class 3 - Unsupervised Reduced Dimension')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('/content/drive/My Drive/Major_Project/Figures/PUClass3_DR_un.png',dpi=300, bbox_inches='tight')<jupyter_output>3<jupyter_text>Pavia - Unsupervised<jupyter_code>print(img_gt[1800])
plt.figure()
plt.plot(img[1800,:])
plt.title('Class 1 - original')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('PUClass1.png',dpi=300, bbox_inches='tight')
plt.figure()
plt.plot(img_dr_un[1800,:])
plt.title('Class 1 - Unsupervised Reduced Dimension')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('PUClass1_DR.png',dpi=300, bbox_inches='tight')
print(img_gt[49432])
plt.figure()
plt.plot(img[49432,:])
plt.title('Class 5 - original')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('PUClass5.png',dpi=300, bbox_inches='tight')
plt.figure()
plt.plot(img_dr_un[49432,:])
plt.title('Class 5 - Unsupervised Reduced Dimension')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('PUClass5_DR.png',dpi=300, bbox_inches='tight')
print(img_gt[112676])
plt.figure()
plt.plot(img[112676,:])
plt.title('Class 9 - original')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('PUClass9.png',dpi=300, bbox_inches='tight')
plt.figure()
plt.plot(img_dr_un[112676,:])
plt.title('Class 9 - Unsupervised Reduced Dimension')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('PUClass9_DR.png',dpi=300, bbox_inches='tight')
print(img_gt[98948])
plt.figure()
plt.plot(img[98948,:])
plt.title('Class 3 - original')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('PUClass3.png',dpi=300, bbox_inches='tight')
plt.figure()
plt.plot(img_dr_un[98948,:])
plt.title('Class 3 - Unsupervised Reduced Dimension')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('PUClass3_DR.png',dpi=300, bbox_inches='tight')<jupyter_output>3<jupyter_text>Indian Pines<jupyter_code>img = loadmat('/content/drive/My Drive/Major_Project/Data/Indian_Pines.mat')
img_gt = loadmat('/content/drive/My Drive/Major_Project/Data/Indian_Pines_gt.mat')
img_dr = np.load('/content/drive/My Drive/Major_Project/Supervised_Results/Indian_Pines/DR/img_orig_DR_30.npy')
img_dr_un = np.load('/content/drive/My Drive/Major_Project/unSupervised_Results/Indian_Pines/DR/Test0_DR_imgorig_30.npy')
img = img['indian_pines_corrected']
gt = img_gt['indian_pines_gt']
height, width, bands = img.shape[0], img.shape[1], img.shape[2]
img = np.reshape(img, [height*width, bands])
img_gt = np.reshape(gt, [height*width,])
img = preprocessing.normalize(img.astype('float32'))
img_dr = preprocessing.normalize(img_dr.astype('float32'))
img_dr_un = preprocessing.normalize(img_dr_un.astype('float32'))
a = np.arange(height*width)
print(a[img_gt==9])
print(img_gt[9376])
plt.figure()
plt.plot(img[9376,:])
plt.title('Class 1 - original')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('/content/drive/My Drive/Major_Project/Figures/IPClass1.png',dpi=300, bbox_inches='tight')
plt.figure()
plt.plot(img_dr[9376,:])
plt.title('Class 1 - Supervised Reduced Dimension')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('/content/drive/My Drive/Major_Project/Figures/IPClass1_DR.png',dpi=300, bbox_inches='tight')
plt.figure()
plt.plot(img_dr_un[9376,:])
plt.title('Class 1 - Unsupervised Reduced Dimension')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('/content/drive/My Drive/Major_Project/Figures/IPClass1_DR_un.png',dpi=300, bbox_inches='tight')
print(img_gt[895])
plt.figure()
plt.plot(img[895,:])
plt.title('Class 5 - original')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('/content/drive/My Drive/Major_Project/Figures/IPClass5.png',dpi=300, bbox_inches='tight')
plt.figure()
plt.plot(img_dr[895,:])
plt.title('Class 5 - Supervised Reduced Dimension')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('/content/drive/My Drive/Major_Project/Figures/IPClass5_DR.png',dpi=300, bbox_inches='tight')
plt.figure()
plt.plot(img_dr_un[895,:])
plt.title('Class 5 - Unsupervised Reduced Dimension')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('/content/drive/My Drive/Major_Project/Figures/IPClass5_DR_un.png',dpi=300, bbox_inches='tight')
print(img_gt[9157])
plt.figure()
plt.plot(img[9157,:])
plt.title('Class 9 - original')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('/content/drive/My Drive/Major_Project/Figures/IPClass9.png',dpi=300, bbox_inches='tight')
plt.figure()
plt.plot(img_dr[9157,:])
plt.title('Class 9 - Supervised Reduced Dimension')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('/content/drive/My Drive/Major_Project/Figures/IPClass9_DR.png',dpi=300, bbox_inches='tight')
plt.figure()
plt.plot(img_dr_un[9157,:])
plt.title('Class 9 - Unsupervised Reduced Dimension')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('/content/drive/My Drive/Major_Project/Figures/IPClass9_DR_un.png',dpi=300, bbox_inches='tight')
print(img_gt[18455])
plt.figure()
plt.plot(img[18455,:])
plt.title('Class 3 - original')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('/content/drive/My Drive/Major_Project/Figures/IPClass3.png',dpi=300, bbox_inches='tight')
plt.figure()
plt.plot(img_dr[18455,:])
plt.title('Class 3 - Supervised Reduced Dimension')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('/content/drive/My Drive/Major_Project/Figures/IPClass3_DR.png',dpi=300, bbox_inches='tight')
plt.figure()
plt.plot(img_dr_un[18455,:])
plt.title('Class 3 - Unsupervised Reduced Dimension')
plt.ylabel('Spectral Response')
plt.xlabel('Band Number')
plt.savefig('/content/drive/My Drive/Major_Project/Figures/IPClass3_DR_un.png',dpi=300, bbox_inches='tight')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17717649722631043, 'fraction_numerical': 0.04313370315860976, 'mean_word_length': 8.211678832116789, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '495659', 'license': 'MIT', 'n_tokens_mistral': 3884, 'n_tokens_neox': 3331, 'n_words': 466, 'path': 'Figure.ipynb', 'repo_name': 'vansjyo/Fractal_Dimension_MP', 'size': '8833'}