pyprophet icon indicating copy to clipboard operation
pyprophet copied to clipboard

--apply_weights requires --ss_main_score to be specified as in the original command

Open jcharkow opened this issue 5 months ago • 1 comments

I get unexpected results when using --apply_weights with XGBoost if a --ss_main_score was set manually.

E.g.

pyprophet score --in in.oswpq --level=ms1ms2 --classifier=XGBoost --ss_main_score=var_dotprod_score

  • Trains the model as expected
Image

However if this command is used pyprophet score --in in.oswpq --level=ms1ms2 --classifier=XGBoost --apply_weights=weights.bin

The weights are applied to the incorrect scores

Image (Same weights on different columns)

To get the expected results the --ss_main_score has to be specified as in the original run pyprophet score --in in.oswpq --level=ms1ms2 --classifier=XGBoost --ss_main_score=var_dotprod_score --apply_weights=weights.bin

Image

It would be nice if this was detected automatically somehow

jcharkow avatar Jul 24 '25 20:07 jcharkow

I think keeping track of the feature names, something similar to the draft PR #117, would probably be able to make this automatic. Need to check if the issue is the same with the other models, and file types.

singjc avatar Jul 28 '25 21:07 singjc