Skip to content

Commit

Permalink
Fix pandas assigning new column
Browse files Browse the repository at this point in the history
  • Loading branch information
FanwangM committed Oct 9, 2023
1 parent da78638 commit 39a8681
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion b3clf/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 39a8681

Please sign in to comment.