mmostavi / cnncancertype Goto Github PK
View Code? Open in Web Editor NEWThis is the repository for paper titled as "Convolutional neural network models for cancer type prediction based on gene expression".
This is the repository for paper titled as "Convolutional neural network models for cancer type prediction based on gene expression".
I am working on a thesis, and want to download data from TCGA. I came across R scripts, but the downloaded data is a bit haywire. Is it possible for you to share the code of how you downloaded the data from TCGA?
@MMostavi , would it be possible to disclose the preprocessing code making the input data files?
@MMostavi, are the following files available for research purposes:
when i run 5cv_1D_CNN_33class.py, there is an error as follows.
Traceback (most recent call last): File "5cv_1D_CNN_33class.py", line 69, in <module> y_s = train_labels NameError: name 'train_labels' is not defined
Hello,
I was hoping to mimic your method for the 1D convolutional neural network cited in your paper. When I came to assess your code for the 1D CNN I was surprised to see that all the code was a 2D CNN. Instead of inputting a vector as stated in the paper, it seems like whats inputted is the same expected input as the 2D CNN. Therefore I am curious if the code provided is incorrect?
From your paper:
"This CNN model takes the gene expression as a vector and applies one-dimensional kernels to the input vector [....] The input for 1D-CNN (Fig. 1a) is a 1D vector following gene symbol’s alphabetic order, "
However per your code:
X_cancer_samples_mat = np.reshape(X_cancer_samples_mat, (-1, 71, 100))
for train, test in kfold.split(X_cancer_samples_34, y_s): # input_Xs in normal case and shuffled should be shuffled_Xs
input_Xs = input_Xs.reshape(input_Xs.shape[0], img_rows, img_cols, 1)
input_shape = (img_rows, img_cols, 1)
input_Xs = input_Xs.astype('float32')
num_classes = len(onehot_encoded[0])
model = Sequential()
## *********** First layer Conv
model.add(Conv2D(32, kernel_size=(1, 71), strides=(1, 1),
input_shape=input_shape))
You reshape the vector per the wrapper method into a 71 x 100 2D input. Is there other code doing what you claim in the paper?
Edit:
It looks like the code for the 1D CNN is actually the code for the 2D Hybrid CNN
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.