Compare commits
2 Commits
PythonLink
...
64f5a7f14a
Author | SHA1 | Date | |
---|---|---|---|
64f5a7f14a
|
|||
e03efb5f63
|
@@ -4,7 +4,7 @@
|
||||
#include <map>
|
||||
#include <argparse/argparse.hpp>
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "ArffFiles.h"v
|
||||
#include "ArffFiles.h"
|
||||
#include "BayesMetrics.h"
|
||||
#include "CPPFImdlp.h"
|
||||
#include "Folding.h"
|
||||
|
@@ -108,8 +108,10 @@ namespace bayesnet {
|
||||
void BoostAODE::trainModel(const torch::Tensor& weights)
|
||||
{
|
||||
unordered_set<int> featuresUsed;
|
||||
int tolerance = 5; // number of times the accuracy can be lower than the threshold
|
||||
if (selectFeatures) {
|
||||
featuresUsed = initializeModels();
|
||||
tolerance = 0; // Remove tolerance if features are selected
|
||||
}
|
||||
if (maxModels == 0)
|
||||
maxModels = .1 * n > 10 ? .1 * n : n;
|
||||
@@ -119,7 +121,7 @@ namespace bayesnet {
|
||||
double priorAccuracy = 0.0;
|
||||
double delta = 1.0;
|
||||
double threshold = 1e-4;
|
||||
int tolerance = 5; // number of times the accuracy can be lower than the threshold
|
||||
|
||||
int count = 0; // number of times the accuracy is lower than the threshold
|
||||
fitted = true; // to enable predict
|
||||
// Step 0: Set the finish condition
|
||||
|
Reference in New Issue
Block a user