Skip to content

Commit

Permalink
Fix class1_presentation_predictor.py for latest pandas
Browse files Browse the repository at this point in the history
  • Loading branch information
timodonnell committed Sep 23, 2021
1 parent 817baaa commit abb1537
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mhcflurry/class1_presentation_predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit abb1537

Please sign in to comment.