Skip to content

Commit

Permalink
Merge pull request #197 from openvax/fix-for-latest-pandas
Browse files Browse the repository at this point in the history
Fix class1_presentation_predictor.py for latest pandas
  • Loading branch information
timodonnell committed Sep 24, 2021
2 parents 4806a9c + abb1537 commit 262753a
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 262753a

Please sign in to comment.