Rename OLD_LAPLACE to ORIGINAL
This commit is contained in:
parent
3eb61905fb
commit
fa26aa80f7
@ -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;
|
||||
}
|
||||
|
@ -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:
|
||||
|
@ -14,7 +14,7 @@
|
||||
namespace bayesnet {
|
||||
enum class Smoothing_t {
|
||||
NONE = -1,
|
||||
OLD_LAPLACE = 0,
|
||||
ORIGINAL = 0,
|
||||
LAPLACE,
|
||||
CESTNIK
|
||||
};
|
||||
|
@ -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()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user