34 #ifndef SHARK_OBJECTIVEFUNCTIONS_ROC_H 35 #define SHARK_OBJECTIVEFUNCTIONS_ROC_H 71 template<
class InputType>
75 std::vector<std::size_t> classes =
classSizes(
set);
78 std::size_t positive = classes[0];
79 std::size_t negative = classes[1];
84 std::size_t posPositive = 0;
85 std::size_t posNegative = 0;
88 for(std::size_t i = 0; i !=
set.size(); ++i){
89 RealMatrix output = model(
set.batch(i).input);
91 for(std::size_t j = 0; j != output.size1(); ++j){
92 double value = output(j,0);
93 if (
set.batch(i)(j) == 1)