def fit_class1_pan_allele_models(<EOL>self,<EOL>n_models,<EOL>architecture_hyperparameters,<EOL>alleles,<EOL>peptides,<EOL>affinities,<EOL>inequalities,<EOL>models_dir_for_save=None,<EOL>verbose=<NUM_LIT:1>,<EOL>progress_preamble="<STR_LIT>",<EOL>progress_print_interval=<NUM_LIT>):
alleles = pandas.Series(alleles).map(mhcnames.normalize_allele_name)<EOL>allele_encoding = AlleleEncoding(<EOL>alleles,<EOL>allele_to_fixed_length_sequence=self.allele_to_fixed_length_sequence)<EOL>encodable_peptides = EncodableSequences.create(peptides)<EOL>models = []<EOL>for i in range(n_models):<EOL><INDENT>logging.info("<STR_LIT>" % (i + <NUM_LIT:1>, n_models))<EOL>model = Class1NeuralNetwork(**architecture_hyperparameters)<EOL>model.fit(<EOL>encodable_peptides,<EOL>affinities,<EOL>inequalities=inequalities,<EOL>allele_encoding=allele_encoding,<EOL>verbose=verbose,<EOL>progress_preamble=progress_preamble,<EOL>progress_print_interval=progress_print_interval)<EOL>model_name = self.model_name("<STR_LIT>", i)<EOL>self.class1_pan_allele_models.append(model)<EOL>row = pandas.Series(collections.OrderedDict([<EOL>("<STR_LIT>", model_name),<EOL>("<STR_LIT>", "<STR_LIT>"),<EOL>("<STR_LIT>", json.dumps(model.get_config())),<EOL>("<STR_LIT>", model),<EOL>])).to_frame().T<EOL>self._manifest_df = pandas.concat(<EOL>[self.manifest_df, row], ignore_index=True)<EOL>if models_dir_for_save:<EOL><INDENT>self.save(<EOL>models_dir_for_save, model_names_to_write=[model_name])<EOL><DEDENT>models.append(model)<EOL><DEDENT>self.clear_cache()<EOL>return models<EOL>
Fit one or more pan-allele predictors using a single neural network
architecture.

The new predictors are saved in the Class1AffinityPredictor instance
and will be used on subsequent calls to `predict`.

Parameters
----------
n_models : int
    Number of neural networks to fit

architecture_hyperparameters : dict

alleles : list of string
    Allele names (not sequences) corresponding to each peptide

peptides : `EncodableSequences` or list of string

affinities : list of float
    nM affinities

inequalities : list of string, each element one of ">", "<", or "="
    See Class1NeuralNetwork.fit for details.

models_dir_for_save : string, optional
    If specified, the Class1AffinityPredictor is (incrementally) written
    to the given models dir after each neural network is fit.

verbose : int
    Keras verbosity

progress_preamble : string
    Optional string of information to include in each progress update

progress_print_interval : float
    How often (in seconds) to print progress. Set to None to disable.

Returns
-------
list of `Class1NeuralNetwork`