Add threads to fit

This commit is contained in:
2023-07-06 12:40:47 +02:00
parent b6c21c21e2
commit 0b33c6c04a
3 changed files with 63 additions and 19 deletions

View File

@@ -11,6 +11,7 @@ namespace bayesnet {
map<string, Node*> nodes;
map<string, vector<int>> dataset;
Node* root;
float maxThreads;
int classNumStates;
vector<string> features;
string className;
@@ -21,9 +22,11 @@ namespace bayesnet {
double computeFactor(map<string, int>&);
public:
Network();
Network(int);
Network(float, int);
Network(float);
Network(Network&);
~Network();
float getmaxThreads();
void addNode(string, int);
void addEdge(const string, const string);
map<string, Node*>& getNodes();
@@ -31,7 +34,6 @@ namespace bayesnet {
int getClassNumStates();
string getClassName();
void fit(const vector<vector<int>>&, const vector<int>&, const vector<string>&, const string&);
void estimateParameters();
void setRoot(string);
Node* getRoot();
vector<int> predict(const vector<vector<int>>&);