Rename OLD_LAPLACE to ORIGINAL
This commit is contained in:
parent
3eb61905fb
commit
fa26aa80f7
@ -70,7 +70,7 @@ namespace bayesnet {
|
|||||||
states[pFeatures[index]] = xStates;
|
states[pFeatures[index]] = xStates;
|
||||||
}
|
}
|
||||||
const torch::Tensor weights = torch::full({ pDataset.size(1) }, 1.0 / pDataset.size(1), torch::kDouble);
|
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;
|
return states;
|
||||||
}
|
}
|
||||||
|
@ -198,7 +198,7 @@ namespace bayesnet {
|
|||||||
double numStates = static_cast<double>(node.second->getNumStates());
|
double numStates = static_cast<double>(node.second->getNumStates());
|
||||||
double smoothing_factor = 0.0;
|
double smoothing_factor = 0.0;
|
||||||
switch (smoothing) {
|
switch (smoothing) {
|
||||||
case Smoothing_t::OLD_LAPLACE:
|
case Smoothing_t::ORIGINAL:
|
||||||
smoothing_factor = 1.0 / n_samples;
|
smoothing_factor = 1.0 / n_samples;
|
||||||
break;
|
break;
|
||||||
case Smoothing_t::LAPLACE:
|
case Smoothing_t::LAPLACE:
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
namespace bayesnet {
|
namespace bayesnet {
|
||||||
enum class Smoothing_t {
|
enum class Smoothing_t {
|
||||||
NONE = -1,
|
NONE = -1,
|
||||||
OLD_LAPLACE = 0,
|
ORIGINAL = 0,
|
||||||
LAPLACE,
|
LAPLACE,
|
||||||
CESTNIK
|
CESTNIK
|
||||||
};
|
};
|
||||||
|
@ -33,7 +33,7 @@ public:
|
|||||||
bool discretize;
|
bool discretize;
|
||||||
int num_samples = 0;
|
int num_samples = 0;
|
||||||
bool shuffle = false;
|
bool shuffle = false;
|
||||||
bayesnet::Smoothing_t smoothing = bayesnet::Smoothing_t::OLD_LAPLACE;
|
bayesnet::Smoothing_t smoothing = bayesnet::Smoothing_t::ORIGINAL;
|
||||||
private:
|
private:
|
||||||
std::string to_string()
|
std::string to_string()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user