Rename OLD_LAPLACE to ORIGINAL

This commit is contained in:
Ricardo Montañana Gómez 2024-06-13 15:04:15 +02:00
parent 3eb61905fb
commit fa26aa80f7
Signed by: rmontanana
GPG Key ID: 46064262FD9A7ADE
4 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -198,7 +198,7 @@ namespace bayesnet {
double numStates = static_cast<double>(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:

View File

@ -14,7 +14,7 @@
namespace bayesnet {
enum class Smoothing_t {
NONE = -1,
OLD_LAPLACE = 0,
ORIGINAL = 0,
LAPLACE,
CESTNIK
};

View File

@ -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()
{