Complete implementation with tests

This commit is contained in:
2025-07-08 11:42:20 +02:00
parent 2c7352ac38
commit ed380b1494
13 changed files with 255 additions and 170 deletions

View File

@@ -34,12 +34,8 @@ namespace bayesnet {
{
features = features_;
className = className_;
// Fills std::vectors Xv & yv with the data from tensors X_ (discretized) & y
states = fit_local_discretization(y);
// We have discretized the input data
// 1st we need to fit the model to build the normal SPODE structure, SPODE::fit initializes the base Bayesian network
states = iterativeLocalDiscretization(y, static_cast<SPODE*>(this), dataset, features, className, states_, smoothing);
SPODE::fit(dataset, features, className, states, smoothing);
states = localDiscretizationProposal(states, model);
return *this;
}
torch::Tensor SPODELd::predict(torch::Tensor& X)