Skip to content

Commit

Permalink
make confidence sorting stable.
Browse files Browse the repository at this point in the history
  • Loading branch information
hyunhwan-bcm committed Aug 1, 2024
1 parent 988ff34 commit 822319c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/extraModel_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,9 @@ def AIM(data_folder, sample_id):
df_pred.loc[:, model_dict[mn]["features"]]
)[:, 1]
df_pred.insert(loc=df_pred.shape[1] - 1, column="predict", value=predict)
df_pred = df_pred.sort_index()
df_pred = assign_confidence_score(model_dict[mn]["ref"], df_pred)
df_pred = df_pred.sort_values("confidence", ascending=False)
df_pred = df_pred.sort_values("confidence", ascending=False, kind="stable")
df_pred = assign_ranking(df_pred)
df_pred.to_csv(f"{out_folder}/{sample_id}_{mn}_predictions.csv")
else:
Expand Down

0 comments on commit 822319c

Please sign in to comment.