Function getRules(std::vector<Rule>&, const std::string&, DataSetFid&, float&, int&)
Defined in File rule.h
Function Documentation
-
void getRules(std::vector<Rule> &rules, const std::string &rulesFile, DataSetFid &dataset, float &decisionThreshold, int &positiveClassIndex)
Get the rules from a rules file.
- Parameters:
rules – Vector to store the rules obtained from the file.
rulesFile – Path to the rules file.
dataset – The dataset containing information about the attributes and classes.
decisionThreshold – Reference to a float where the decision threshold will be stored.
positiveClassIndex – Reference to an int where the positive class index will be stored.
- Throws:
FileNotFoundError – If the rules file cannot be opened.
FileContentError – If the rules in the file are not properly formatted.