Fix Xspode

This commit is contained in:
2025-03-10 21:29:47 +01:00
parent a26522e62f
commit 5919fbfd34
5 changed files with 5 additions and 12 deletions

View File

@@ -110,7 +110,6 @@ namespace bayesnet {
instance[nFeatures_] = dataset[-1][i].item<int>();
addSample(instance, weights[i].item<double>());
}
switch (smoothing) {
case bayesnet::Smoothing_t::ORIGINAL:
alpha_ = 1.0 / m;
@@ -414,9 +413,6 @@ namespace bayesnet {
}
float XSpode::score(std::vector<std::vector<int>>& X, std::vector<int>& y)
{
if (!fitted) {
throw std::logic_error(CLASSIFIER_NOT_FITTED);
}
auto y_pred = this->predict(X);
int correct = 0;
for (int i = 0; i < y_pred.size(); ++i) {