Function getThresholdFromRulesFile(const std::string&, float&, int&)

Function Documentation

void getThresholdFromRulesFile(const std::string &filePath, float &decisionThreshold, int &positiveClassIndex)

Extract the decision threshold and the index of the positive class from a rules file.

Parameters:
  • filePath – The path to the file containing the rules.

  • decisionThreshold – Reference to a float variable where the decision threshold will be stored. Set to -1.0 if not found in the file.

  • positiveClassIndex – Reference to an int variable where the index of the positive class will be stored. Set to -1 if not found in the file.

Throws:

FileNotFoundError – If the file specified by filePath cannot be opened.