Skip to content
Snippets Groups Projects
Commit a84bccbf authored by Jeff Hammerbacher's avatar Jeff Hammerbacher
Browse files

Remove tf-mhcflurry.py (not necessary) and clear TF exploration notebook state.

parent 79f8ff23
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
from mhcflurry.dataset import Dataset
from mhcflurry.peptide_encoding import indices_to_hotshot_encoding
file_to_explore="/root/.local/share/mhcflurry/2/class1_data/combined_human_class1_dataset.csv"
dataset = Dataset.from_csv(
filename=file_to_explore,
sep=",",
peptide_column_name="peptide")
df = dataset.to_dataframe()
df_kmers = dataset.kmer_index_encoding()
training_hotshot = indices_to_hotshot_encoding(df_kmers[0])
from keras.models import Sequential
from keras.layers import Dense, Activation
model = Sequential()
model.add(Dense(input_dim=9*21, output_dim=1)) # TF backend segfaults here
model.add(Activation("sigmoid"))
model.compile(loss="mse", optimizer="rmsprop")
model.fit(training_hotshot, df_kmers[1], nb_epoch=5, batch_size=1)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment