Complete proposal
This commit is contained in:
@@ -33,12 +33,13 @@ namespace bayesnet {
|
||||
className = className_;
|
||||
Xf = X_;
|
||||
y = y_;
|
||||
// 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 KDB structure, KDB::fit initializes the base Bayesian network
|
||||
|
||||
// Use iterative local discretization instead of the two-phase approach
|
||||
states = iterativeLocalDiscretization(y, this, dataset, features, className, states_, smoothing);
|
||||
|
||||
// Final fit with converged discretization
|
||||
KDB::fit(dataset, features, className, states, smoothing);
|
||||
states = localDiscretizationProposal(states, model);
|
||||
|
||||
return *this;
|
||||
}
|
||||
torch::Tensor KDBLd::predict(torch::Tensor& X)
|
||||
|
Reference in New Issue
Block a user