Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a simple NN Conv1D taking sequences and binary classifying one term #32

Open
leandroradusky opened this issue May 25, 2023 — with Manas.Tech Commit · 0 comments

Comments

Copy link
Contributor

leandroradusky commented May 25, 2023

The first neural network that we should build should be a Conv1D network that takes as inputs

X_train = the one-hot encoded sequences of proteins we want to use for training
y_train = if they belong or not to a single term we want to build this classifier for (this will be a binary classifier)
X_val = the one-hot encoded sequences of proteins we want to use for validation
y_val = if they belong or not to that a single term

It should then create a keras model with parameterizable layers. The input_shape will be always (x, 20) being x the max protein length allowed (and 20 the size of the one-hot encoding vector per position) and the output layer should always have 2 classes (belongs to the term or not).

I.e. if we want to build this model:

        model = keras.Sequential()
        model.add(layers.Conv1D(32, kernel_size=3, activation='relu', input_shape=**(500,20)**))
        model.add(layers.Conv1D(64, kernel_size=3, activation='relu'))
        model.add(layers.Dropout(0.5))
        model.add(layers.MaxPooling1D(pool_size=2))
        model.add(layers.Flatten())
        model.add(layers.Dense(128, activation='relu'))
        model.add(layers.Dense(**2**, activation='softmax'))

we should pass as parameters a list of keras.layer objects to the class we're building and it will construct the model, but the first and last layer should be done by the constructor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants