@classmethod<EOL><INDENT>def merge(cls, predictors):<DEDENT>
assert len(predictors) > <NUM_LIT:0><EOL>if len(predictors) == <NUM_LIT:1>:<EOL><INDENT>return predictors[<NUM_LIT:0>]<EOL><DEDENT>allele_to_allele_specific_models = collections.defaultdict(list)<EOL>class1_pan_allele_models = []<EOL>allele_to_fixed_length_sequence = predictors[<NUM_LIT:0>].allele_to_fixed_length_sequence<EOL>for predictor in predictors:<EOL><INDENT>for (allele, networks) in (<EOL>predictor.allele_to_allele_specific_models.items()):<EOL><INDENT>allele_to_allele_specific_models[allele].extend(networks)<EOL><DEDENT>class1_pan_allele_models.extend(<EOL>predictor.class1_pan_allele_models)<EOL><DEDENT>return Class1AffinityPredictor(<EOL>allele_to_allele_specific_models=allele_to_allele_specific_models,<EOL>class1_pan_allele_models=class1_pan_allele_models,<EOL>allele_to_fixed_length_sequence=allele_to_fixed_length_sequence<EOL>)<EOL>
Merge the ensembles of two or more `Class1AffinityPredictor` instances.

Note: the resulting merged predictor will NOT have calibrated percentile
ranks. Call `calibrate_percentile_ranks` on it if these are needed.

Parameters
----------
predictors : sequence of `Class1AffinityPredictor`

Returns
-------
`Class1AffinityPredictor` instance