Commit ef1706f0 authored by sgebreeg's avatar sgebreeg
Browse files

added unique values fro categorical entries

parent cf528184
......@@ -46,7 +46,7 @@ RandomForest::RandomForest(vector <vector<string>> &data, vector<int> &trainingI
this->featureWeight = featureWeight;
this->depth = maxDepth;
unsigned num_cpus = std::thread::hardware_concurrency();
unsigned num_cpus = std::thread::hardware_concurrency()/2;
// unsigned num_cpus = 12;
if (numTrees < num_cpus)
num_cpus = numTrees;
......
......@@ -404,8 +404,8 @@ BestSplitPoint findBestSplit(double parentEntropy, int currentDepth, vector <vec
nodeDatasetIndices);
double splitEntropy = (double) calculateSplitEntropy(featSplitData, data);
if (splitEntropy < minEntropy) {
cout << "CATEGORICAL Best split at " << featureIndex << " value " << (*splitItr) << " Entropy "
<< splitEntropy << endl;
// cout << "CATEGORICAL Best split at " << featureIndex << " value " << (*splitItr) << " Entropy "
// << splitEntropy << endl;
minEntropy = splitEntropy;
bestFeatureIndex = featureIndex;
bestSplitValue = (*splitItr);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment