├── Autoencoders_for_bcancerint.py ├── LICENSE ├── README.md ├── bcancerint_sort1.csv ├── kmeans_for_bcancerint.py ├── r_arch.png ├── r_error.png └── r_result.png /Autoencoders_for_bcancerint.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import numpy 3 | import sklearn.datasets 4 | from sklearn import preprocessing 5 | import random; 6 | import kmeans_for_bcancerint as s; 7 | import matplotlib.pyplot as plt 8 | import pygame 9 | from superwires import games,color 10 | 11 | 12 | 13 | error_list = [] 14 | epoch_list = [] 15 | numpy.seterr(all='ignore') 16 | 17 | def sigmoid(x): 18 | #return numpy.tanh(x); 19 | return 1. / (1 + numpy.exp(-x)) 20 | 21 | 22 | 23 | class dA(object): 24 | def __init__(self, input=None, n_visible=9, n_hidden=4, \ 25 | W=None, hbias=2, vbias=2, numpy_rng=None): 26 | 27 | self.n_visible = n_visible # num of units in visible (input) layer 28 | self.n_hidden = n_hidden # num of units in hidden layer 29 | 30 | if numpy_rng is None: 31 | numpy_rng = numpy.random.RandomState(1234) 32 | 33 | if W is None: 34 | a = 1. / n_visible 35 | initial_W = numpy.array(numpy_rng.uniform( # initialize W uniformly 36 | low=-a, 37 | high=a, 38 | size=(n_visible, n_hidden))) 39 | 40 | W = initial_W 41 | 42 | W = numpy.array(W) 43 | 44 | 45 | if hbias is None: 46 | hbias = numpy.ones(n_hidden) # initialize h bias 0 47 | 48 | if vbias is None: 49 | vbias = numpy.ones(n_visible) # initialize v bias 0 50 | 51 | self.numpy_rng = numpy_rng 52 | self.x = input 53 | self.W = W 54 | self.W_prime = self.W.T 55 | self.hbias = hbias 56 | self.vbias = vbias 57 | 58 | # self.params = [self.W, self.hbias, self.vbias] 59 | 60 | 61 | 62 | def get_corrupted_input(self, input, corruption_level): 63 | assert corruption_level < 1 64 | 65 | return self.numpy_rng.binomial(size=input.shape, 66 | n=1, 67 | p=1-corruption_level) * input 68 | 69 | # Encode 70 | def get_hidden_values(self, input): 71 | return sigmoid(numpy.dot(input, self.W) + self.hbias) 72 | 73 | # Decode 74 | def get_reconstructed_input(self, hidden): 75 | return sigmoid(numpy.dot(hidden, self.W_prime) + self.vbias) 76 | 77 | 78 | def train(self,lr=0.1, corruption_level=0.0, input=None): 79 | if input is not None: 80 | self.x = input 81 | 82 | x = self.x 83 | tilde_x = self.get_corrupted_input(x, corruption_level) 84 | y = self.get_hidden_values(tilde_x) 85 | z = self.get_reconstructed_input(y) 86 | 87 | print("Error"+ str(numpy.sum((tilde_x - z)**2))) 88 | error_list.append(numpy.sum((tilde_x - z)**2)) 89 | 90 | 91 | L_h2 = x - z 92 | L_h1 = numpy.dot(L_h2, self.W) * y * (1 - y) 93 | 94 | L_vbias = L_h2 95 | L_hbias = L_h1 96 | L_W = numpy.dot(tilde_x.T, L_h1) + numpy.dot(L_h2.T, y) 97 | 98 | 99 | self.W += lr * L_W 100 | self.hbias += lr * numpy.mean(L_hbias, axis=0) 101 | self.vbias += lr * numpy.mean(L_vbias, axis=0) 102 | 103 | 104 | 105 | def negative_log_likelihood(self, corruption_level=0.07): 106 | tilde_x = self.get_corrupted_input(self.x, corruption_level) 107 | y = self.get_hidden_values(tilde_x) 108 | z = self.get_reconstructed_input(y) 109 | 110 | cross_entropy = - numpy.mean( 111 | numpy.sum(self.x * numpy.log(z) + 112 | (1 - self.x) * numpy.log(1 - z), 113 | axis=1)) 114 | #print cross_entropy; 115 | 116 | return cross_entropy 117 | 118 | 119 | def reconstruct(self, x): 120 | y = self.get_hidden_values(x) 121 | i=0; 122 | print "Trained Weights" 123 | print self.W; 124 | #print "Hidden Layer Activation"; 125 | i=0; 126 | #for a in y : 127 | #print(str(i)+" "+str(a)); 128 | #i=i+1 129 | 130 | #print numpy.ndarray.tolist(y); 131 | s.k_means(y,2); 132 | 133 | z = self.get_reconstructed_input(y) 134 | #print "Reconstructed data" 135 | #print z 136 | return z 137 | 138 | 139 | 140 | def test_dA(learning_rate=0.005, corruption_level=0.0, training_epochs=10000): 141 | 142 | 143 | input_array = numpy.genfromtxt("C:\\Users\\SUMANTH C\\Desktop\\Deep Learning\\Datasets\\bcancerint_sort1.csv",delimiter=','); 144 | 145 | 146 | input_array = input_array[:,:9]; 147 | print (input_array.shape); 148 | min_max_scaler = preprocessing.MinMaxScaler(feature_range=(0.1,0.9)) 149 | 150 | data= min_max_scaler.fit_transform(input_array); 151 | 152 | data = numpy.array(data); 153 | 154 | print"------------" 155 | print"------------" 156 | print"------------" 157 | 158 | 159 | rng = numpy.random.RandomState(123) 160 | 161 | # construct dA 162 | da = dA(input=data, n_visible=9, n_hidden=4, numpy_rng=rng) 163 | 164 | # train 165 | for epoch in xrange(training_epochs): 166 | da.train(lr=learning_rate, corruption_level=corruption_level); 167 | 168 | for i in range(0,training_epochs): 169 | epoch_list.append(i) 170 | 171 | plt.plot(epoch_list, error_list) 172 | plt.title("Error vs No of epochs") 173 | plt.xlabel("No of Epochs") 174 | plt.ylabel("Error") 175 | plt.show() 176 | 177 | 178 | print("Completed") 179 | print("-------------------------------") 180 | print("\n") 181 | 182 | da.reconstruct(data) 183 | 184 | 185 | 186 | if __name__ == "__main__": 187 | games.init(screen_width = 1000, screen_height = 800, fps = 50) 188 | back_image = games.load_image("white_back.jpg",transparent = False) 189 | games.screen.background = back_image 190 | auto_image = games.load_image("auto_arch.jpg") 191 | the_auto = games.Sprite(image = auto_image,x = games.screen.width/2,y = games.screen.height/2) 192 | games.screen.add(the_auto) 193 | name = games.Text(value = "Autoencoders Architecture",size = 40,color = color.black,x =games.screen.width/2-40 ,y = 60) 194 | games.screen.add(name) 195 | games.screen.mainloop() 196 | 197 | 198 | test_dA() 199 | 200 | 201 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Deep-Neural-Network-for-Clustering 2 | Autoencoders - a deep neural network was used for feature extraction followed by clustering of the "Cancer" dataset using k-means technique 3 | 4 |

Objective

5 | This project is an attempt to use “Autoencoders” which is a non-linear dimensionality reduction technique for feature extraction and then use the hidden layer activations which is given as input to the k-means algorithm for clustering. 6 | 7 | ![ds](https://github.com/sumanth-bmsce/Deep-Neural-Network-for-Clustering/blob/master/r_arch.png) 8 | 9 |

Modules

10 | This project has two main components: 11 | 12 | 1. **Autoencoders** : In this module, the objective is to give the .csv file as input to the input layer, get the hidden layer activations from the hidden layer. This is done using the gradient descent algorithm. The loss function used is the cross entropy loss function. The hidden layer activations are given as input to kmeans algorithm for clustering. 13 | 14 | 2. **K-means** : Linearly clustering the input where the input comes from the autoencoders and displaying the confusion matrix and clustering accuracy. 15 | 16 |

Algorithm

17 | 18 | **Autoencoders** 19 | 20 | **Input** : Input data matrix, No of hidden neurons, Weight matrix(W), No of clusters for k-means. 21 | 22 | Let : 23 | 24 | • X is the input data
25 | • Y is the hidden layer activations
26 | • Z is the predicted output or the reconstruction of the input X.
27 | • W denote the weights from input to hidden layer
28 | • b is the input and hidden layer bias
29 | • s(.) denote the sigmoidal function
30 | 31 | 1. Take the input X ε [0,1] and map it ( with an encoder ) to a hidden representation y ε [0,1] through a deterministic mapping. 32 | 33 | 2. The latent representation , or code is then mapped back (with a decoder) into a reconstruction of the same shape as . The mapping happens through a similar transformation. 34 | 35 | 3. The reconstruction error is calculated using the cross- entropy loss function. 36 | 37 | 4. The weights are updated using the gradient descent equation. 38 | 39 | **K-means Clustering : ** 40 | 41 | 5. Initialize the centroids randomly. 42 | 6. Update the centroids based on the Eucledian distance. 43 | 7. Group the datapoints based on minimum distance. 44 | 8. Perform steps 5,6,7 for a certain number of iterations. 45 | 46 | **Output** : Confusion Matrix and Clustering Accuracy 47 | 48 |

Results Screenshots

49 | 50 | ![res1](https://github.com/sumanth-bmsce/Deep-Neural-Network-for-Clustering/blob/master/r_error.png)
51 | 52 | ![res2](https://github.com/sumanth-bmsce/Deep-Neural-Network-for-Clustering/blob/master/r_result.png)
53 | 54 |

References

55 | 56 | [1] P. Vincent, H. Larochelle, Y. Bengio, P.A. Manzagol: Extracting and 57 | Composing Robust Features with Denoising Autoencoders, ICML'08, 1096-1103, 58 | 2008
59 | [2] Y. Bengio, P. Lamblin, D. Popovici, H. Larochelle: Greedy Layer-Wise 60 | Training of Deep Networks, Advances in Neural Information Processing 61 | Systems 19, 2007
62 | [3] https://github.com/lisa-lab 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /bcancerint_sort1.csv: -------------------------------------------------------------------------------- 1 | 5,1,1,1,2,1,3,1,1,2 2 | 5,4,4,5,7,10,3,2,1,2 3 | 3,1,1,1,2,2,3,1,1,2 4 | 6,8,8,1,3,4,3,7,1,2 5 | 4,1,1,3,2,1,3,1,1,2 6 | 1,1,1,1,2,10,3,1,1,2 7 | 2,1,2,1,2,1,3,1,1,2 8 | 2,1,1,1,2,1,1,1,5,2 9 | 4,2,1,1,2,1,2,1,1,2 10 | 1,1,1,1,1,1,3,1,1,2 11 | 2,1,1,1,2,1,2,1,1,2 12 | 1,1,1,1,2,3,3,1,1,2 13 | 4,1,1,1,2,1,2,1,1,2 14 | 4,1,1,1,2,1,3,1,1,2 15 | 6,1,1,1,2,1,3,1,1,2 16 | 3,1,1,1,2,1,2,1,1,2 17 | 1,1,1,1,2,1,3,1,1,2 18 | 3,2,1,1,1,1,2,1,1,2 19 | 5,1,1,1,2,1,2,1,1,2 20 | 2,1,1,1,2,1,2,1,1,2 21 | 1,1,3,1,2,1,1,1,1,2 22 | 3,1,1,1,1,1,2,1,1,2 23 | 2,1,1,1,2,1,3,1,1,2 24 | 2,1,1,2,2,1,3,1,1,2 25 | 3,1,2,1,2,1,2,1,1,2 26 | 2,1,1,1,2,1,2,1,1,2 27 | 6,2,1,1,1,1,7,1,1,2 28 | 6,6,6,9,6,0,7,8,1,2 29 | 1,1,1,1,2,1,2,1,2,2 30 | 1,1,1,1,2,1,2,1,1,2 31 | 4,1,1,3,2,1,3,1,1,2 32 | 1,1,1,1,2,2,2,1,1,2 33 | 1,1,1,1,2,1,2,1,1,2 34 | 4,1,1,1,2,1,3,1,1,2 35 | 1,1,1,1,2,1,3,2,1,2 36 | 5,1,3,1,2,1,2,1,1,2 37 | 1,3,3,2,2,1,7,2,1,2 38 | 1,1,2,1,2,2,4,2,1,2 39 | 1,1,4,1,2,1,2,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1,2,0,7,3,1,4 467 | 5,2,3,4,2,7,3,6,1,4 468 | 10,7,7,3,8,5,7,4,3,4 469 | 10,10,10,8,6,1,8,9,1,4 470 | 5,4,4,9,2,10,5,6,1,4 471 | 2,5,3,3,6,7,7,5,1,4 472 | 10,4,3,1,3,3,6,5,2,4 473 | 6,10,10,2,8,10,7,3,3,4 474 | 5,6,5,6,10,1,3,1,1,4 475 | 10,10,10,4,8,1,8,10,1,4 476 | 3,7,7,4,4,9,4,8,1,4 477 | 7,8,7,2,4,8,3,8,2,4 478 | 9,5,8,1,2,3,2,1,5,4 479 | 5,3,3,4,2,4,3,4,1,4 480 | 10,3,6,2,3,5,4,10,2,4 481 | 5,5,5,8,10,8,7,3,7,4 482 | 10,5,5,6,8,8,7,1,1,4 483 | 10,6,6,3,4,5,3,6,1,4 484 | 8,10,10,1,3,6,3,9,1,4 485 | 8,2,4,1,5,1,5,4,4,4 486 | 5,2,3,1,6,10,5,1,1,4 487 | 9,5,5,2,2,2,5,1,1,4 488 | 5,3,5,5,3,3,4,10,1,4 489 | 9,10,10,1,10,8,3,3,1,4 490 | 6,3,4,1,5,2,3,9,1,4 491 | 10,4,2,1,3,2,4,3,10,4 492 | 5,3,4,1,8,10,4,9,1,4 493 | 8,3,8,3,4,9,8,9,8,4 494 | 6,10,2,8,10,2,7,8,10,4 495 | 9,4,5,10,6,10,4,8,1,4 496 | 10,6,4,1,3,4,3,2,3,4 497 | 3,5,7,8,8,9,7,10,7,4 498 | 5,10,6,1,10,4,4,10,10,4 499 | 3,3,6,4,5,8,4,4,1,4 500 | 3,6,6,6,5,10,6,8,3,4 501 | 9,6,9,2,10,6,2,9,10,4 502 | 7,5,6,10,5,10,7,9,4,4 503 | 10,3,5,1,10,5,3,10,2,4 504 | 2,3,4,4,2,5,2,5,1,4 505 | 8,2,3,1,6,3,7,1,1,4 506 | 10,10,10,10,10,1,8,8,8,4 507 | 7,3,4,4,3,3,3,2,7,4 508 | 10,10,10,8,2,10,4,1,1,4 509 | 1,6,8,10,8,10,5,7,1,4 510 | 6,5,4,4,3,9,7,8,3,4 511 | 8,6,4,3,5,9,3,1,1,4 512 | 10,3,3,10,2,10,7,3,3,4 513 | 10,10,10,3,10,8,8,1,1,4 514 | 4,5,5,10,4,10,7,5,8,4 515 | 10,10,10,2,10,10,5,3,3,4 516 | 5,3,5,1,8,10,5,3,1,4 517 | 5,4,6,7,9,7,8,10,1,4 518 | 7,5,3,7,4,10,7,5,5,4 519 | 8,3,5,4,5,10,1,6,2,4 520 | 5,10,8,10,8,10,3,6,3,4 521 | 9,5,5,4,4,5,4,3,3,4 522 | 3,4,5,2,6,8,4,1,1,4 523 | 8,8,7,4,10,10,7,8,7,4 524 | 7,2,4,1,6,10,5,4,3,4 525 | 10,10,8,6,4,5,8,10,1,4 526 | 5,5,5,6,3,10,3,1,1,4 527 | 9,9,10,3,6,10,7,10,6,4 528 | 10,7,7,4,5,10,5,7,2,4 529 | 5,6,7,8,8,10,3,10,3,4 530 | 10,8,10,10,6,1,3,1,10,4 531 | 6,10,10,10,8,10,10,10,7,4 532 | 8,6,5,4,3,10,6,1,1,4 533 | 5,8,7,7,10,10,5,7,1,4 534 | 5,10,10,3,8,1,5,10,3,4 535 | 5,3,3,3,6,10,3,1,1,4 536 | 5,8,8,8,5,10,7,8,1,4 537 | 8,7,6,4,4,10,5,1,1,4 538 | 1,5,8,6,5,8,7,10,1,4 539 | 10,5,6,10,6,10,7,7,10,4 540 | 5,8,4,10,5,8,9,10,1,4 541 | 10,10,10,8,6,8,7,10,1,4 542 | 7,5,10,10,10,10,4,10,3,4 543 | 9,7,7,5,5,10,7,8,3,4 544 | 10,8,8,4,10,10,8,1,1,4 545 | 5,10,10,9,6,10,7,10,5,4 546 | 10,10,9,3,7,5,3,5,1,4 547 | 8,10,10,10,5,10,8,10,6,4 548 | 8,10,8,8,4,8,7,7,1,4 549 | 10,10,10,10,7,10,7,10,4,4 550 | 10,10,10,10,3,10,10,6,1,4 551 | 8,7,8,7,5,5,5,10,2,4 552 | 6,10,7,7,6,4,8,10,2,4 553 | 10,6,4,3,10,10,9,10,1,4 554 | 4,1,1,3,1,5,2,1,1,4 555 | 7,5,6,3,3,8,7,4,1,4 556 | 10,5,5,6,3,10,7,9,2,4 557 | 10,5,7,4,4,10,8,9,1,4 558 | 8,9,9,5,3,5,7,7,1,4 559 | 10,10,10,3,10,10,9,10,1,4 560 | 7,4,7,4,3,7,7,6,1,4 561 | 6,8,7,5,6,8,8,9,2,4 562 | 10,4,5,5,5,10,4,1,1,4 563 | 10,8,8,2,8,10,4,8,10,4 564 | 9,8,8,5,6,2,4,10,4,4 565 | 8,10,10,8,6,9,3,10,10,4 566 | 10,4,3,2,3,10,5,3,2,4 567 | 8,10,10,8,5,10,7,8,1,4 568 | 8,4,4,1,2,9,3,3,1,4 569 | 10,4,4,10,2,10,5,3,3,4 570 | 6,10,10,2,8,10,7,3,3,4 571 | 9,10,10,1,10,8,3,3,1,4 572 | 5,6,6,2,4,10,3,6,1,4 573 | 10,5,8,10,3,10,5,1,3,4 574 | 5,10,10,6,10,10,10,6,5,4 575 | 8,8,9,4,5,10,7,8,1,4 576 | 10,4,4,10,6,10,5,5,1,4 577 | 7,9,4,10,10,3,5,3,3,4 578 | 10,10,6,3,3,10,4,3,2,4 579 | 3,3,5,2,3,10,7,1,1,4 580 | 10,8,8,2,3,4,8,7,8,4 581 | 8,4,7,1,3,10,3,9,2,4 582 | 3,3,5,2,3,10,7,1,1,4 583 | 7,2,4,1,3,4,3,3,1,4 584 | 10,5,7,3,3,7,3,3,8,4 585 | 1,4,3,10,4,10,5,6,1,4 586 | 10,4,6,1,2,10,5,3,1,4 587 | 7,4,5,10,2,10,3,8,2,4 588 | 8,10,10,10,8,10,10,7,3,4 589 | 10,10,10,10,10,10,4,10,10,4 590 | 6,1,3,1,4,5,5,10,1,4 591 | 5,6,6,8,6,10,4,10,4,4 592 | 8,8,8,1,2,0,6,10,1,4 593 | 10,4,4,6,2,10,2,3,1,4 594 | 5,5,7,8,6,10,7,4,1,4 595 | 9,1,2,6,4,10,7,7,2,4 596 | 8,4,10,5,4,4,7,10,1,4 597 | 10,10,10,7,9,10,7,10,10,4 598 | 8,3,4,9,3,10,3,3,1,4 599 | 10,8,4,4,4,10,3,10,4,4 600 | 7,8,7,6,4,3,8,8,4,4 601 | 8,6,4,10,10,1,3,5,1,4 602 | 5,5,5,2,5,10,4,3,1,4 603 | 6,8,7,8,6,8,8,9,1,4 604 | 7,6,3,2,5,10,7,4,6,4 605 | 5,4,6,10,2,10,4,1,1,4 606 | 10,1,1,1,2,10,5,4,1,4 607 | 8,10,3,2,6,4,3,10,1,4 608 | 10,4,6,4,5,10,7,1,1,4 609 | 10,4,7,2,2,8,6,1,1,4 610 | 5,4,6,6,4,10,4,3,1,4 611 | 8,6,7,3,3,10,3,4,2,4 612 | 6,5,5,8,4,10,3,4,1,4 613 | 8,5,5,5,2,10,4,3,1,4 614 | 10,3,3,1,2,10,7,6,1,4 615 | 7,6,4,8,10,10,9,5,3,4 616 | 3,4,4,10,5,1,3,3,1,4 617 | 4,2,3,5,3,8,7,6,1,4 618 | 2,7,10,10,7,10,4,9,4,4 619 | 5,3,3,1,3,3,3,3,3,4 620 | 8,10,10,7,10,10,7,3,8,4 621 | 8,10,5,3,8,4,4,10,3,4 622 | 10,3,5,4,3,7,3,5,3,4 623 | 6,10,10,10,10,10,8,10,10,4 624 | 3,10,3,10,6,10,5,1,4,4 625 | 6,10,10,10,8,10,7,10,7,4 626 | 5,8,8,10,5,10,8,10,3,4 627 | 10,6,3,6,4,10,7,8,4,4 628 | 7,6,6,3,2,10,7,1,1,4 629 | 10,8,7,4,3,10,7,9,1,4 630 | 3,10,8,7,6,9,9,3,8,4 631 | 10,10,10,6,8,4,8,5,1,4 632 | 8,5,6,2,3,10,6,6,1,4 633 | 8,7,8,5,10,10,7,2,1,4 634 | 10,10,10,7,10,10,8,2,1,4 635 | 9,10,10,10,10,10,10,10,1,4 636 | 8,7,8,2,4,2,5,10,1,4 637 | 10,8,10,1,3,10,5,1,1,4 638 | 10,10,10,1,6,1,2,8,1,4 639 | 10,4,3,10,4,10,10,1,1,4 640 | 5,7,9,8,6,10,8,10,1,4 641 | 4,5,5,8,6,10,10,7,1,4 642 | 10,2,2,1,2,6,1,1,2,4 643 | 10,6,5,8,5,10,8,6,1,4 644 | 8,8,9,6,6,3,10,10,1,4 645 | 10,9,8,7,6,4,7,10,3,4 646 | 10,6,6,2,4,10,9,7,1,4 647 | 6,6,6,5,4,10,7,6,2,4 648 | 4,8,7,10,4,10,7,5,1,4 649 | 9,10,10,10,10,5,10,10,10,4 650 | 8,7,8,5,5,10,9,10,1,4 651 | 10,10,10,10,6,10,8,1,5,4 652 | 3,6,4,10,3,3,3,4,1,4 653 | 6,3,2,1,3,4,4,1,1,4 654 | 5,8,9,4,3,10,7,1,1,4 655 | 5,10,10,10,6,10,6,5,2,4 656 | 8,10,10,10,7,5,4,8,7,4 657 | 6,6,7,10,3,10,8,10,2,4 658 | 4,10,4,7,3,10,9,10,1,4 659 | 4,7,8,3,4,10,9,1,1,4 660 | 10,4,5,4,3,5,7,3,1,4 661 | 7,5,6,10,4,10,5,3,1,4 662 | 7,4,4,3,4,10,6,9,1,4 663 | 6,10,10,10,4,10,7,10,1,4 664 | 7,8,3,7,4,5,7,8,2,4 665 | 5,7,10,10,5,10,10,10,1,4 666 | 8,4,4,1,6,10,2,5,2,4 667 | 10,10,8,10,6,5,10,3,1,4 668 | 8,10,4,4,8,10,8,2,1,4 669 | 7,6,10,5,3,10,9,10,2,4 670 | 10,9,7,3,4,2,7,7,1,4 671 | 5,7,10,6,5,10,7,5,1,4 672 | 6,10,5,5,4,10,6,10,1,4 673 | 8,10,10,10,6,10,10,10,1,4 674 | 9,8,8,9,6,3,4,1,1,4 675 | 4,10,8,5,4,1,10,1,1,4 676 | 2,5,7,6,4,10,7,6,1,4 677 | 10,3,4,5,3,10,4,1,1,4 678 | 4,8,6,3,4,10,7,1,1,4 679 | 5,4,6,8,4,1,8,10,1,4 680 | 5,3,2,8,5,10,8,1,2,4 681 | 10,5,10,3,5,8,7,8,3,4 682 | 5,10,10,10,10,10,10,1,1,4 683 | 10,4,3,10,3,10,7,1,2,4 684 | 5,10,10,10,5,2,8,5,1,4 685 | 8,10,10,10,6,10,10,10,10,4 686 | 4,6,6,5,7,6,7,7,3,4 687 | 8,7,4,4,5,3,5,10,1,4 688 | 10,10,7,8,7,1,10,10,3,4 689 | 5,10,10,10,10,2,10,10,10,4 690 | 7,8,8,7,3,10,7,2,3,4 691 | 5,7,4,1,6,1,7,10,3,4 692 | 5,10,10,8,5,5,7,10,1,4 693 | 3,10,7,8,5,8,7,4,1,4 694 | 10,10,10,10,5,10,10,10,7,4 695 | 5,10,10,10,4,10,5,6,3,4 696 | 5,10,10,5,4,5,4,4,1,4 697 | 5,10,10,3,7,3,8,10,2,4 698 | 4,8,6,4,3,4,10,6,1,4 699 | 4,8,8,5,4,5,10,4,1,4 700 | -------------------------------------------------------------------------------- /kmeans_for_bcancerint.py: -------------------------------------------------------------------------------- 1 | from sklearn.cluster import KMeans 2 | import sklearn.datasets 3 | import numpy as np 4 | import csv; 5 | from itertools import groupby 6 | from sklearn import preprocessing 7 | 8 | def k_means(data, no_of_clusters): 9 | data = np.array(data); 10 | confusion_matrix=[] 11 | kmeans = KMeans(no_of_clusters, random_state=0).fit_predict(data); 12 | l1=kmeans[:458]; 13 | l1.sort(); 14 | #print l1; 15 | l = [len(list(group)) for key, group in groupby(l1)] 16 | confusion_matrix.append(l); 17 | #print l; 18 | max1 = max(l); 19 | l1=kmeans[458:699]; 20 | l1.sort(); 21 | #print l1; 22 | l = [len(list(group)) for key, group in groupby(l1)] 23 | confusion_matrix.append(l); 24 | #print l; 25 | max2 = max(l) 26 | print "Confusion Matrix" 27 | for i in range(0,2): 28 | print confusion_matrix[i] 29 | print("--------------------") 30 | print ("Accuracy = "+str((float(max1+max2)/699)*100)) 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /r_arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sumanth-bmsce/Deep-Neural-Network-for-Clustering/8670b856c22f4306284d4c567c784841bd5600f2/r_arch.png -------------------------------------------------------------------------------- /r_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sumanth-bmsce/Deep-Neural-Network-for-Clustering/8670b856c22f4306284d4c567c784841bd5600f2/r_error.png -------------------------------------------------------------------------------- /r_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sumanth-bmsce/Deep-Neural-Network-for-Clustering/8670b856c22f4306284d4c567c784841bd5600f2/r_result.png --------------------------------------------------------------------------------