Commit a9c66a6e authored by sgebreeg's avatar sgebreeg
Browse files

Merge remote-tracking branch 'origin/faster-continuous-data-split' into...

Merge remote-tracking branch 'origin/faster-continuous-data-split' into faster-continuous-data-split

# Conflicts:
#	src/helpers.cpp
parents 672515c8 9e235da4
......@@ -34,6 +34,10 @@ Node *train(vector <vector<string>> &data, vector <FeatureType> &featureType,
informationGainFromParent = 0.0;
} else {
informationGainFromParent = parentEntropy - originalEntropy;
// if(informationGainFromParent < 0){
// cout << "PARENT ENTROPY: "<<parentEntropy<<endl;
// cout << "ORIGINAL ENTROPY: "<<originalEntropy<<endl;
// }
}
if (currentDepth > maxDepth || originalEntropy == 0.0) {
......
......@@ -35,7 +35,7 @@ int main(int argc, char *argv[]) {
int numTrees = atoi(argv[1]);
float baggingWeight = 0.7;
int depth = atoi(argv[2]);
float featureWeight = 0.3;
float featureWeight = 0.7;
// double featWeight = numFeatures * 0.1;
// cout << featWeight << "\n";
......@@ -44,9 +44,9 @@ int main(int argc, char *argv[]) {
vector <vector<string>> datasetAsString;
vector <FeatureType> featureTypes;
vector <string> features;
datasetAsString = parseDataToString("../datasets/adult.data");
featureTypes = parseFeatureTypes("../datasets/adult.featureTypes");
features = parseFeatures("../datasets/adult.features");
datasetAsString = parseDataToString("../datasets/loan.data");
featureTypes = parseFeatureTypes("../datasets/loan.featureTypes");
features = parseFeatures("../datasets/loan.features");
double accuracy = 0.0;
......
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