<jupyter_start><jupyter_text>Loading a keras model and predicting valuesWhat follows is an extremely short tutorial on how to use the trained network:<jupyter_code>import numpy as np
from keras.models import load_model
model = load_model('model.h5')
model.load_weights('weights.h5')
EXAMPLE_DATASET = "Mendelian.normalized.example.test.tsv"
data_points =  np.loadtxt(EXAMPLE_DATASET, delimiter='\t')
def number_to_class(value:int)->str:
    """Map class identifier to class name."""
    if value:
        return "Positive"
    return "Negative"
for prediction in model.predict_classes(data_points):
    print("I believe %s to be %s"%(number_to_class(1), number_to_class(prediction)))<jupyter_output>I believe Positive to be Positive
I believe Positive to be Positive
I believe Positive to be Positive
I believe Positive to be Positive
I believe Positive to be Positive
I believe Positive to be Positive
I believe Positive to be Negative
I believe Positive to be Positive
I believe Positive to be Positive
I believe Positive to be Negative
{'fraction_non_alphanumeric': 0.07129094412331406, 'fraction_numerical': 0.002890173410404624, 'mean_word_length': 5.49375, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '626896', 'license': 'MIT', 'n_tokens_mistral': 319, 'n_tokens_neox': 294, 'n_words': 119, 'path': 'Bioinformatica - Loading saved model.ipynb', 'repo_name': 'LucaCappelletti94/snv_classifier', 'size': '1038'}