Add notes to Classifier & use them in BoostAODE

This commit is contained in:
Ricardo Montañana Gómez 2024-02-08 18:01:09 +01:00
parent e17aee7bdb
commit b33da34655
Signed by: rmontanana
GPG Key ID: 46064262FD9A7ADE
2 changed files with 3 additions and 0 deletions

View File

@ -115,6 +115,7 @@ namespace bayesnet {
significanceModels.push_back(1.0);
n_models++;
}
notes.push_back("Used features in initialization: " + std::to_string(featuresUsed.size()) + " of " + std::to_string(features.size()) + " with " + algorithm);
delete featureSelector;
return featuresUsed;
}
@ -197,6 +198,7 @@ namespace bayesnet {
exitCondition = n_models >= maxModels && repeatSparent || epsilon_t > 0.5 || count > tolerance;
}
if (featuresUsed.size() != features.size()) {
notes.push_back("Used features in train: " + std::to_string(featuresUsed.size()) + " of " + std::to_string(features.size()));
status = WARNING;
}
}

View File

@ -19,6 +19,7 @@ namespace bayesnet {
std::map<std::string, std::vector<int>> states;
torch::Tensor dataset; // (n+1)xm tensor
status_t status = NORMAL;
std::vector<std::string> notes; // Used to store messages occurred during the fit process
void checkFitParameters();
virtual void buildModel(const torch::Tensor& weights) = 0;
void trainModel(const torch::Tensor& weights) override;