Skip to content

Commit 46d9f8b

Browse files
author
osahin
committed
bug fix -> output vector
1 parent 233bf98 commit 46d9f8b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/csvc_interface.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,16 @@ void csvc_interface::obtain_probabilities(const double c_p , const double g_p, c
7171
}
7272
for(int comp = 0; comp < nsamp_eval; comp++){
7373
svm_predict_probability(csvc_svm_model, sample_eval.x[comp], prob);
74-
if(eval_bkg > comp){
74+
if(prob[1] > highest_accur_cut) {
75+
if(output) output -> push_back(1);
76+
} else{
7577
if(output) output -> push_back(0);
78+
}
79+
if(eval_bkg > comp){
7680
disc_B -> Fill(prob[1], sample_eval.W[comp]);
7781
disc_B_roc-> Fill(prob[1], sample_eval.W[comp]);
7882
if(prob[1] > highest_accur_cut) {bkg_yield += sample_eval.W[comp];}
7983
} else{
80-
if(output) output -> push_back(1);
8184
disc_S -> Fill(prob[1], sample_eval.W[comp]);
8285
disc_S_roc-> Fill(prob[1], sample_eval.W[comp]);
8386
if(prob[1] > highest_accur_cut) {sig_yield += sample_eval.W[comp];}

0 commit comments

Comments
 (0)