diff --git a/bayesnet/classifiers/Proposal.cc b/bayesnet/classifiers/Proposal.cc index a5d5f12..6fce507 100644 --- a/bayesnet/classifiers/Proposal.cc +++ b/bayesnet/classifiers/Proposal.cc @@ -70,7 +70,7 @@ namespace bayesnet { states[pFeatures[index]] = xStates; } const torch::Tensor weights = torch::full({ pDataset.size(1) }, 1.0 / pDataset.size(1), torch::kDouble); - model.fit(pDataset, weights, pFeatures, pClassName, states, Smoothing_t::OLD_LAPLACE); + model.fit(pDataset, weights, pFeatures, pClassName, states, Smoothing_t::ORIGINAL); } return states; } diff --git a/bayesnet/network/Network.cc b/bayesnet/network/Network.cc index d028bb6..b19a054 100644 --- a/bayesnet/network/Network.cc +++ b/bayesnet/network/Network.cc @@ -198,7 +198,7 @@ namespace bayesnet { double numStates = static_cast(node.second->getNumStates()); double smoothing_factor = 0.0; switch (smoothing) { - case Smoothing_t::OLD_LAPLACE: + case Smoothing_t::ORIGINAL: smoothing_factor = 1.0 / n_samples; break; case Smoothing_t::LAPLACE: diff --git a/bayesnet/network/Network.h b/bayesnet/network/Network.h index b3417cd..3485e64 100644 --- a/bayesnet/network/Network.h +++ b/bayesnet/network/Network.h @@ -14,7 +14,7 @@ namespace bayesnet { enum class Smoothing_t { NONE = -1, - OLD_LAPLACE = 0, + ORIGINAL = 0, LAPLACE, CESTNIK }; diff --git a/tests/TestUtils.h b/tests/TestUtils.h index b986278..652680b 100644 --- a/tests/TestUtils.h +++ b/tests/TestUtils.h @@ -33,7 +33,7 @@ public: bool discretize; int num_samples = 0; bool shuffle = false; - bayesnet::Smoothing_t smoothing = bayesnet::Smoothing_t::OLD_LAPLACE; + bayesnet::Smoothing_t smoothing = bayesnet::Smoothing_t::ORIGINAL; private: std::string to_string() {