@startuml title clang-uml class diagram model class "bayesnet::Node" as C_0010428199432536647474 class C_0010428199432536647474 #aliceblue;line:blue;line.dotted;text:blue { +Node(const std::string &) : void .. +addChild(Node *) : void +addParent(Node *) : void +clear() : void +computeCPT(const torch::Tensor & dataset, const std::vector & features, const double smoothing, const torch::Tensor & weights) : void +getCPT() : torch::Tensor & +getChildren() : std::vector & +getFactorValue(std::map &) : double +getName() const : std::string +getNumStates() const : int +getParents() : std::vector & +graph(const std::string & clasName) : std::vector +minFill() : unsigned int +removeChild(Node *) : void +removeParent(Node *) : void +setNumStates(int) : void __ } enum "bayesnet::Smoothing_t" as C_0013393078277439680282 enum C_0013393078277439680282 { NONE ORIGINAL LAPLACE CESTNIK } class "bayesnet::Network" as C_0009493661199123436603 class C_0009493661199123436603 #aliceblue;line:blue;line.dotted;text:blue { +Network() : void +Network(const Network &) : void +~Network() = default : void .. +addEdge(const std::string &, const std::string &) : void +addNode(const std::string &) : void +dump_cpt() const : std::string +fit(const torch::Tensor & samples, const torch::Tensor & weights, const std::vector & featureNames, const std::string & className, const std::map> & states, const Smoothing_t smoothing) : void +fit(const torch::Tensor & X, const torch::Tensor & y, const torch::Tensor & weights, const std::vector & featureNames, const std::string & className, const std::map> & states, const Smoothing_t smoothing) : void +fit(const std::vector> & input_data, const std::vector & labels, const std::vector & weights, const std::vector & featureNames, const std::string & className, const std::map> & states, const Smoothing_t smoothing) : void +getClassName() const : std::string +getClassNumStates() const : int +getEdges() const : std::vector> +getFeatures() const : std::vector +getNodes() : std::map> & +getNumEdges() const : int +getSamples() : torch::Tensor & +getStates() const : int +graph(const std::string & title) const : std::vector +initialize() : void +predict(const std::vector> &) : std::vector +predict(const torch::Tensor &) : torch::Tensor +predict_proba(const std::vector> &) : std::vector> +predict_proba(const torch::Tensor &) : torch::Tensor +predict_tensor(const torch::Tensor & samples, const bool proba) : torch::Tensor +score(const std::vector> &, const std::vector &) : double +show() const : std::vector +topological_sort() : std::vector +version() : std::string __ } enum "bayesnet::status_t" as C_0005907365846270811004 enum C_0005907365846270811004 { NORMAL WARNING ERROR } abstract "bayesnet::BaseClassifier" as C_0002617087915615796317 abstract C_0002617087915615796317 #aliceblue;line:blue;line.dotted;text:blue { +~BaseClassifier() = default : void .. {abstract} +dump_cpt() const = 0 : std::string {abstract} +fit(torch::Tensor & X, torch::Tensor & y, const std::vector & features, const std::string & className, std::map> & states, const Smoothing_t smoothing) = 0 : BaseClassifier & {abstract} +fit(torch::Tensor & dataset, const std::vector & features, const std::string & className, std::map> & states, const Smoothing_t smoothing) = 0 : BaseClassifier & {abstract} +fit(torch::Tensor & dataset, const std::vector & features, const std::string & className, std::map> & states, const torch::Tensor & weights, const Smoothing_t smoothing) = 0 : BaseClassifier & {abstract} +fit(std::vector> & X, std::vector & y, const std::vector & features, const std::string & className, std::map> & states, const Smoothing_t smoothing) = 0 : BaseClassifier & {abstract} +getClassNumStates() const = 0 : int {abstract} +getNotes() const = 0 : std::vector {abstract} +getNumberOfEdges() const = 0 : int {abstract} +getNumberOfNodes() const = 0 : int {abstract} +getNumberOfStates() const = 0 : int {abstract} +getStatus() const = 0 : status_t +getValidHyperparameters() : std::vector & {abstract} +getVersion() = 0 : std::string {abstract} +graph(const std::string & title = "") const = 0 : std::vector {abstract} +predict(std::vector> & X) = 0 : std::vector {abstract} +predict(torch::Tensor & X) = 0 : torch::Tensor {abstract} +predict_proba(std::vector> & X) = 0 : std::vector> {abstract} +predict_proba(torch::Tensor & X) = 0 : torch::Tensor {abstract} +score(std::vector> & X, std::vector & y) = 0 : float {abstract} +score(torch::Tensor & X, torch::Tensor & y) = 0 : float {abstract} +setHyperparameters(const nlohmann::json & hyperparameters) = 0 : void {abstract} +show() const = 0 : std::vector {abstract} +topological_order() = 0 : std::vector {abstract} #trainModel(const torch::Tensor & weights, const Smoothing_t smoothing) = 0 : void __ #validHyperparameters : std::vector } class "bayesnet::Metrics" as C_0005895723015084986588 class C_0005895723015084986588 #aliceblue;line:blue;line.dotted;text:blue { +Metrics() = default : void +Metrics(const torch::Tensor & samples, const std::vector & features, const std::string & className, const int classNumStates) : void +Metrics(const std::vector> & vsamples, const std::vector & labels, const std::vector & features, const std::string & className, const int classNumStates) : void .. +SelectKBestWeighted(const torch::Tensor & weights, bool ascending = false, unsigned int k = 0) : std::vector +SelectKPairs(const torch::Tensor & weights, std::vector & featuresExcluded, bool ascending = false, unsigned int k = 0) : std::vector> +conditionalEdge(const torch::Tensor & weights) : torch::Tensor +conditionalEntropy(const torch::Tensor & firstFeature, const torch::Tensor & secondFeature, const torch::Tensor & labels, const torch::Tensor & weights) : double +conditionalMutualInformation(const torch::Tensor & firstFeature, const torch::Tensor & secondFeature, const torch::Tensor & labels, const torch::Tensor & weights) : double #doCombinations(const std::vector & source) : std::vector > +entropy(const torch::Tensor & feature, const torch::Tensor & weights) : double +getScoresKBest() const : std::vector +getScoresKPairs() const : std::vector,double>> +maximumSpanningTree(const std::vector & features, const torch::Tensor & weights, const int root) : std::vector> +mutualInformation(const torch::Tensor & firstFeature, const torch::Tensor & secondFeature, const torch::Tensor & weights) : double #pop_first(std::vector & v) : T __ #className : std::string #features : std::vector #samples : torch::Tensor } abstract "bayesnet::Classifier" as C_0016351972983202413152 abstract C_0016351972983202413152 #aliceblue;line:blue;line.dotted;text:blue { +Classifier(Network model) : void +~Classifier() = default : void .. +addNodes() : void #buildDataset(torch::Tensor & y) : void {abstract} #buildModel(const torch::Tensor & weights) = 0 : void #checkFitParameters() : void +dump_cpt() const : std::string +fit(torch::Tensor & X, torch::Tensor & y, const std::vector & features, const std::string & className, std::map> & states, const Smoothing_t smoothing) : Classifier & +fit(std::vector> & X, std::vector & y, const std::vector & features, const std::string & className, std::map> & states, const Smoothing_t smoothing) : Classifier & +fit(torch::Tensor & dataset, const std::vector & features, const std::string & className, std::map> & states, const Smoothing_t smoothing) : Classifier & +fit(torch::Tensor & dataset, const std::vector & features, const std::string & className, std::map> & states, const torch::Tensor & weights, const Smoothing_t smoothing) : Classifier & +getClassNumStates() const : int +getNotes() const : std::vector +getNumberOfEdges() const : int +getNumberOfNodes() const : int +getNumberOfStates() const : int +getStatus() const : status_t +getVersion() : std::string +predict(std::vector> & X) : std::vector +predict(torch::Tensor & X) : torch::Tensor +predict_proba(std::vector> & X) : std::vector> +predict_proba(torch::Tensor & X) : torch::Tensor +score(torch::Tensor & X, torch::Tensor & y) : float +score(std::vector> & X, std::vector & y) : float +setHyperparameters(const nlohmann::json & hyperparameters) : void +show() const : std::vector +topological_order() : std::vector #trainModel(const torch::Tensor & weights, const Smoothing_t smoothing) : void __ #className : std::string #dataset : torch::Tensor #features : std::vector #fitted : bool #m : unsigned int #metrics : Metrics #model : Network #n : unsigned int #notes : std::vector #states : std::map> #status : status_t } class "bayesnet::KDB" as C_0008902920152122000044 class C_0008902920152122000044 #aliceblue;line:blue;line.dotted;text:blue { +KDB(int k, float theta = 0.03) : void +~KDB() = default : void .. #buildModel(const torch::Tensor & weights) : void +graph(const std::string & name = "KDB") const : std::vector +setHyperparameters(const nlohmann::json & hyperparameters_) : void __ } class "bayesnet::SPODE" as C_0004096182510460307610 class C_0004096182510460307610 #aliceblue;line:blue;line.dotted;text:blue { +SPODE(int root) : void +~SPODE() = default : void .. #buildModel(const torch::Tensor & weights) : void +graph(const std::string & name = "SPODE") const : std::vector __ } class "bayesnet::SPnDE" as C_0016268916386101512883 class C_0016268916386101512883 #aliceblue;line:blue;line.dotted;text:blue { +SPnDE(std::vector parents) : void +~SPnDE() = default : void .. #buildModel(const torch::Tensor & weights) : void +graph(const std::string & name = "SPnDE") const : std::vector __ } class "bayesnet::TAN" as C_0014087955399074584137 class C_0014087955399074584137 #aliceblue;line:blue;line.dotted;text:blue { +TAN() : void +~TAN() = default : void .. #buildModel(const torch::Tensor & weights) : void +graph(const std::string & name = "TAN") const : std::vector __ } class "bayesnet::Proposal" as C_0017759964713298103839 class C_0017759964713298103839 #aliceblue;line:blue;line.dotted;text:blue { +Proposal(torch::Tensor & pDataset, std::vector & features_, std::string & className_) : void +~Proposal() : void .. #checkInput(const torch::Tensor & X, const torch::Tensor & y) : void #fit_local_discretization(const torch::Tensor & y) : std::map> #localDiscretizationProposal(const std::map> & states, Network & model) : std::map> #prepareX(torch::Tensor & X) : torch::Tensor __ #Xf : torch::Tensor #discretizers : map #y : torch::Tensor } class "bayesnet::KDBLd" as C_0002756018222998454702 class C_0002756018222998454702 #aliceblue;line:blue;line.dotted;text:blue { +KDBLd(int k) : void +~KDBLd() = default : void .. +fit(torch::Tensor & X, torch::Tensor & y, const std::vector & features, const std::string & className, std::map> & states, const Smoothing_t smoothing) : KDBLd & +graph(const std::string & name = "KDB") const : std::vector +predict(torch::Tensor & X) : torch::Tensor {static} +version() : std::string __ } class "bayesnet::SPODELd" as C_0010957245114062042836 class C_0010957245114062042836 #aliceblue;line:blue;line.dotted;text:blue { +SPODELd(int root) : void +~SPODELd() = default : void .. +commonFit(const std::vector & features, const std::string & className, std::map> & states, const Smoothing_t smoothing) : SPODELd & +fit(torch::Tensor & X, torch::Tensor & y, const std::vector & features, const std::string & className, std::map> & states, const Smoothing_t smoothing) : SPODELd & +fit(torch::Tensor & dataset, const std::vector & features, const std::string & className, std::map> & states, const Smoothing_t smoothing) : SPODELd & +graph(const std::string & name = "SPODELd") const : std::vector +predict(torch::Tensor & X) : torch::Tensor {static} +version() : std::string __ } class "bayesnet::TANLd" as C_0013350632773616302678 class C_0013350632773616302678 #aliceblue;line:blue;line.dotted;text:blue { +TANLd() : void +~TANLd() = default : void .. +fit(torch::Tensor & X, torch::Tensor & y, const std::vector & features, const std::string & className, std::map> & states, const Smoothing_t smoothing) : TANLd & +graph(const std::string & name = "TANLd") const : std::vector +predict(torch::Tensor & X) : torch::Tensor __ } class "bayesnet::Ensemble" as C_0015881931090842884611 class C_0015881931090842884611 #aliceblue;line:blue;line.dotted;text:blue { +Ensemble(bool predict_voting = true) : void +~Ensemble() = default : void .. #compute_arg_max(std::vector> & X) : std::vector #compute_arg_max(torch::Tensor & X) : torch::Tensor +dump_cpt() const : std::string +getNumberOfEdges() const : int +getNumberOfNodes() const : int +getNumberOfStates() const : int +graph(const std::string & title) const : std::vector +predict(std::vector> & X) : std::vector +predict(torch::Tensor & X) : torch::Tensor #predict_average_proba(torch::Tensor & X) : torch::Tensor #predict_average_proba(std::vector> & X) : std::vector> #predict_average_voting(torch::Tensor & X) : torch::Tensor #predict_average_voting(std::vector> & X) : std::vector> +predict_proba(std::vector> & X) : std::vector> +predict_proba(torch::Tensor & X) : torch::Tensor +score(std::vector> & X, std::vector & y) : float +score(torch::Tensor & X, torch::Tensor & y) : float +show() const : std::vector +topological_order() : std::vector #trainModel(const torch::Tensor & weights, const Smoothing_t smoothing) : void #voting(torch::Tensor & votes) : torch::Tensor __ #models : std::vector> #n_models : unsigned int #predict_voting : bool #significanceModels : std::vector } class "bayesnet::A2DE" as C_0001410789567057647859 class C_0001410789567057647859 #aliceblue;line:blue;line.dotted;text:blue { +A2DE(bool predict_voting = false) : void +~A2DE() : void .. #buildModel(const torch::Tensor & weights) : void +graph(const std::string & title = "A2DE") const : std::vector +setHyperparameters(const nlohmann::json & hyperparameters) : void __ } class "bayesnet::AODE" as C_0006288892608974306258 class C_0006288892608974306258 #aliceblue;line:blue;line.dotted;text:blue { +AODE(bool predict_voting = false) : void +~AODE() : void .. #buildModel(const torch::Tensor & weights) : void +graph(const std::string & title = "AODE") const : std::vector +setHyperparameters(const nlohmann::json & hyperparameters) : void __ } abstract "bayesnet::FeatureSelect" as C_0013562609546004646591 abstract C_0013562609546004646591 #aliceblue;line:blue;line.dotted;text:blue { +FeatureSelect(const torch::Tensor & samples, const std::vector & features, const std::string & className, const int maxFeatures, const int classNumStates, const torch::Tensor & weights) : void +~FeatureSelect() : void .. #computeMeritCFS() : double #computeSuFeatures(const int a, const int b) : double #computeSuLabels() : void {abstract} +fit() = 0 : void +getFeatures() const : std::vector +getScores() const : std::vector #initialize() : void #symmetricalUncertainty(int a, int b) : double __ #fitted : bool #maxFeatures : int #selectedFeatures : std::vector #selectedScores : std::vector #suFeatures : std::map,double> #suLabels : std::vector #weights : const torch::Tensor & } class "bayesnet::(anonymous_60342586)" as C_0005584545181746538542 class C_0005584545181746538542 #aliceblue;line:blue;line.dotted;text:blue { __ +CFS : std::string +FCBF : std::string +IWSS : std::string } class "bayesnet::(anonymous_60343240)" as C_0016227156982041949444 class C_0016227156982041949444 #aliceblue;line:blue;line.dotted;text:blue { __ +ASC : std::string +DESC : std::string +RAND : std::string } class "bayesnet::Boost" as C_0009819322948617116148 class C_0009819322948617116148 #aliceblue;line:blue;line.dotted;text:blue { +Boost(bool predict_voting = false) : void +~Boost() = default : void .. #buildModel(const torch::Tensor & weights) : void #featureSelection(torch::Tensor & weights_) : std::vector +setHyperparameters(const nlohmann::json & hyperparameters_) : void #update_weights(torch::Tensor & ytrain, torch::Tensor & ypred, torch::Tensor & weights) : std::tuple #update_weights_block(int k, torch::Tensor & ytrain, torch::Tensor & weights) : std::tuple __ #X_test : torch::Tensor #X_train : torch::Tensor #bisection : bool #block_update : bool #convergence : bool #convergence_best : bool #featureSelector : FeatureSelect * #maxTolerance : int #order_algorithm : std::string #selectFeatures : bool #select_features_algorithm : std::string #threshold : double #y_test : torch::Tensor #y_train : torch::Tensor } class "bayesnet::AODELd" as C_0003898187834670349177 class C_0003898187834670349177 #aliceblue;line:blue;line.dotted;text:blue { +AODELd(bool predict_voting = true) : void +~AODELd() = default : void .. #buildModel(const torch::Tensor & weights) : void +fit(torch::Tensor & X_, torch::Tensor & y_, const std::vector & features_, const std::string & className_, std::map> & states_, const Smoothing_t smoothing) : AODELd & +graph(const std::string & name = "AODELd") const : std::vector #trainModel(const torch::Tensor & weights, const Smoothing_t smoothing) : void __ } class "bayesnet::(anonymous_60275628)" as C_0009086919615463763584 class C_0009086919615463763584 #aliceblue;line:blue;line.dotted;text:blue { __ +CFS : std::string +FCBF : std::string +IWSS : std::string } class "bayesnet::(anonymous_60276282)" as C_0015251985607563196159 class C_0015251985607563196159 #aliceblue;line:blue;line.dotted;text:blue { __ +ASC : std::string +DESC : std::string +RAND : std::string } class "bayesnet::BoostA2DE" as C_0000272055465257861326 class C_0000272055465257861326 #aliceblue;line:blue;line.dotted;text:blue { +BoostA2DE(bool predict_voting = false) : void +~BoostA2DE() = default : void .. +graph(const std::string & title = "BoostA2DE") const : std::vector #trainModel(const torch::Tensor & weights, const Smoothing_t smoothing) : void __ } class "bayesnet::(anonymous_60275502)" as C_0016033655851510053155 class C_0016033655851510053155 #aliceblue;line:blue;line.dotted;text:blue { __ +CFS : std::string +FCBF : std::string +IWSS : std::string } class "bayesnet::(anonymous_60276156)" as C_0000379522761622473555 class C_0000379522761622473555 #aliceblue;line:blue;line.dotted;text:blue { __ +ASC : std::string +DESC : std::string +RAND : std::string } class "bayesnet::BoostAODE" as C_0002867772739198819061 class C_0002867772739198819061 #aliceblue;line:blue;line.dotted;text:blue { +BoostAODE(bool predict_voting = false) : void +~BoostAODE() = default : void .. +graph(const std::string & title = "BoostAODE") const : std::vector #trainModel(const torch::Tensor & weights, const Smoothing_t smoothing) : void __ } class "bayesnet::CFS" as C_0000093018845530739957 class C_0000093018845530739957 #aliceblue;line:blue;line.dotted;text:blue { +CFS(const torch::Tensor & samples, const std::vector & features, const std::string & className, const int maxFeatures, const int classNumStates, const torch::Tensor & weights) : void +~CFS() : void .. +fit() : void __ } class "bayesnet::FCBF" as C_0001157456122733975432 class C_0001157456122733975432 #aliceblue;line:blue;line.dotted;text:blue { +FCBF(const torch::Tensor & samples, const std::vector & features, const std::string & className, const int maxFeatures, const int classNumStates, const torch::Tensor & weights, const double threshold) : void +~FCBF() : void .. +fit() : void __ } class "bayesnet::IWSS" as C_0000066148117395428429 class C_0000066148117395428429 #aliceblue;line:blue;line.dotted;text:blue { +IWSS(const torch::Tensor & samples, const std::vector & features, const std::string & className, const int maxFeatures, const int classNumStates, const torch::Tensor & weights, const double threshold) : void +~IWSS() : void .. +fit() : void __ } class "bayesnet::(anonymous_60730495)" as C_0004857727320042830573 class C_0004857727320042830573 #aliceblue;line:blue;line.dotted;text:blue { __ +CFS : std::string +FCBF : std::string +IWSS : std::string } class "bayesnet::(anonymous_60731150)" as C_0000076541533312623385 class C_0000076541533312623385 #aliceblue;line:blue;line.dotted;text:blue { __ +ASC : std::string +DESC : std::string +RAND : std::string } class "bayesnet::(anonymous_60653004)" as C_0001444063444142949758 class C_0001444063444142949758 #aliceblue;line:blue;line.dotted;text:blue { __ +CFS : std::string +FCBF : std::string +IWSS : std::string } class "bayesnet::(anonymous_60653658)" as C_0007139277546931322856 class C_0007139277546931322856 #aliceblue;line:blue;line.dotted;text:blue { __ +ASC : std::string +DESC : std::string +RAND : std::string } class "bayesnet::(anonymous_60731375)" as C_0010493853592456211189 class C_0010493853592456211189 #aliceblue;line:blue;line.dotted;text:blue { __ +CFS : std::string +FCBF : std::string +IWSS : std::string } class "bayesnet::(anonymous_60732030)" as C_0007011438637915849564 class C_0007011438637915849564 #aliceblue;line:blue;line.dotted;text:blue { __ +ASC : std::string +DESC : std::string +RAND : std::string } class "bayesnet::MST" as C_0001054867409378333602 class C_0001054867409378333602 #aliceblue;line:blue;line.dotted;text:blue { +MST() = default : void +MST(const std::vector & features, const torch::Tensor & weights, const int root) : void .. +insertElement(std::list & variables, int variable) : void +maximumSpanningTree() : std::vector> +reorder(std::vector>> T, int root_original) : std::vector> __ } class "bayesnet::Graph" as C_0009576333456015187741 class C_0009576333456015187741 #aliceblue;line:blue;line.dotted;text:blue { +Graph(int V) : void .. +addEdge(int u, int v, float wt) : void +find_set(int i) : int +get_mst() : std::vector>> +kruskal_algorithm() : void +union_set(int u, int v) : void __ } C_0010428199432536647474 --> C_0010428199432536647474 : -parents C_0010428199432536647474 --> C_0010428199432536647474 : -children C_0009493661199123436603 ..> C_0013393078277439680282 C_0009493661199123436603 o-- C_0010428199432536647474 : -nodes C_0002617087915615796317 ..> C_0013393078277439680282 C_0002617087915615796317 ..> C_0005907365846270811004 C_0016351972983202413152 ..> C_0013393078277439680282 C_0016351972983202413152 o-- C_0009493661199123436603 : #model C_0016351972983202413152 o-- C_0005895723015084986588 : #metrics C_0016351972983202413152 o-- C_0005907365846270811004 : #status C_0002617087915615796317 <|-- C_0016351972983202413152 C_0016351972983202413152 <|-- C_0008902920152122000044 C_0016351972983202413152 <|-- C_0004096182510460307610 C_0016351972983202413152 <|-- C_0016268916386101512883 C_0016351972983202413152 <|-- C_0014087955399074584137 C_0017759964713298103839 ..> C_0009493661199123436603 C_0002756018222998454702 ..> C_0013393078277439680282 C_0008902920152122000044 <|-- C_0002756018222998454702 C_0017759964713298103839 <|-- C_0002756018222998454702 C_0010957245114062042836 ..> C_0013393078277439680282 C_0004096182510460307610 <|-- C_0010957245114062042836 C_0017759964713298103839 <|-- C_0010957245114062042836 C_0013350632773616302678 ..> C_0013393078277439680282 C_0014087955399074584137 <|-- C_0013350632773616302678 C_0017759964713298103839 <|-- C_0013350632773616302678 C_0015881931090842884611 ..> C_0013393078277439680282 C_0015881931090842884611 o-- C_0016351972983202413152 : #models C_0016351972983202413152 <|-- C_0015881931090842884611 C_0015881931090842884611 <|-- C_0001410789567057647859 C_0015881931090842884611 <|-- C_0006288892608974306258 C_0005895723015084986588 <|-- C_0013562609546004646591 C_0009819322948617116148 --> C_0013562609546004646591 : #featureSelector C_0015881931090842884611 <|-- C_0009819322948617116148 C_0003898187834670349177 ..> C_0013393078277439680282 C_0015881931090842884611 <|-- C_0003898187834670349177 C_0017759964713298103839 <|-- C_0003898187834670349177 C_0000272055465257861326 ..> C_0013393078277439680282 C_0009819322948617116148 <|-- C_0000272055465257861326 C_0002867772739198819061 ..> C_0013393078277439680282 C_0009819322948617116148 <|-- C_0002867772739198819061 C_0013562609546004646591 <|-- C_0000093018845530739957 C_0013562609546004646591 <|-- C_0001157456122733975432 C_0013562609546004646591 <|-- C_0000066148117395428429 'Generated with clang-uml, version 0.5.5 'LLVM version clang version 18.1.8 (Fedora 18.1.8-5.fc41) @enduml