diff --git a/mhcflurry/class1_presentation_predictor.py b/mhcflurry/class1_presentation_predictor.py index 4cf159c9..34d96c54 100644 --- a/mhcflurry/class1_presentation_predictor.py +++ b/mhcflurry/class1_presentation_predictor.py @@ -106,7 +106,6 @@ def supports_presentation_prediction(self): self.supports_processing_prediction and self.weights_dataframe is not None) - def predict_affinity( self, peptides, @@ -387,7 +386,8 @@ def fit( X=df[self.model_inputs].values, y=df.target.astype(float)) - self.weights_dataframe.loc[model_name, "intercept"] = model.intercept_ + (intercept,) = model.intercept_.flatten() + self.weights_dataframe.loc[model_name, "intercept"] = intercept for (name, value) in zip(self.model_inputs, numpy.squeeze(model.coef_)): self.weights_dataframe.loc[model_name, name] = value self._models_cache[model_name] = model