]> ruin.nu Git - germs.git/commitdiff
calculate the avg score for the model
authorMichael Andreen <harv@ruin.nu>
Mon, 13 Aug 2007 07:21:17 +0000 (07:21 +0000)
committerMichael Andreen <harv@ruin.nu>
Mon, 13 Aug 2007 07:21:17 +0000 (07:21 +0000)
src/main.cpp

index 94109b4e4cce83e47329ce482186e44b740722f7..b6194297d7e5f0d6290e64a09cca4dbf76d528a2 100644 (file)
@@ -76,9 +76,12 @@ int main(int argc, char** argv){
        //TODO: Sort
        GeneSorter::ActionList al = so.sort(go,model);
 
+       double score = 0;
        for (GeneSorter::ActionList::iterator sa = al.begin(); sa != al.end(); ++sa){
                cout << "Action: " << sa->toString() << " model score: " << model.score(*sa,go) << endl;
+               score += model.score(*sa,go);
        }
+       cout << "Avg score: " << score / al.size() << endl;
        //TODO: Print result
        return EXIT_SUCCESS;
 }