diff --git a/examples/class1_allele_specific_models.ipynb b/examples/class1_allele_specific_models.ipynb
deleted file mode 100644
index e6857e7c23eada48232dcbcf595a0d294ec279a2..0000000000000000000000000000000000000000
--- a/examples/class1_allele_specific_models.ipynb
+++ /dev/null
@@ -1,1976 +0,0 @@
-{
- "cells": [
-  {
-   "cell_type": "code",
-   "execution_count": 22,
-   "metadata": {
-    "collapsed": false
-   },
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "MHCflurry version: 1.0.0\n"
-     ]
-    }
-   ],
-   "source": [
-    "import pandas\n",
-    "import numpy\n",
-    "import seaborn\n",
-    "import logging\n",
-    "from matplotlib import pyplot\n",
-    "\n",
-    "import mhcflurry\n",
-    "\n",
-    "print(\"MHCflurry version: %s\" % (mhcflurry.__version__))"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "# Download data and models"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 2,
-   "metadata": {
-    "collapsed": false
-   },
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "Fetching 0/6 downloads from release 1.0.0\r\n",
-      "DOWNLOAD NAME                             ALREADY DOWNLOADED?    WILL DOWNLOAD NOW?    URL                  \r\n",
-      "models_class1                             YES                    NO                    http://github.com/hammerlab/mhcflurry/releases/download/pre-1.0/models_class1.tar.bz2 \r\n",
-      "models_class1_experiments1                NO                     NO                    http://github.com/hammerlab/mhcflurry/releases/download/pre-1.0/models_class1_experiments1.tar.bz2 \r\n",
-      "cross_validation_class1                   NO                     NO                    http://github.com/hammerlab/mhcflurry/releases/download/pre-1.0/cross_validation_class1.tar.bz2 \r\n",
-      "data_iedb                                 NO                     NO                    https://github.com/hammerlab/mhcflurry/releases/download/pre-1.0/data_iedb.tar.bz2 \r\n",
-      "data_kim2014                              NO                     NO                    http://github.com/hammerlab/mhcflurry/releases/download/0.9.1/data_kim2014.tar.bz2 \r\n",
-      "data_curated                              YES                    NO                    https://github.com/hammerlab/mhcflurry/releases/download/pre-1.0/data_curated.tar.bz2 \r\n"
-     ]
-    }
-   ],
-   "source": [
-    "!mhcflurry-downloads fetch"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "# Making predictions with `Class1AffinityPredictor`"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 3,
-   "metadata": {
-    "collapsed": false
-   },
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "Help on class Class1AffinityPredictor in module mhcflurry.class1_affinity_predictor:\n",
-      "\n",
-      "class Class1AffinityPredictor(builtins.object)\n",
-      " |  High-level interface for peptide/MHC I binding affinity prediction.\n",
-      " |  \n",
-      " |  This is the class most users will want to use.\n",
-      " |  \n",
-      " |  This class delegates to one or more `Class1NeuralNetwork` instances.\n",
-      " |  It supports prediction across multiple alleles using ensembles of single-\n",
-      " |  or pan-allele predictors.\n",
-      " |  \n",
-      " |  Methods defined here:\n",
-      " |  \n",
-      " |  __init__(self, allele_to_allele_specific_models=None, class1_pan_allele_models=None, allele_to_pseudosequence=None, manifest_df=None, allele_to_percent_rank_transform=None)\n",
-      " |      Parameters\n",
-      " |      ----------\n",
-      " |      allele_to_allele_specific_models : dict of string -> list of Class1NeuralNetwork\n",
-      " |          Ensemble of single-allele models to use for each allele. \n",
-      " |      \n",
-      " |      class1_pan_allele_models : list of Class1NeuralNetwork\n",
-      " |          Ensemble of pan-allele models.\n",
-      " |      \n",
-      " |      allele_to_pseudosequence : dict of string -> string\n",
-      " |          Required only if class1_pan_allele_models is specified.\n",
-      " |      \n",
-      " |      manifest_df : pandas.DataFrame, optional\n",
-      " |          Must have columns: model_name, allele, config_json, model.\n",
-      " |          Only required if you want to update an existing serialization of a\n",
-      " |          Class1AffinityPredictor. Otherwise this dataframe will be generated\n",
-      " |          automatically based on the supplied models.\n",
-      " |      \n",
-      " |      allele_to_percent_rank_transform : dict of string -> PercentRankTransform, optional\n",
-      " |          PercentRankTransform instances to use for each allele\n",
-      " |  \n",
-      " |  calibrate_percentile_ranks(self, peptides=None, num_peptides_per_length=100000, alleles=None, bins=None, quiet=False)\n",
-      " |      Compute the cumulative distribution of ic50 values for a set of alleles\n",
-      " |      over a large universe of random peptides, to enable computing quantiles in\n",
-      " |      this distribution later.\n",
-      " |      \n",
-      " |      Parameters\n",
-      " |      ----------\n",
-      " |      peptides : sequence of string, optional\n",
-      " |          Peptides to use\n",
-      " |      num_peptides_per_length : int, optional\n",
-      " |          If peptides argument is not specified, then num_peptides_per_length\n",
-      " |          peptides are randomly sampled from a uniform distribution for each\n",
-      " |          supported length\n",
-      " |      alleles : sequence of string, optional\n",
-      " |          Alleles to perform calibration for. If not specified all supported\n",
-      " |          alleles will be calibrated.\n",
-      " |      bins : object\n",
-      " |          Anything that can be passed to numpy.histogram's \"bins\" argument\n",
-      " |          can be used here, i.e. either an integer or a sequence giving bin\n",
-      " |          edges. This is in ic50 space.\n",
-      " |      quiet : boolean\n",
-      " |          If False (default), status updates will be printed to stdout.\n",
-      " |  \n",
-      " |  fit_allele_specific_predictors(self, n_models, architecture_hyperparameters, allele, peptides, affinities, models_dir_for_save=None, verbose=1, progress_preamble='')\n",
-      " |      Fit one or more allele specific predictors for a single allele using a\n",
-      " |      single neural network architecture.\n",
-      " |      \n",
-      " |      The new predictors are saved in the Class1AffinityPredictor instance\n",
-      " |      and will be used on subsequent calls to `predict`.\n",
-      " |      \n",
-      " |      Parameters\n",
-      " |      ----------\n",
-      " |      n_models : int\n",
-      " |          Number of neural networks to fit\n",
-      " |      \n",
-      " |      architecture_hyperparameters : dict \n",
-      " |             \n",
-      " |      allele : string\n",
-      " |      \n",
-      " |      peptides : EncodableSequences or list of string\n",
-      " |      \n",
-      " |      affinities : list of float\n",
-      " |          nM affinities\n",
-      " |      \n",
-      " |      models_dir_for_save : string, optional\n",
-      " |          If specified, the Class1AffinityPredictor is (incrementally) written\n",
-      " |          to the given models dir after each neural network is fit.\n",
-      " |      \n",
-      " |      verbose : int\n",
-      " |          Keras verbosity\n",
-      " |      \n",
-      " |      progress_preamble : string\n",
-      " |          Optional string of information to include in each progress update\n",
-      " |      \n",
-      " |      Returns\n",
-      " |      -------\n",
-      " |      list of Class1NeuralNetwork\n",
-      " |  \n",
-      " |  fit_class1_pan_allele_models(self, n_models, architecture_hyperparameters, alleles, peptides, affinities, models_dir_for_save=None, verbose=1, progress_preamble='')\n",
-      " |      Fit one or more pan-allele predictors using a single neural network\n",
-      " |      architecture.\n",
-      " |      \n",
-      " |      The new predictors are saved in the Class1AffinityPredictor instance\n",
-      " |      and will be used on subsequent calls to `predict`.\n",
-      " |      \n",
-      " |      Parameters\n",
-      " |      ----------\n",
-      " |      n_models : int\n",
-      " |          Number of neural networks to fit\n",
-      " |          \n",
-      " |      architecture_hyperparameters : dict\n",
-      " |      \n",
-      " |      alleles : list of string\n",
-      " |          Allele names (not pseudosequences) corresponding to each peptide \n",
-      " |      \n",
-      " |      peptides : EncodableSequences or list of string\n",
-      " |      \n",
-      " |      affinities : list of float\n",
-      " |          nM affinities\n",
-      " |      \n",
-      " |      models_dir_for_save : string, optional\n",
-      " |          If specified, the Class1AffinityPredictor is (incrementally) written\n",
-      " |          to the given models dir after each neural network is fit.\n",
-      " |      \n",
-      " |      verbose : int\n",
-      " |          Keras verbosity\n",
-      " |      \n",
-      " |      progress_preamble : string\n",
-      " |          Optional string of information to include in each progress update\n",
-      " |      \n",
-      " |      Returns\n",
-      " |      -------\n",
-      " |      list of Class1NeuralNetwork\n",
-      " |  \n",
-      " |  percentile_ranks(self, affinities, allele=None, alleles=None, throw=True)\n",
-      " |      Return percentile ranks for the given ic50 affinities and alleles.\n",
-      " |      \n",
-      " |      The 'allele' and 'alleles' argument are as in the predict() method.\n",
-      " |      Specify one of these.\n",
-      " |      \n",
-      " |      Parameters\n",
-      " |      ----------\n",
-      " |      affinities : sequence of float\n",
-      " |          nM affinities\n",
-      " |      allele : string\n",
-      " |      alleles : sequence of string\n",
-      " |      throw : boolean\n",
-      " |          If True, a ValueError will be raised in the case of unsupported\n",
-      " |          alleles. If False, a warning will be logged and NaN will be returned\n",
-      " |          for those percentile ranks.\n",
-      " |      \n",
-      " |      Returns\n",
-      " |      -------\n",
-      " |      numpy.array of float\n",
-      " |  \n",
-      " |  predict(self, peptides, alleles=None, allele=None, throw=True)\n",
-      " |      Predict nM binding affinities.\n",
-      " |      \n",
-      " |      If multiple predictors are available for an allele, the predictions are\n",
-      " |      the geometric means of the individual model predictions.\n",
-      " |      \n",
-      " |      One of 'allele' or 'alleles' must be specified. If 'allele' is specified\n",
-      " |      all predictions will be for the given allele. If 'alleles' is specified\n",
-      " |      it must be the same length as 'peptides' and give the allele\n",
-      " |      corresponding to each peptide.\n",
-      " |      \n",
-      " |      Parameters\n",
-      " |      ----------\n",
-      " |      peptides : EncodableSequences or list of string\n",
-      " |      alleles : list of string\n",
-      " |      allele : string\n",
-      " |      throw : boolean\n",
-      " |          If True, a ValueError will be raised in the case of unsupported\n",
-      " |          alleles or peptide lengths. If False, a warning will be logged and\n",
-      " |          the predictions for the unsupported alleles or peptides will be NaN.\n",
-      " |      \n",
-      " |      Returns\n",
-      " |      -------\n",
-      " |      numpy.array of predictions\n",
-      " |  \n",
-      " |  predict_to_dataframe(self, peptides, alleles=None, allele=None, throw=True, include_individual_model_predictions=False, include_percentile_ranks=True)\n",
-      " |      Predict nM binding affinities. Gives more detailed output than `predict`\n",
-      " |      method, including 5-95% prediction intervals.\n",
-      " |      \n",
-      " |      If multiple predictors are available for an allele, the predictions are\n",
-      " |      the geometric means of the individual model predictions.\n",
-      " |      \n",
-      " |      One of 'allele' or 'alleles' must be specified. If 'allele' is specified\n",
-      " |      all predictions will be for the given allele. If 'alleles' is specified\n",
-      " |      it must be the same length as 'peptides' and give the allele\n",
-      " |      corresponding to each peptide. \n",
-      " |      \n",
-      " |      Parameters\n",
-      " |      ----------\n",
-      " |      peptides : EncodableSequences or list of string\n",
-      " |      alleles : list of string\n",
-      " |      allele : string\n",
-      " |      throw : boolean\n",
-      " |          If True, a ValueError will be raised in the case of unsupported\n",
-      " |          alleles or peptide lengths. If False, a warning will be logged and\n",
-      " |          the predictions for the unsupported alleles or peptides will be NaN.\n",
-      " |      include_individual_model_predictions : boolean\n",
-      " |          If True, the predictions of each individual model are included as\n",
-      " |          columns in the result dataframe.\n",
-      " |      include_percentile_ranks : boolean, default True\n",
-      " |          If True, a \"prediction_percentile\" column will be included giving the\n",
-      " |          percentile ranks. If no percentile rank information is available,\n",
-      " |          this will be ignored with a warning.\n",
-      " |      \n",
-      " |      Returns\n",
-      " |      -------\n",
-      " |      pandas.DataFrame of predictions\n",
-      " |  \n",
-      " |  save(self, models_dir, model_names_to_write=None)\n",
-      " |      Serialize the predictor to a directory on disk.\n",
-      " |      \n",
-      " |      The serialization format consists of a file called \"manifest.csv\" with\n",
-      " |      the configurations of each Class1NeuralNetwork, along with per-network\n",
-      " |      files giving the model weights. If there are pan-allele predictors in\n",
-      " |      the ensemble, the allele pseudosequences are also stored in the\n",
-      " |      directory.\n",
-      " |      \n",
-      " |      Parameters\n",
-      " |      ----------\n",
-      " |      models_dir : string\n",
-      " |          Path to directory\n",
-      " |          \n",
-      " |      model_names_to_write : list of string, optional\n",
-      " |          Only write the weights for the specified models. Useful for\n",
-      " |          incremental updates during training.\n",
-      " |  \n",
-      " |  ----------------------------------------------------------------------\n",
-      " |  Class methods defined here:\n",
-      " |  \n",
-      " |  merge(predictors) from builtins.type\n",
-      " |      Merge the ensembles of two or more Class1AffinityPredictor instances.\n",
-      " |      \n",
-      " |      Note: the resulting merged predictor will NOT have calibrated percentile\n",
-      " |      ranks. Call calibrate_percentile_ranks() on it if these are needed.\n",
-      " |      \n",
-      " |      Parameters\n",
-      " |      ----------\n",
-      " |      predictors : sequence of Class1AffinityPredictor\n",
-      " |      \n",
-      " |      Returns\n",
-      " |      -------\n",
-      " |      Class1AffinityPredictor\n",
-      " |  \n",
-      " |  ----------------------------------------------------------------------\n",
-      " |  Static methods defined here:\n",
-      " |  \n",
-      " |  load(models_dir=None, max_models=None)\n",
-      " |      Deserialize a predictor from a directory on disk.\n",
-      " |      \n",
-      " |      Parameters\n",
-      " |      ----------\n",
-      " |      models_dir : string\n",
-      " |          Path to directory\n",
-      " |          \n",
-      " |      max_models : int, optional\n",
-      " |          Maximum number of Class1NeuralNetwork instances to load\n",
-      " |      \n",
-      " |      Returns\n",
-      " |      -------\n",
-      " |      Class1AffinityPredictor\n",
-      " |  \n",
-      " |  load_weights(filename)\n",
-      " |      Restore model weights from the given filename, which should have been\n",
-      " |      created with `save_weights`.\n",
-      " |      \n",
-      " |      Parameters\n",
-      " |      ----------\n",
-      " |      filename : string\n",
-      " |          Should end in \".npz\".\n",
-      " |          \n",
-      " |          \n",
-      " |      Returns\n",
-      " |      ----------\n",
-      " |      \n",
-      " |      list of array\n",
-      " |  \n",
-      " |  model_name(allele, num)\n",
-      " |      Generate a model name\n",
-      " |      \n",
-      " |      Parameters\n",
-      " |      ----------\n",
-      " |      allele : string\n",
-      " |      num : int\n",
-      " |      \n",
-      " |      Returns\n",
-      " |      -------\n",
-      " |      string\n",
-      " |  \n",
-      " |  save_weights(weights_list, filename)\n",
-      " |      Save the model weights to the given filename using numpy's \".npz\"\n",
-      " |      format.\n",
-      " |      \n",
-      " |      Parameters\n",
-      " |      ----------\n",
-      " |      weights_list : list of array\n",
-      " |      \n",
-      " |      filename : string\n",
-      " |          Should end in \".npz\".\n",
-      " |  \n",
-      " |  weights_path(models_dir, model_name)\n",
-      " |      Generate the path to the weights file for a model\n",
-      " |      \n",
-      " |      Parameters\n",
-      " |      ----------\n",
-      " |      models_dir : string\n",
-      " |      model_name : string\n",
-      " |      \n",
-      " |      Returns\n",
-      " |      -------\n",
-      " |      string\n",
-      " |  \n",
-      " |  ----------------------------------------------------------------------\n",
-      " |  Data descriptors defined here:\n",
-      " |  \n",
-      " |  __dict__\n",
-      " |      dictionary for instance variables (if defined)\n",
-      " |  \n",
-      " |  __weakref__\n",
-      " |      list of weak references to the object (if defined)\n",
-      " |  \n",
-      " |  neural_networks\n",
-      " |      List of the neural networks in the ensemble.\n",
-      " |      \n",
-      " |      Returns\n",
-      " |      -------\n",
-      " |      list of Class1NeuralNetwork\n",
-      " |  \n",
-      " |  num_networks\n",
-      " |  \n",
-      " |  supported_alleles\n",
-      " |      Alleles for which predictions can be made.\n",
-      " |      \n",
-      " |      Returns\n",
-      " |      -------\n",
-      " |      list of string\n",
-      " |  \n",
-      " |  supported_peptide_lengths\n",
-      " |      (minimum, maximum) lengths of peptides supported by *all models*,\n",
-      " |      inclusive.\n",
-      " |      \n",
-      " |      Returns\n",
-      " |      -------\n",
-      " |      (int, int) tuple\n",
-      "\n"
-     ]
-    }
-   ],
-   "source": [
-    "help(mhcflurry.Class1AffinityPredictor)"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 4,
-   "metadata": {
-    "collapsed": false
-   },
-   "outputs": [],
-   "source": [
-    "downloaded_predictor = mhcflurry.Class1AffinityPredictor.load()"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 5,
-   "metadata": {
-    "collapsed": false
-   },
-   "outputs": [
-    {
-     "name": "stderr",
-     "output_type": "stream",
-     "text": [
-      "Using TensorFlow backend.\n"
-     ]
-    },
-    {
-     "data": {
-      "text/plain": [
-       "array([ 4899.04784343,  5685.25682682])"
-      ]
-     },
-     "execution_count": 5,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "downloaded_predictor.predict(allele=\"HLA-A0201\", peptides=[\"SIINFEKL\", \"SIINFEQL\"])"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 6,
-   "metadata": {
-    "collapsed": false
-   },
-   "outputs": [
-    {
-     "data": {
-      "text/html": [
-       "<div>\n",
-       "<style scoped>\n",
-       "    .dataframe tbody tr th:only-of-type {\n",
-       "        vertical-align: middle;\n",
-       "    }\n",
-       "\n",
-       "    .dataframe tbody tr th {\n",
-       "        vertical-align: top;\n",
-       "    }\n",
-       "\n",
-       "    .dataframe thead th {\n",
-       "        text-align: right;\n",
-       "    }\n",
-       "</style>\n",
-       "<table border=\"1\" class=\"dataframe\">\n",
-       "  <thead>\n",
-       "    <tr style=\"text-align: right;\">\n",
-       "      <th></th>\n",
-       "      <th>allele</th>\n",
-       "      <th>peptide</th>\n",
-       "      <th>prediction</th>\n",
-       "      <th>prediction_low</th>\n",
-       "      <th>prediction_high</th>\n",
-       "      <th>prediction_percentile</th>\n",
-       "    </tr>\n",
-       "  </thead>\n",
-       "  <tbody>\n",
-       "    <tr>\n",
-       "      <th>0</th>\n",
-       "      <td>HLA-A0201</td>\n",
-       "      <td>SIINFEKL</td>\n",
-       "      <td>4899.047843</td>\n",
-       "      <td>2767.763654</td>\n",
-       "      <td>7269.683643</td>\n",
-       "      <td>6.509787</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>1</th>\n",
-       "      <td>HLA-A0201</td>\n",
-       "      <td>SIINFEQL</td>\n",
-       "      <td>5685.256827</td>\n",
-       "      <td>3815.923563</td>\n",
-       "      <td>7476.714466</td>\n",
-       "      <td>7.436687</td>\n",
-       "    </tr>\n",
-       "  </tbody>\n",
-       "</table>\n",
-       "</div>"
-      ],
-      "text/plain": [
-       "      allele   peptide   prediction  prediction_low  prediction_high  \\\n",
-       "0  HLA-A0201  SIINFEKL  4899.047843     2767.763654      7269.683643   \n",
-       "1  HLA-A0201  SIINFEQL  5685.256827     3815.923563      7476.714466   \n",
-       "\n",
-       "   prediction_percentile  \n",
-       "0               6.509787  \n",
-       "1               7.436687  "
-      ]
-     },
-     "execution_count": 6,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "downloaded_predictor.predict_to_dataframe(allele=\"HLA-A0201\", peptides=[\"SIINFEKL\", \"SIINFEQL\"])"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 7,
-   "metadata": {
-    "collapsed": false
-   },
-   "outputs": [
-    {
-     "data": {
-      "text/html": [
-       "<div>\n",
-       "<style scoped>\n",
-       "    .dataframe tbody tr th:only-of-type {\n",
-       "        vertical-align: middle;\n",
-       "    }\n",
-       "\n",
-       "    .dataframe tbody tr th {\n",
-       "        vertical-align: top;\n",
-       "    }\n",
-       "\n",
-       "    .dataframe thead th {\n",
-       "        text-align: right;\n",
-       "    }\n",
-       "</style>\n",
-       "<table border=\"1\" class=\"dataframe\">\n",
-       "  <thead>\n",
-       "    <tr style=\"text-align: right;\">\n",
-       "      <th></th>\n",
-       "      <th>allele</th>\n",
-       "      <th>peptide</th>\n",
-       "      <th>prediction</th>\n",
-       "      <th>prediction_low</th>\n",
-       "      <th>prediction_high</th>\n",
-       "      <th>prediction_percentile</th>\n",
-       "    </tr>\n",
-       "  </thead>\n",
-       "  <tbody>\n",
-       "    <tr>\n",
-       "      <th>0</th>\n",
-       "      <td>HLA-A0201</td>\n",
-       "      <td>SIINFEKL</td>\n",
-       "      <td>4899.047942</td>\n",
-       "      <td>2767.763654</td>\n",
-       "      <td>7269.683643</td>\n",
-       "      <td>6.509787</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>1</th>\n",
-       "      <td>HLA-B*57:01</td>\n",
-       "      <td>SIINFEQL</td>\n",
-       "      <td>26704.220115</td>\n",
-       "      <td>23198.059394</td>\n",
-       "      <td>30635.114610</td>\n",
-       "      <td>47.611925</td>\n",
-       "    </tr>\n",
-       "  </tbody>\n",
-       "</table>\n",
-       "</div>"
-      ],
-      "text/plain": [
-       "        allele   peptide    prediction  prediction_low  prediction_high  \\\n",
-       "0    HLA-A0201  SIINFEKL   4899.047942     2767.763654      7269.683643   \n",
-       "1  HLA-B*57:01  SIINFEQL  26704.220115    23198.059394     30635.114610   \n",
-       "\n",
-       "   prediction_percentile  \n",
-       "0               6.509787  \n",
-       "1              47.611925  "
-      ]
-     },
-     "execution_count": 7,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "downloaded_predictor.predict_to_dataframe(alleles=[\"HLA-A0201\", \"HLA-B*57:01\"], peptides=[\"SIINFEKL\", \"SIINFEQL\"])"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 8,
-   "metadata": {
-    "collapsed": false
-   },
-   "outputs": [
-    {
-     "data": {
-      "text/html": [
-       "<div>\n",
-       "<style scoped>\n",
-       "    .dataframe tbody tr th:only-of-type {\n",
-       "        vertical-align: middle;\n",
-       "    }\n",
-       "\n",
-       "    .dataframe tbody tr th {\n",
-       "        vertical-align: top;\n",
-       "    }\n",
-       "\n",
-       "    .dataframe thead th {\n",
-       "        text-align: right;\n",
-       "    }\n",
-       "</style>\n",
-       "<table border=\"1\" class=\"dataframe\">\n",
-       "  <thead>\n",
-       "    <tr style=\"text-align: right;\">\n",
-       "      <th></th>\n",
-       "      <th>allele</th>\n",
-       "      <th>peptide</th>\n",
-       "      <th>prediction</th>\n",
-       "      <th>prediction_low</th>\n",
-       "      <th>prediction_high</th>\n",
-       "      <th>model_single_0</th>\n",
-       "      <th>model_single_1</th>\n",
-       "      <th>model_single_2</th>\n",
-       "      <th>model_single_3</th>\n",
-       "      <th>model_single_4</th>\n",
-       "      <th>model_single_5</th>\n",
-       "      <th>model_single_6</th>\n",
-       "      <th>model_single_7</th>\n",
-       "      <th>prediction_percentile</th>\n",
-       "    </tr>\n",
-       "  </thead>\n",
-       "  <tbody>\n",
-       "    <tr>\n",
-       "      <th>0</th>\n",
-       "      <td>HLA-A0201</td>\n",
-       "      <td>SIINFEKL</td>\n",
-       "      <td>4899.047843</td>\n",
-       "      <td>2767.763654</td>\n",
-       "      <td>7269.683643</td>\n",
-       "      <td>5245.313773</td>\n",
-       "      <td>4131.368053</td>\n",
-       "      <td>4599.034976</td>\n",
-       "      <td>7350.344042</td>\n",
-       "      <td>2230.774145</td>\n",
-       "      <td>6754.462616</td>\n",
-       "      <td>4220.768251</td>\n",
-       "      <td>7122.226730</td>\n",
-       "      <td>6.509787</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>1</th>\n",
-       "      <td>HLA-A0201</td>\n",
-       "      <td>SIINFEQL</td>\n",
-       "      <td>5685.256827</td>\n",
-       "      <td>3815.923563</td>\n",
-       "      <td>7476.714466</td>\n",
-       "      <td>5711.583293</td>\n",
-       "      <td>5718.509616</td>\n",
-       "      <td>5459.967973</td>\n",
-       "      <td>7709.914896</td>\n",
-       "      <td>3394.800793</td>\n",
-       "      <td>7062.179615</td>\n",
-       "      <td>4741.495660</td>\n",
-       "      <td>6983.180148</td>\n",
-       "      <td>7.436687</td>\n",
-       "    </tr>\n",
-       "  </tbody>\n",
-       "</table>\n",
-       "</div>"
-      ],
-      "text/plain": [
-       "      allele   peptide   prediction  prediction_low  prediction_high  \\\n",
-       "0  HLA-A0201  SIINFEKL  4899.047843     2767.763654      7269.683643   \n",
-       "1  HLA-A0201  SIINFEQL  5685.256827     3815.923563      7476.714466   \n",
-       "\n",
-       "   model_single_0  model_single_1  model_single_2  model_single_3  \\\n",
-       "0     5245.313773     4131.368053     4599.034976     7350.344042   \n",
-       "1     5711.583293     5718.509616     5459.967973     7709.914896   \n",
-       "\n",
-       "   model_single_4  model_single_5  model_single_6  model_single_7  \\\n",
-       "0     2230.774145     6754.462616     4220.768251     7122.226730   \n",
-       "1     3394.800793     7062.179615     4741.495660     6983.180148   \n",
-       "\n",
-       "   prediction_percentile  \n",
-       "0               6.509787  \n",
-       "1               7.436687  "
-      ]
-     },
-     "execution_count": 8,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "downloaded_predictor.predict_to_dataframe(\n",
-    "    allele=\"HLA-A0201\",\n",
-    "    peptides=[\"SIINFEKL\", \"SIINFEQL\"],\n",
-    "    include_individual_model_predictions=True)"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 9,
-   "metadata": {
-    "collapsed": false
-   },
-   "outputs": [
-    {
-     "data": {
-      "text/html": [
-       "<div>\n",
-       "<style scoped>\n",
-       "    .dataframe tbody tr th:only-of-type {\n",
-       "        vertical-align: middle;\n",
-       "    }\n",
-       "\n",
-       "    .dataframe tbody tr th {\n",
-       "        vertical-align: top;\n",
-       "    }\n",
-       "\n",
-       "    .dataframe thead th {\n",
-       "        text-align: right;\n",
-       "    }\n",
-       "</style>\n",
-       "<table border=\"1\" class=\"dataframe\">\n",
-       "  <thead>\n",
-       "    <tr style=\"text-align: right;\">\n",
-       "      <th></th>\n",
-       "      <th>allele</th>\n",
-       "      <th>peptide</th>\n",
-       "      <th>prediction</th>\n",
-       "      <th>prediction_low</th>\n",
-       "      <th>prediction_high</th>\n",
-       "      <th>prediction_percentile</th>\n",
-       "    </tr>\n",
-       "  </thead>\n",
-       "  <tbody>\n",
-       "    <tr>\n",
-       "      <th>0</th>\n",
-       "      <td>HLA-A0201</td>\n",
-       "      <td>SIINFEKL</td>\n",
-       "      <td>4899.047843</td>\n",
-       "      <td>2767.763654</td>\n",
-       "      <td>7269.683643</td>\n",
-       "      <td>6.509787</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>1</th>\n",
-       "      <td>HLA-A0201</td>\n",
-       "      <td>SIINFEQL</td>\n",
-       "      <td>5685.256827</td>\n",
-       "      <td>3815.923563</td>\n",
-       "      <td>7476.714466</td>\n",
-       "      <td>7.436687</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>2</th>\n",
-       "      <td>HLA-A0201</td>\n",
-       "      <td>TAAAALANGGGGGGGG</td>\n",
-       "      <td>NaN</td>\n",
-       "      <td>NaN</td>\n",
-       "      <td>NaN</td>\n",
-       "      <td>100.000000</td>\n",
-       "    </tr>\n",
-       "  </tbody>\n",
-       "</table>\n",
-       "</div>"
-      ],
-      "text/plain": [
-       "      allele           peptide   prediction  prediction_low  prediction_high  \\\n",
-       "0  HLA-A0201          SIINFEKL  4899.047843     2767.763654      7269.683643   \n",
-       "1  HLA-A0201          SIINFEQL  5685.256827     3815.923563      7476.714466   \n",
-       "2  HLA-A0201  TAAAALANGGGGGGGG          NaN             NaN              NaN   \n",
-       "\n",
-       "   prediction_percentile  \n",
-       "0               6.509787  \n",
-       "1               7.436687  \n",
-       "2             100.000000  "
-      ]
-     },
-     "execution_count": 9,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "downloaded_predictor.predict_to_dataframe(\n",
-    "    allele=\"HLA-A0201\",\n",
-    "    peptides=[\"SIINFEKL\", \"SIINFEQL\", \"TAAAALANGGGGGGGG\"],\n",
-    "    throw=False)  # Without throw=False, you'll get a ValueError for invalid peptides or alleles"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "# Instantiating a `Class1AffinityPredictor`  from a saved model on disk"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 10,
-   "metadata": {
-    "collapsed": false
-   },
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "'/Users/tim/Library/Application Support/mhcflurry/4/1.0.0/models_class1/models'"
-      ]
-     },
-     "execution_count": 10,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "models_dir = mhcflurry.downloads.get_path(\"models_class1\", \"models\")\n",
-    "models_dir"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 11,
-   "metadata": {
-    "collapsed": false
-   },
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "array([ 28227.29890915,  26568.72745054,  39043.95304442])"
-      ]
-     },
-     "execution_count": 11,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "# This will be the same predictor we instantiated above. We're just being explicit about what models to load.\n",
-    "downloaded_predictor = mhcflurry.Class1AffinityPredictor.load(models_dir)\n",
-    "downloaded_predictor.predict([\"SIINFEKL\", \"SIQNPEKP\", \"SYNFPEPI\"], allele=\"HLA-A0301\")"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "# Fit a model: first load some data"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 12,
-   "metadata": {
-    "collapsed": false
-   },
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "'/Users/tim/Library/Application Support/mhcflurry/4/1.0.0/data_curated/curated_training_data.csv.bz2'"
-      ]
-     },
-     "execution_count": 12,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "# This is the data the downloaded models were trained on\n",
-    "data_path = mhcflurry.downloads.get_path(\"data_curated\", \"curated_training_data.csv.bz2\")\n",
-    "data_path"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 13,
-   "metadata": {
-    "collapsed": false
-   },
-   "outputs": [
-    {
-     "data": {
-      "text/html": [
-       "<div>\n",
-       "<style scoped>\n",
-       "    .dataframe tbody tr th:only-of-type {\n",
-       "        vertical-align: middle;\n",
-       "    }\n",
-       "\n",
-       "    .dataframe tbody tr th {\n",
-       "        vertical-align: top;\n",
-       "    }\n",
-       "\n",
-       "    .dataframe thead th {\n",
-       "        text-align: right;\n",
-       "    }\n",
-       "</style>\n",
-       "<table border=\"1\" class=\"dataframe\">\n",
-       "  <thead>\n",
-       "    <tr style=\"text-align: right;\">\n",
-       "      <th></th>\n",
-       "      <th>allele</th>\n",
-       "      <th>peptide</th>\n",
-       "      <th>measurement_value</th>\n",
-       "      <th>measurement_type</th>\n",
-       "      <th>measurement_source</th>\n",
-       "      <th>original_allele</th>\n",
-       "    </tr>\n",
-       "  </thead>\n",
-       "  <tbody>\n",
-       "    <tr>\n",
-       "      <th>0</th>\n",
-       "      <td>BoLA-1*21:01</td>\n",
-       "      <td>AENDTLVVSV</td>\n",
-       "      <td>7817.0</td>\n",
-       "      <td>quantitative</td>\n",
-       "      <td>Barlow - purified MHC/competitive/fluorescence</td>\n",
-       "      <td>BoLA-1*02101</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>1</th>\n",
-       "      <td>BoLA-1*21:01</td>\n",
-       "      <td>NQFNGGCLLV</td>\n",
-       "      <td>1086.0</td>\n",
-       "      <td>quantitative</td>\n",
-       "      <td>Barlow - purified MHC/direct/fluorescence</td>\n",
-       "      <td>BoLA-1*02101</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>2</th>\n",
-       "      <td>BoLA-2*08:01</td>\n",
-       "      <td>AAHCIHAEW</td>\n",
-       "      <td>21.0</td>\n",
-       "      <td>quantitative</td>\n",
-       "      <td>Barlow - purified MHC/direct/fluorescence</td>\n",
-       "      <td>BoLA-2*00801</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>3</th>\n",
-       "      <td>BoLA-2*08:01</td>\n",
-       "      <td>AAKHMSNTY</td>\n",
-       "      <td>1299.0</td>\n",
-       "      <td>quantitative</td>\n",
-       "      <td>Barlow - purified MHC/direct/fluorescence</td>\n",
-       "      <td>BoLA-2*00801</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>4</th>\n",
-       "      <td>BoLA-2*08:01</td>\n",
-       "      <td>DSYAYMRNGW</td>\n",
-       "      <td>2.0</td>\n",
-       "      <td>quantitative</td>\n",
-       "      <td>Barlow - purified MHC/direct/fluorescence</td>\n",
-       "      <td>BoLA-2*00801</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>5</th>\n",
-       "      <td>BoLA-2*08:01</td>\n",
-       "      <td>HTTNTQNNDW</td>\n",
-       "      <td>40.0</td>\n",
-       "      <td>quantitative</td>\n",
-       "      <td>Barlow - purified MHC/direct/fluorescence</td>\n",
-       "      <td>BoLA-2*00801</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>6</th>\n",
-       "      <td>BoLA-2*08:01</td>\n",
-       "      <td>KVYANIAPTY</td>\n",
-       "      <td>10000.0</td>\n",
-       "      <td>quantitative</td>\n",
-       "      <td>Barlow - purified MHC/competitive/fluorescence</td>\n",
-       "      <td>BoLA-2*00801</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>7</th>\n",
-       "      <td>BoLA-2*08:01</td>\n",
-       "      <td>KVYNPPRTNY</td>\n",
-       "      <td>393.0</td>\n",
-       "      <td>quantitative</td>\n",
-       "      <td>Barlow - purified MHC/direct/fluorescence</td>\n",
-       "      <td>BoLA-2*00801</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>8</th>\n",
-       "      <td>BoLA-2*08:01</td>\n",
-       "      <td>LAAKHMSNT</td>\n",
-       "      <td>1380.0</td>\n",
-       "      <td>quantitative</td>\n",
-       "      <td>Barlow - purified MHC/direct/fluorescence</td>\n",
-       "      <td>BoLA-2*00801</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>9</th>\n",
-       "      <td>BoLA-2*08:01</td>\n",
-       "      <td>LLVAMVPEW</td>\n",
-       "      <td>2.0</td>\n",
-       "      <td>quantitative</td>\n",
-       "      <td>Barlow - purified MHC/direct/fluorescence</td>\n",
-       "      <td>BoLA-2*00801</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>10</th>\n",
-       "      <td>BoLA-2*08:01</td>\n",
-       "      <td>MTAHITVPY</td>\n",
-       "      <td>51.0</td>\n",
-       "      <td>quantitative</td>\n",
-       "      <td>Barlow - purified MHC/direct/fluorescence</td>\n",
-       "      <td>BoLA-2*00801</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>11</th>\n",
-       "      <td>BoLA-2*08:01</td>\n",
-       "      <td>RAAHCIHAEW</td>\n",
-       "      <td>1.7</td>\n",
-       "      <td>quantitative</td>\n",
-       "      <td>Barlow - purified MHC/direct/fluorescence</td>\n",
-       "      <td>BoLA-2*00801</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>12</th>\n",
-       "      <td>BoLA-2*08:01</td>\n",
-       "      <td>SSVGVTHGY</td>\n",
-       "      <td>6.0</td>\n",
-       "      <td>quantitative</td>\n",
-       "      <td>Barlow - purified MHC/direct/fluorescence</td>\n",
-       "      <td>BoLA-2*00801</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>13</th>\n",
-       "      <td>BoLA-2*08:01</td>\n",
-       "      <td>TTNTQNNDW</td>\n",
-       "      <td>9.0</td>\n",
-       "      <td>quantitative</td>\n",
-       "      <td>Barlow - purified MHC/direct/fluorescence</td>\n",
-       "      <td>BoLA-2*00801</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>14</th>\n",
-       "      <td>BoLA-2*08:01</td>\n",
-       "      <td>TVYNGTSKY</td>\n",
-       "      <td>5.0</td>\n",
-       "      <td>quantitative</td>\n",
-       "      <td>Barlow - purified MHC/direct/fluorescence</td>\n",
-       "      <td>BoLA-2*00801</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>15</th>\n",
-       "      <td>BoLA-2*08:01</td>\n",
-       "      <td>VVRHEGNLTW</td>\n",
-       "      <td>11.0</td>\n",
-       "      <td>quantitative</td>\n",
-       "      <td>Barlow - purified MHC/direct/fluorescence</td>\n",
-       "      <td>BoLA-2*00801</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>16</th>\n",
-       "      <td>BoLA-2*12:01</td>\n",
-       "      <td>AAHGMGKVGK</td>\n",
-       "      <td>100.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Morrison - cellular MHC/T cell inhibition</td>\n",
-       "      <td>BoLA-2*01201</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>17</th>\n",
-       "      <td>BoLA-2*12:01</td>\n",
-       "      <td>ASFNYGAIK</td>\n",
-       "      <td>67.0</td>\n",
-       "      <td>quantitative</td>\n",
-       "      <td>Barlow - purified MHC/direct/fluorescence</td>\n",
-       "      <td>BoLA-2*01201</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>18</th>\n",
-       "      <td>BoLA-2*12:01</td>\n",
-       "      <td>ASHGMGKVGK</td>\n",
-       "      <td>100.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Morrison - cellular MHC/T cell inhibition</td>\n",
-       "      <td>BoLA-2*01201</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>19</th>\n",
-       "      <td>BoLA-2*12:01</td>\n",
-       "      <td>ASSHGMGKVGK</td>\n",
-       "      <td>100.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Morrison - cellular MHC/T cell inhibition</td>\n",
-       "      <td>BoLA-2*01201</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>20</th>\n",
-       "      <td>BoLA-2*12:01</td>\n",
-       "      <td>CIYQITHGK</td>\n",
-       "      <td>1035.0</td>\n",
-       "      <td>quantitative</td>\n",
-       "      <td>Barlow - purified MHC/direct/fluorescence</td>\n",
-       "      <td>BoLA-2*01201</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>21</th>\n",
-       "      <td>BoLA-2*12:01</td>\n",
-       "      <td>GVNRYDQYK</td>\n",
-       "      <td>8693.0</td>\n",
-       "      <td>quantitative</td>\n",
-       "      <td>Barlow - purified MHC/competitive/fluorescence</td>\n",
-       "      <td>BoLA-2*01201</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>22</th>\n",
-       "      <td>BoLA-2*12:01</td>\n",
-       "      <td>KAAHGMGKVGK</td>\n",
-       "      <td>100.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Morrison - cellular MHC/T cell inhibition</td>\n",
-       "      <td>BoLA-2*01201</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>23</th>\n",
-       "      <td>BoLA-2*12:01</td>\n",
-       "      <td>KAHGMGKVGK</td>\n",
-       "      <td>100.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Morrison - cellular MHC/T cell inhibition</td>\n",
-       "      <td>BoLA-2*01201</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>24</th>\n",
-       "      <td>BoLA-2*12:01</td>\n",
-       "      <td>KASHGMGKVGK</td>\n",
-       "      <td>100.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Morrison - cellular MHC/T cell inhibition</td>\n",
-       "      <td>BoLA-2*01201</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>25</th>\n",
-       "      <td>BoLA-2*12:01</td>\n",
-       "      <td>KEHGMGKVGK</td>\n",
-       "      <td>50000.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Morrison - cellular MHC/T cell inhibition</td>\n",
-       "      <td>BoLA-2*01201</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>26</th>\n",
-       "      <td>BoLA-2*12:01</td>\n",
-       "      <td>KKHGMGKVGK</td>\n",
-       "      <td>50000.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Morrison - cellular MHC/T cell inhibition</td>\n",
-       "      <td>BoLA-2*01201</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>27</th>\n",
-       "      <td>BoLA-2*12:01</td>\n",
-       "      <td>KKKHGMGKVGK</td>\n",
-       "      <td>50000.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Morrison - cellular MHC/T cell inhibition</td>\n",
-       "      <td>BoLA-2*01201</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>28</th>\n",
-       "      <td>BoLA-2*12:01</td>\n",
-       "      <td>KKSHGMGKVGK</td>\n",
-       "      <td>50000.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Morrison - cellular MHC/T cell inhibition</td>\n",
-       "      <td>BoLA-2*01201</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>29</th>\n",
-       "      <td>BoLA-2*12:01</td>\n",
-       "      <td>KLHGMGKVGK</td>\n",
-       "      <td>50000.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Morrison - cellular MHC/T cell inhibition</td>\n",
-       "      <td>BoLA-2*01201</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>...</th>\n",
-       "      <td>...</td>\n",
-       "      <td>...</td>\n",
-       "      <td>...</td>\n",
-       "      <td>...</td>\n",
-       "      <td>...</td>\n",
-       "      <td>...</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239917</th>\n",
-       "      <td>SLA-2*04:01</td>\n",
-       "      <td>MTAHITVPY</td>\n",
-       "      <td>50.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Golde - purified MHC</td>\n",
-       "      <td>SLA-2*0401</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239918</th>\n",
-       "      <td>SLA-2*04:01</td>\n",
-       "      <td>NMTAHITVPY</td>\n",
-       "      <td>50000.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Golde - purified MHC</td>\n",
-       "      <td>SLA-2*0401</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239919</th>\n",
-       "      <td>SLA-2*04:01</td>\n",
-       "      <td>NTYLSGIAQY</td>\n",
-       "      <td>50.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Golde - purified MHC</td>\n",
-       "      <td>SLA-2*0401</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239920</th>\n",
-       "      <td>SLA-2*04:01</td>\n",
-       "      <td>QSSVGVTHGY</td>\n",
-       "      <td>50000.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Golde - purified MHC</td>\n",
-       "      <td>SLA-2*0401</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239921</th>\n",
-       "      <td>SLA-2*04:01</td>\n",
-       "      <td>SSVGVTHGY</td>\n",
-       "      <td>50.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Golde - purified MHC</td>\n",
-       "      <td>SLA-2*0401</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239922</th>\n",
-       "      <td>SLA-2*04:01</td>\n",
-       "      <td>TVYNGTSKY</td>\n",
-       "      <td>50000.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Golde - purified MHC</td>\n",
-       "      <td>SLA-2*0401</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239923</th>\n",
-       "      <td>SLA-2*04:01</td>\n",
-       "      <td>YLSGIAQYY</td>\n",
-       "      <td>50.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Golde - purified MHC</td>\n",
-       "      <td>SLA-2*0401</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239924</th>\n",
-       "      <td>SLA-3*02:02</td>\n",
-       "      <td>KANTQFTAV</td>\n",
-       "      <td>100.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Xia - purified MHC/direct/fluorescence</td>\n",
-       "      <td>SLA-3*0202</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239925</th>\n",
-       "      <td>SLA-3*02:02</td>\n",
-       "      <td>KENTQFTAV</td>\n",
-       "      <td>5000.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Xia - purified MHC</td>\n",
-       "      <td>SLA-3*0202</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239926</th>\n",
-       "      <td>SLA-3*02:02</td>\n",
-       "      <td>KFNTQFTAV</td>\n",
-       "      <td>5000.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Xia - purified MHC</td>\n",
-       "      <td>SLA-3*0202</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239927</th>\n",
-       "      <td>SLA-3*02:02</td>\n",
-       "      <td>KINTQFTAV</td>\n",
-       "      <td>5000.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Xia - purified MHC</td>\n",
-       "      <td>SLA-3*0202</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239928</th>\n",
-       "      <td>SLA-3*02:02</td>\n",
-       "      <td>KLNTQFTAV</td>\n",
-       "      <td>5000.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Xia - purified MHC</td>\n",
-       "      <td>SLA-3*0202</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239929</th>\n",
-       "      <td>SLA-3*02:02</td>\n",
-       "      <td>KMATQFTAV</td>\n",
-       "      <td>100.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Xia - purified MHC/direct/fluorescence</td>\n",
-       "      <td>SLA-3*0202</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239930</th>\n",
-       "      <td>SLA-3*02:02</td>\n",
-       "      <td>KMETQFTAV</td>\n",
-       "      <td>5000.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Xia - purified MHC</td>\n",
-       "      <td>SLA-3*0202</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239931</th>\n",
-       "      <td>SLA-3*02:02</td>\n",
-       "      <td>KMFTQFTAV</td>\n",
-       "      <td>5000.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Xia - purified MHC</td>\n",
-       "      <td>SLA-3*0202</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239932</th>\n",
-       "      <td>SLA-3*02:02</td>\n",
-       "      <td>KMNTAFTAV</td>\n",
-       "      <td>100.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Xia - purified MHC/direct/fluorescence</td>\n",
-       "      <td>SLA-3*0202</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239933</th>\n",
-       "      <td>SLA-3*02:02</td>\n",
-       "      <td>KMNTQFTAA</td>\n",
-       "      <td>100.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Xia - purified MHC/direct/fluorescence</td>\n",
-       "      <td>SLA-3*0202</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239934</th>\n",
-       "      <td>SLA-3*02:02</td>\n",
-       "      <td>KMNTQFTAF</td>\n",
-       "      <td>5000.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Xia - purified MHC</td>\n",
-       "      <td>SLA-3*0202</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239935</th>\n",
-       "      <td>SLA-3*02:02</td>\n",
-       "      <td>KMNTQFTAI</td>\n",
-       "      <td>500.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Xia - purified MHC</td>\n",
-       "      <td>SLA-3*0202</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239936</th>\n",
-       "      <td>SLA-3*02:02</td>\n",
-       "      <td>KMNTQFTAL</td>\n",
-       "      <td>5000.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Xia - purified MHC</td>\n",
-       "      <td>SLA-3*0202</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239937</th>\n",
-       "      <td>SLA-3*02:02</td>\n",
-       "      <td>KMNTQFTAV</td>\n",
-       "      <td>100.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Xia - x-ray crystallography</td>\n",
-       "      <td>SLA-3*0202</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239938</th>\n",
-       "      <td>SLA-3*02:02</td>\n",
-       "      <td>KMNTQFTAV</td>\n",
-       "      <td>100.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Xia - purified MHC</td>\n",
-       "      <td>SLA-3*0202</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239939</th>\n",
-       "      <td>SLA-3*02:02</td>\n",
-       "      <td>KMNTQFTAV</td>\n",
-       "      <td>100.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Xia - purified MHC/direct/fluorescence</td>\n",
-       "      <td>SLA-3*0202</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239940</th>\n",
-       "      <td>SLA-3*02:02</td>\n",
-       "      <td>KMQTQFTAV</td>\n",
-       "      <td>100.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Xia - purified MHC</td>\n",
-       "      <td>SLA-3*0202</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239941</th>\n",
-       "      <td>SLA-3*02:02</td>\n",
-       "      <td>KMRTQFTAV</td>\n",
-       "      <td>500.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Xia - purified MHC</td>\n",
-       "      <td>SLA-3*0202</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239942</th>\n",
-       "      <td>SLA-3*02:02</td>\n",
-       "      <td>KRNTQFTAV</td>\n",
-       "      <td>500.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Xia - purified MHC</td>\n",
-       "      <td>SLA-3*0202</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239943</th>\n",
-       "      <td>SLA-3*02:02</td>\n",
-       "      <td>KTNTQFTAV</td>\n",
-       "      <td>5000.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Xia - purified MHC</td>\n",
-       "      <td>SLA-3*0202</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239944</th>\n",
-       "      <td>SLA-3*02:02</td>\n",
-       "      <td>KVNTQFTAV</td>\n",
-       "      <td>5000.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Xia - purified MHC</td>\n",
-       "      <td>SLA-3*0202</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239945</th>\n",
-       "      <td>SLA-3*02:02</td>\n",
-       "      <td>MQFSSLTV</td>\n",
-       "      <td>100.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Xia - purified MHC</td>\n",
-       "      <td>SLA-3*0202</td>\n",
-       "    </tr>\n",
-       "    <tr>\n",
-       "      <th>239946</th>\n",
-       "      <td>SLA-3*02:02</td>\n",
-       "      <td>RRNYFTAEV</td>\n",
-       "      <td>100.0</td>\n",
-       "      <td>qualitative</td>\n",
-       "      <td>Xia - purified MHC</td>\n",
-       "      <td>SLA-3*0202</td>\n",
-       "    </tr>\n",
-       "  </tbody>\n",
-       "</table>\n",
-       "<p>239947 rows × 6 columns</p>\n",
-       "</div>"
-      ],
-      "text/plain": [
-       "              allele      peptide  measurement_value measurement_type  \\\n",
-       "0       BoLA-1*21:01   AENDTLVVSV             7817.0     quantitative   \n",
-       "1       BoLA-1*21:01   NQFNGGCLLV             1086.0     quantitative   \n",
-       "2       BoLA-2*08:01    AAHCIHAEW               21.0     quantitative   \n",
-       "3       BoLA-2*08:01    AAKHMSNTY             1299.0     quantitative   \n",
-       "4       BoLA-2*08:01   DSYAYMRNGW                2.0     quantitative   \n",
-       "5       BoLA-2*08:01   HTTNTQNNDW               40.0     quantitative   \n",
-       "6       BoLA-2*08:01   KVYANIAPTY            10000.0     quantitative   \n",
-       "7       BoLA-2*08:01   KVYNPPRTNY              393.0     quantitative   \n",
-       "8       BoLA-2*08:01    LAAKHMSNT             1380.0     quantitative   \n",
-       "9       BoLA-2*08:01    LLVAMVPEW                2.0     quantitative   \n",
-       "10      BoLA-2*08:01    MTAHITVPY               51.0     quantitative   \n",
-       "11      BoLA-2*08:01   RAAHCIHAEW                1.7     quantitative   \n",
-       "12      BoLA-2*08:01    SSVGVTHGY                6.0     quantitative   \n",
-       "13      BoLA-2*08:01    TTNTQNNDW                9.0     quantitative   \n",
-       "14      BoLA-2*08:01    TVYNGTSKY                5.0     quantitative   \n",
-       "15      BoLA-2*08:01   VVRHEGNLTW               11.0     quantitative   \n",
-       "16      BoLA-2*12:01   AAHGMGKVGK              100.0      qualitative   \n",
-       "17      BoLA-2*12:01    ASFNYGAIK               67.0     quantitative   \n",
-       "18      BoLA-2*12:01   ASHGMGKVGK              100.0      qualitative   \n",
-       "19      BoLA-2*12:01  ASSHGMGKVGK              100.0      qualitative   \n",
-       "20      BoLA-2*12:01    CIYQITHGK             1035.0     quantitative   \n",
-       "21      BoLA-2*12:01    GVNRYDQYK             8693.0     quantitative   \n",
-       "22      BoLA-2*12:01  KAAHGMGKVGK              100.0      qualitative   \n",
-       "23      BoLA-2*12:01   KAHGMGKVGK              100.0      qualitative   \n",
-       "24      BoLA-2*12:01  KASHGMGKVGK              100.0      qualitative   \n",
-       "25      BoLA-2*12:01   KEHGMGKVGK            50000.0      qualitative   \n",
-       "26      BoLA-2*12:01   KKHGMGKVGK            50000.0      qualitative   \n",
-       "27      BoLA-2*12:01  KKKHGMGKVGK            50000.0      qualitative   \n",
-       "28      BoLA-2*12:01  KKSHGMGKVGK            50000.0      qualitative   \n",
-       "29      BoLA-2*12:01   KLHGMGKVGK            50000.0      qualitative   \n",
-       "...              ...          ...                ...              ...   \n",
-       "239917   SLA-2*04:01    MTAHITVPY               50.0      qualitative   \n",
-       "239918   SLA-2*04:01   NMTAHITVPY            50000.0      qualitative   \n",
-       "239919   SLA-2*04:01   NTYLSGIAQY               50.0      qualitative   \n",
-       "239920   SLA-2*04:01   QSSVGVTHGY            50000.0      qualitative   \n",
-       "239921   SLA-2*04:01    SSVGVTHGY               50.0      qualitative   \n",
-       "239922   SLA-2*04:01    TVYNGTSKY            50000.0      qualitative   \n",
-       "239923   SLA-2*04:01    YLSGIAQYY               50.0      qualitative   \n",
-       "239924   SLA-3*02:02    KANTQFTAV              100.0      qualitative   \n",
-       "239925   SLA-3*02:02    KENTQFTAV             5000.0      qualitative   \n",
-       "239926   SLA-3*02:02    KFNTQFTAV             5000.0      qualitative   \n",
-       "239927   SLA-3*02:02    KINTQFTAV             5000.0      qualitative   \n",
-       "239928   SLA-3*02:02    KLNTQFTAV             5000.0      qualitative   \n",
-       "239929   SLA-3*02:02    KMATQFTAV              100.0      qualitative   \n",
-       "239930   SLA-3*02:02    KMETQFTAV             5000.0      qualitative   \n",
-       "239931   SLA-3*02:02    KMFTQFTAV             5000.0      qualitative   \n",
-       "239932   SLA-3*02:02    KMNTAFTAV              100.0      qualitative   \n",
-       "239933   SLA-3*02:02    KMNTQFTAA              100.0      qualitative   \n",
-       "239934   SLA-3*02:02    KMNTQFTAF             5000.0      qualitative   \n",
-       "239935   SLA-3*02:02    KMNTQFTAI              500.0      qualitative   \n",
-       "239936   SLA-3*02:02    KMNTQFTAL             5000.0      qualitative   \n",
-       "239937   SLA-3*02:02    KMNTQFTAV              100.0      qualitative   \n",
-       "239938   SLA-3*02:02    KMNTQFTAV              100.0      qualitative   \n",
-       "239939   SLA-3*02:02    KMNTQFTAV              100.0      qualitative   \n",
-       "239940   SLA-3*02:02    KMQTQFTAV              100.0      qualitative   \n",
-       "239941   SLA-3*02:02    KMRTQFTAV              500.0      qualitative   \n",
-       "239942   SLA-3*02:02    KRNTQFTAV              500.0      qualitative   \n",
-       "239943   SLA-3*02:02    KTNTQFTAV             5000.0      qualitative   \n",
-       "239944   SLA-3*02:02    KVNTQFTAV             5000.0      qualitative   \n",
-       "239945   SLA-3*02:02     MQFSSLTV              100.0      qualitative   \n",
-       "239946   SLA-3*02:02    RRNYFTAEV              100.0      qualitative   \n",
-       "\n",
-       "                                    measurement_source original_allele  \n",
-       "0       Barlow - purified MHC/competitive/fluorescence    BoLA-1*02101  \n",
-       "1            Barlow - purified MHC/direct/fluorescence    BoLA-1*02101  \n",
-       "2            Barlow - purified MHC/direct/fluorescence    BoLA-2*00801  \n",
-       "3            Barlow - purified MHC/direct/fluorescence    BoLA-2*00801  \n",
-       "4            Barlow - purified MHC/direct/fluorescence    BoLA-2*00801  \n",
-       "5            Barlow - purified MHC/direct/fluorescence    BoLA-2*00801  \n",
-       "6       Barlow - purified MHC/competitive/fluorescence    BoLA-2*00801  \n",
-       "7            Barlow - purified MHC/direct/fluorescence    BoLA-2*00801  \n",
-       "8            Barlow - purified MHC/direct/fluorescence    BoLA-2*00801  \n",
-       "9            Barlow - purified MHC/direct/fluorescence    BoLA-2*00801  \n",
-       "10           Barlow - purified MHC/direct/fluorescence    BoLA-2*00801  \n",
-       "11           Barlow - purified MHC/direct/fluorescence    BoLA-2*00801  \n",
-       "12           Barlow - purified MHC/direct/fluorescence    BoLA-2*00801  \n",
-       "13           Barlow - purified MHC/direct/fluorescence    BoLA-2*00801  \n",
-       "14           Barlow - purified MHC/direct/fluorescence    BoLA-2*00801  \n",
-       "15           Barlow - purified MHC/direct/fluorescence    BoLA-2*00801  \n",
-       "16           Morrison - cellular MHC/T cell inhibition    BoLA-2*01201  \n",
-       "17           Barlow - purified MHC/direct/fluorescence    BoLA-2*01201  \n",
-       "18           Morrison - cellular MHC/T cell inhibition    BoLA-2*01201  \n",
-       "19           Morrison - cellular MHC/T cell inhibition    BoLA-2*01201  \n",
-       "20           Barlow - purified MHC/direct/fluorescence    BoLA-2*01201  \n",
-       "21      Barlow - purified MHC/competitive/fluorescence    BoLA-2*01201  \n",
-       "22           Morrison - cellular MHC/T cell inhibition    BoLA-2*01201  \n",
-       "23           Morrison - cellular MHC/T cell inhibition    BoLA-2*01201  \n",
-       "24           Morrison - cellular MHC/T cell inhibition    BoLA-2*01201  \n",
-       "25           Morrison - cellular MHC/T cell inhibition    BoLA-2*01201  \n",
-       "26           Morrison - cellular MHC/T cell inhibition    BoLA-2*01201  \n",
-       "27           Morrison - cellular MHC/T cell inhibition    BoLA-2*01201  \n",
-       "28           Morrison - cellular MHC/T cell inhibition    BoLA-2*01201  \n",
-       "29           Morrison - cellular MHC/T cell inhibition    BoLA-2*01201  \n",
-       "...                                                ...             ...  \n",
-       "239917                            Golde - purified MHC      SLA-2*0401  \n",
-       "239918                            Golde - purified MHC      SLA-2*0401  \n",
-       "239919                            Golde - purified MHC      SLA-2*0401  \n",
-       "239920                            Golde - purified MHC      SLA-2*0401  \n",
-       "239921                            Golde - purified MHC      SLA-2*0401  \n",
-       "239922                            Golde - purified MHC      SLA-2*0401  \n",
-       "239923                            Golde - purified MHC      SLA-2*0401  \n",
-       "239924          Xia - purified MHC/direct/fluorescence      SLA-3*0202  \n",
-       "239925                              Xia - purified MHC      SLA-3*0202  \n",
-       "239926                              Xia - purified MHC      SLA-3*0202  \n",
-       "239927                              Xia - purified MHC      SLA-3*0202  \n",
-       "239928                              Xia - purified MHC      SLA-3*0202  \n",
-       "239929          Xia - purified MHC/direct/fluorescence      SLA-3*0202  \n",
-       "239930                              Xia - purified MHC      SLA-3*0202  \n",
-       "239931                              Xia - purified MHC      SLA-3*0202  \n",
-       "239932          Xia - purified MHC/direct/fluorescence      SLA-3*0202  \n",
-       "239933          Xia - purified MHC/direct/fluorescence      SLA-3*0202  \n",
-       "239934                              Xia - purified MHC      SLA-3*0202  \n",
-       "239935                              Xia - purified MHC      SLA-3*0202  \n",
-       "239936                              Xia - purified MHC      SLA-3*0202  \n",
-       "239937                     Xia - x-ray crystallography      SLA-3*0202  \n",
-       "239938                              Xia - purified MHC      SLA-3*0202  \n",
-       "239939          Xia - purified MHC/direct/fluorescence      SLA-3*0202  \n",
-       "239940                              Xia - purified MHC      SLA-3*0202  \n",
-       "239941                              Xia - purified MHC      SLA-3*0202  \n",
-       "239942                              Xia - purified MHC      SLA-3*0202  \n",
-       "239943                              Xia - purified MHC      SLA-3*0202  \n",
-       "239944                              Xia - purified MHC      SLA-3*0202  \n",
-       "239945                              Xia - purified MHC      SLA-3*0202  \n",
-       "239946                              Xia - purified MHC      SLA-3*0202  \n",
-       "\n",
-       "[239947 rows x 6 columns]"
-      ]
-     },
-     "execution_count": 13,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "data_df = pandas.read_csv(data_path)\n",
-    "data_df"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "# Fit a model: Low level `Class1NeuralNetwork` interface"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 14,
-   "metadata": {
-    "collapsed": false
-   },
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "{'activation': 'relu',\n",
-       " 'batch_normalization': False,\n",
-       " 'dense_layer_l1_regularization': 0.001,\n",
-       " 'dense_layer_l2_regularization': 0.0,\n",
-       " 'dropout_probability': 0.0,\n",
-       " 'early_stopping': True,\n",
-       " 'embedding_init_method': 'glorot_uniform',\n",
-       " 'embedding_input_dim': 21,\n",
-       " 'embedding_output_dim': 8,\n",
-       " 'init': 'glorot_uniform',\n",
-       " 'kmer_size': 15,\n",
-       " 'layer_sizes': [16],\n",
-       " 'left_edge': 4,\n",
-       " 'locally_connected_layers': [{'activation': 'tanh',\n",
-       "   'filters': 8,\n",
-       "   'kernel_size': 3}],\n",
-       " 'loss': 'mse',\n",
-       " 'max_epochs': 500,\n",
-       " 'min_delta': 0,\n",
-       " 'minibatch_size': 128,\n",
-       " 'mode': 'auto',\n",
-       " 'monitor': 'val_loss',\n",
-       " 'optimizer': 'rmsprop',\n",
-       " 'output_activation': 'sigmoid',\n",
-       " 'patience': 10,\n",
-       " 'peptide_amino_acid_encoding': 'one-hot',\n",
-       " 'pseudosequence_use_embedding': False,\n",
-       " 'random_negative_affinity_max': 50000.0,\n",
-       " 'random_negative_affinity_min': 20000.0,\n",
-       " 'random_negative_constant': 25,\n",
-       " 'random_negative_distribution_smoothing': 0.0,\n",
-       " 'random_negative_match_distribution': True,\n",
-       " 'random_negative_rate': 0.0,\n",
-       " 'right_edge': 4,\n",
-       " 'take_best_epoch': False,\n",
-       " 'use_embedding': False,\n",
-       " 'validation_split': 0.2,\n",
-       " 'verbose': 1}"
-      ]
-     },
-     "execution_count": 14,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "# We'll use mostly the default hyperparameters here. Could also specify them as kwargs.\n",
-    "new_model = mhcflurry.Class1NeuralNetwork(layer_sizes=[16])\n",
-    "new_model.hyperparameters"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 16,
-   "metadata": {
-    "collapsed": false
-   },
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "Train on 2491 samples, validate on 623 samples\n",
-      "Epoch 1/1\n",
-      "2491/2491 [==============================] - 0s 36us/step - loss: 0.0173 - val_loss: 0.0270\n",
-      "Epoch   0 / 500: loss=0.0173307. Min val loss (None) at epoch None\n",
-      "Train on 2491 samples, validate on 623 samples\n",
-      "Epoch 1/1\n",
-      "2491/2491 [==============================] - 0s 41us/step - loss: 0.0175 - val_loss: 0.0262\n",
-      "Train on 2491 samples, validate on 623 samples\n",
-      "Epoch 1/1\n",
-      "2491/2491 [==============================] - 0s 39us/step - loss: 0.0170 - val_loss: 0.0278\n",
-      "Train on 2491 samples, validate on 623 samples\n",
-      "Epoch 1/1\n",
-      "2491/2491 [==============================] - 0s 35us/step - loss: 0.0175 - val_loss: 0.0284\n",
-      "Train on 2491 samples, validate on 623 samples\n",
-      "Epoch 1/1\n",
-      "2491/2491 [==============================] - 0s 34us/step - loss: 0.0174 - val_loss: 0.0276\n",
-      "Train on 2491 samples, validate on 623 samples\n",
-      "Epoch 1/1\n",
-      "2491/2491 [==============================] - 0s 59us/step - loss: 0.0171 - val_loss: 0.0272\n",
-      "Train on 2491 samples, validate on 623 samples\n",
-      "Epoch 1/1\n",
-      "2491/2491 [==============================] - 0s 33us/step - loss: 0.0171 - val_loss: 0.0273\n",
-      "Train on 2491 samples, validate on 623 samples\n",
-      "Epoch 1/1\n",
-      "2491/2491 [==============================] - 0s 49us/step - loss: 0.0169 - val_loss: 0.0268\n",
-      "Train on 2491 samples, validate on 623 samples\n",
-      "Epoch 1/1\n",
-      "2491/2491 [==============================] - 0s 66us/step - loss: 0.0171 - val_loss: 0.0273\n",
-      "Train on 2491 samples, validate on 623 samples\n",
-      "Epoch 1/1\n",
-      "2491/2491 [==============================] - 0s 35us/step - loss: 0.0169 - val_loss: 0.0268\n",
-      "Train on 2491 samples, validate on 623 samples\n",
-      "Epoch 1/1\n",
-      "2491/2491 [==============================] - 0s 31us/step - loss: 0.0168 - val_loss: 0.0275\n",
-      "Train on 2491 samples, validate on 623 samples\n",
-      "Epoch 1/1\n",
-      "2491/2491 [==============================] - 0s 41us/step - loss: 0.0169 - val_loss: 0.0275\n",
-      "Train on 2491 samples, validate on 623 samples\n",
-      "Epoch 1/1\n",
-      "2491/2491 [==============================] - 0s 47us/step - loss: 0.0169 - val_loss: 0.0298\n",
-      "Early stopping at epoch  12 / 500: loss=0.0168712. Min val loss (0.0261514389179) at epoch 1\n",
-      "CPU times: user 1.92 s, sys: 167 ms, total: 2.09 s\n",
-      "Wall time: 1.72 s\n"
-     ]
-    }
-   ],
-   "source": [
-    "train_data = data_df.loc[\n",
-    "    (data_df.allele == \"HLA-B*57:01\") &\n",
-    "    (data_df.peptide.str.len() >= 8) &\n",
-    "    (data_df.peptide.str.len() <= 15)\n",
-    "]\n",
-    "% time new_model.fit(train_data.peptide.values, train_data.measurement_value.values)"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 17,
-   "metadata": {
-    "collapsed": false
-   },
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "array([ 26802.58186135])"
-      ]
-     },
-     "execution_count": 17,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "new_model.predict([\"SYNPEPII\"])"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "# Fit a model: high level `Class1AffinityPredictor` interface"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 18,
-   "metadata": {
-    "collapsed": false
-   },
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "Train on 2491 samples, validate on 623 samples\n",
-      "Epoch 1/1\n",
-      "2491/2491 [==============================] - 1s 204us/step - loss: 0.2511 - val_loss: 0.2062\n",
-      "Epoch   0 /  10: loss=0.251054. Min val loss (None) at epoch None\n",
-      "Train on 2491 samples, validate on 623 samples\n",
-      "Epoch 1/1\n",
-      "2491/2491 [==============================] - 0s 56us/step - loss: 0.1951 - val_loss: 0.1758\n",
-      "Train on 2491 samples, validate on 623 samples\n",
-      "Epoch 1/1\n",
-      "2491/2491 [==============================] - 0s 52us/step - loss: 0.1658 - val_loss: 0.1494\n",
-      "Train on 2491 samples, validate on 623 samples\n",
-      "Epoch 1/1\n",
-      "2491/2491 [==============================] - 0s 50us/step - loss: 0.1401 - val_loss: 0.1259\n",
-      "Train on 2491 samples, validate on 623 samples\n",
-      "Epoch 1/1\n",
-      "2491/2491 [==============================] - 0s 48us/step - loss: 0.1171 - val_loss: 0.1059\n",
-      "Train on 2491 samples, validate on 623 samples\n",
-      "Epoch 1/1\n",
-      "2491/2491 [==============================] - 0s 52us/step - loss: 0.0965 - val_loss: 0.0869\n",
-      "Train on 2491 samples, validate on 623 samples\n",
-      "Epoch 1/1\n",
-      "2491/2491 [==============================] - 0s 40us/step - loss: 0.0783 - val_loss: 0.0716\n",
-      "Train on 2491 samples, validate on 623 samples\n",
-      "Epoch 1/1\n",
-      "2491/2491 [==============================] - 0s 46us/step - loss: 0.0631 - val_loss: 0.0586\n",
-      "Train on 2491 samples, validate on 623 samples\n",
-      "Epoch 1/1\n",
-      "2491/2491 [==============================] - 0s 54us/step - loss: 0.0514 - val_loss: 0.0486\n",
-      "Train on 2491 samples, validate on 623 samples\n",
-      "Epoch 1/1\n",
-      "2491/2491 [==============================] - 0s 36us/step - loss: 0.0433 - val_loss: 0.0421\n"
-     ]
-    },
-    {
-     "data": {
-      "text/plain": [
-       "[<mhcflurry.class1_neural_network.Class1NeuralNetwork at 0x124ad7d30>]"
-      ]
-     },
-     "execution_count": 18,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "affinity_predictor = mhcflurry.Class1AffinityPredictor()\n",
-    "\n",
-    "# This can be called any number of times, for example on different alleles, to build up the ensembles.\n",
-    "affinity_predictor.fit_allele_specific_predictors(\n",
-    "    n_models=1,\n",
-    "    architecture_hyperparameters={\"layer_sizes\": [16], \"max_epochs\": 10},\n",
-    "    peptides=train_data.peptide.values,\n",
-    "    affinities=train_data.measurement_value.values,\n",
-    "    allele=\"HLA-B*57:01\",\n",
-    ")"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 19,
-   "metadata": {
-    "collapsed": false
-   },
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "array([ 17405.26823281])"
-      ]
-     },
-     "execution_count": 19,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "affinity_predictor.predict([\"SYNPEPII\"], allele=\"HLA-B*57:01\")"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "# Save and restore the fit model"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 20,
-   "metadata": {
-    "collapsed": false
-   },
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "manifest.csv\r\n",
-      "weights_HLA-B*57:01-0-7be58b1094489f2d.npz\r\n"
-     ]
-    }
-   ],
-   "source": [
-    "!mkdir /tmp/saved-affinity-predictor\n",
-    "affinity_predictor.save(\"/tmp/saved-affinity-predictor\")\n",
-    "!ls /tmp/saved-affinity-predictor"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 21,
-   "metadata": {
-    "collapsed": false
-   },
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "array([ 17405.26823281])"
-      ]
-     },
-     "execution_count": 21,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "affinity_predictor2 = mhcflurry.Class1AffinityPredictor.load(\"/tmp/saved-affinity-predictor\")\n",
-    "affinity_predictor2.predict([\"SYNPEPII\"], allele=\"HLA-B*57:01\")"
-   ]
-  }
- ],
- "metadata": {
-  "anaconda-cloud": {},
-  "kernelspec": {
-   "display_name": "Python [py3k]",
-   "language": "python",
-   "name": "Python [py3k]"
-  },
-  "language_info": {
-   "codemirror_mode": {
-    "name": "ipython",
-    "version": 3
-   },
-   "file_extension": ".py",
-   "mimetype": "text/x-python",
-   "name": "python",
-   "nbconvert_exporter": "python",
-   "pygments_lexer": "ipython3",
-   "version": "3.5.2"
-  }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}