From 39a8681346d7e7027a48a989acaed3b5080d421e Mon Sep 17 00:00:00 2001 From: Fanwang Meng Date: Sun, 8 Oct 2023 20:48:47 -0400 Subject: [PATCH] Fix pandas assigning new column --- b3clf/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b3clf/utils.py b/b3clf/utils.py index de71316..8d90387 100644 --- a/b3clf/utils.py +++ b/b3clf/utils.py @@ -144,7 +144,7 @@ def predict_permeability(clf_str, sampling_str, features_df, info_df, threshold= ) # get predicted probabilities - info_df["B3clf_predicted_probability"] = clf.predict_proba(features_df)[:, 1] + info_df.loc[:, "B3clf_predicted_probability"] = clf.predict_proba(features_df)[:, 1] # get predicted label from probability using the threshold mask = np.greater_equal( info_df["B3clf_predicted_probability"].to_numpy(),