Skip to content

Commit

Permalink
update: eval: calc ratio of unanswered questions
Browse files Browse the repository at this point in the history
  • Loading branch information
PtrMan committed Dec 20, 2020
1 parent ab9def2 commit 1f581ac
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ pub fn main() {
let mut acc:f64 = 0.0;
let mut nRuns = 5000; // how may runs are added up?

let mut cntUnanswered:i64 = 0; // how many questions were unanswered?

for _iRun in 0..nRuns {


Expand All @@ -100,12 +102,15 @@ pub fn main() {
},
None => {
println!("CYCLES None"); // found no result
cntUnanswered+=1;
}
}
}
}
acc /= (nRuns as f64); // calc average

println!("H # runs {}", nRuns);
println!("H unanswered ratio {}", cntUnanswered as f64 / nRuns as f64);
println!("SCORE {}", acc); // print score

}
Expand Down

0 comments on commit 1f581ac

Please sign in to comment.