Commit 4651fe3b authored by ahmedaj's avatar ahmedaj
Browse files

variable for test

parent f93f8fae
This diff is collapsed.
......@@ -33,7 +33,10 @@ int main(int argc, char *argv[]) {
}
int numTrees = atoi(argv[1]);
float baggingWeight = atoi(argv[2]) * 0.1;
float depth = atoi(argv[2]);
float baggingWeight = 0.7;
float featWeight = 0.7;
//float baggingWeight = atoi(argv[2]) * 0.1;
// double featWeight = numFeatures * 0.1;
// cout << featWeight << "\n";
......@@ -85,7 +88,7 @@ int main(int argc, char *argv[]) {
//cout<<endl;
auto start = high_resolution_clock::now();
RandomForest *randomForest = new RandomForest(trainingData, featureTypes, numTrees, baggingWeight, 0.3, 10);
RandomForest *randomForest = new RandomForest(trainingData, featureTypes, numTrees, baggingWeight, featWeight, depth);
time += (high_resolution_clock::now() - start).count() / 1000000000.0;
......@@ -116,7 +119,7 @@ int main(int argc, char *argv[]) {
outfile.open("avg.txt", ios::app);
outfile<< "------ Report ------ " <<endl;
// outfile<< numTrees<<"\t"<<depth<<"\t"<<featureWeight<<"\t"<<baggingWeight<<"\t"<<accuracy/3<<"\t"<<time/3<<endl;
outfile<< numTrees<<"\t"<<10<<"\t"<<0.3<<"\t"<<baggingWeight<<"\t"<<accuracy/3<<"\t"<<time/3<<endl;
outfile<< numTrees<<"\t"<<depth<<"\t"<<featWeight<<"\t"<<baggingWeight<<"\t"<<accuracy/3<<"\t"<<time/3<<endl;
outfile.close();
......
#!/bin/bash
for i in {10..100..10}
for i in {5..100..5}
do
# ./race $i 10
for j in {3..9}
for j in {5..10}
do
./race $i $j
./race $i $j
./race $i $j
done
done
\ No newline at end of file
------ Training Tree 0 9.3668
------ Training Tree 1 14.3481
------ Training Tree 2 17.1449
------ Training Tree 3 20.7407
------ Training Tree 4 13.9803
------ Training Tree 5 22.5296
------ Training Tree 6 12.4478
------ Training Tree 7 14.3854
------ Training Tree 8 12.755
------ Training Tree 0 13.312
------ Training Tree 1 21.0346
------ Training Tree 2 12.4311
------ Training Tree 3 13.3938
------ Training Tree 4 15.989
------ Training Tree 5 12.2643
------ Training Tree 6 13.7582
------ Training Tree 7 25.3398
------ Training Tree 8 11.4856
------ Training Tree 9 12.4409
------ Training Tree 0 18.1893
------ Training Tree 0 2.8035
------ Training Tree 1 3.50854
------ Training Tree 0 8.82535
------ Training Tree 1 12.6669
------ Training Tree 2 16.4287
------ Training Tree 3 8.33822
------ Training Tree 4 12.1255
------ Training Tree 5 14.3656
------ Training Tree 6 14.3623
------ Training Tree 7 11.744
------ Training Tree 8 8.30169
------ Training Tree 9 17.8691
------ Training Tree 0 14.9384
------ Training Tree 1 13.8911
------ Training Tree 2 15.6833
------ Training Tree 3 12.2209
------ Training Tree 4 12.3242
------ Training Tree 5 13.5826
------ Training Tree 6 7.63938
------ Training Tree 7 9.56681
------ Training Tree 8 16.7578
------ Training Tree 9 13.3941
------ Training Tree 0 17.3212
------ Training Tree 1 14.8815
------ Training Tree 2 14.4884
------ Training Tree 3 10.9416
------ Training Tree 4 16.6424
------ Training Tree 5 19.9735
------ Training Tree 6 12.3658
------ Training Tree 7 18.7448
------ Training Tree 8 13.0621
------ Training Tree 9 6.87777
Supports Markdown
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