@@ -405,14 +405,17 @@ void journalPaperExperiments(vector<SVector<bool>*>& vectors) {
405405 // run TSVQ vs EM-tree convergence
406406 if (false ) {
407407 int depth = 3 , m = 10 ;
408- int iterRange = 40 ; // test RMSE at 1 to maxiters iterations
408+ int iterRange = 100 ; // test RMSE at 1 to maxiters iterations
409+ int seed = 1234 ; // start with same seed each time
409410
410411 // TSVQ
411- if (true ) {
412+ if (false ) {
413+ cout << " TSVQ convergence" << endl;
412414 vector<double > rmse;
413415 vector<int > clusters;
414416 vector<double > seconds;
415417 for (int maxiters = 1 ; maxiters <= iterRange; ++maxiters) {
418+ srand (seed);
416419 boost::timer::auto_cpu_timer all;
417420 TSVQ<vecType, clustererType, distanceType, protoType> tsvq (m, depth, maxiters);
418421 tsvq.cluster (vectors);
@@ -430,6 +433,7 @@ void journalPaperExperiments(vector<SVector<bool>*>& vectors) {
430433
431434 // EM-tree
432435 if (true ) {
436+ cout << " EM-tree convergence" << endl;
433437 vector<double > rmse;
434438 vector<int > clusters;
435439 vector<double > seconds;
@@ -438,6 +442,7 @@ void journalPaperExperiments(vector<SVector<bool>*>& vectors) {
438442 for (int i = 0 ; i < depth - 1 ; ++i) {
439443 splits.push_back (m);
440444 }
445+ srand (seed);
441446 boost::timer::auto_cpu_timer all;
442447 EMTree<vecType, clustererType, distanceType, protoType> emt (m);
443448 // seeding does first iteration
@@ -531,7 +536,7 @@ void journalPaperExperiments(vector<SVector<bool>*>& vectors) {
531536 }
532537
533538 // run kmeans exerpiments
534- if (true ) {
539+ if (false ) {
535540 int maxiters = 1000 ;
536541 cout << " k-means maxiters=" << maxiters << endl;
537542 vector<double > rmse;
@@ -557,9 +562,9 @@ void journalPaperExperiments(vector<SVector<bool>*>& vectors) {
557562 }
558563
559564 // run K-tree experiments
560- if (false ) {
565+ if (true ) {
561566 // build tree
562- vector<int > orders = {10000 , 5000 , 2500 , 1000 , 750 , 500 , 400 , 300 , 250 , 200 , 150 , 100 , 75 , 50 , 25 };
567+ vector<int > orders = {100 }; // { 10000, 5000, 2500, 1000, 750, 500, 400, 300, 250, 200, 150, 100, 75, 50, 25};
563568 for (int m : orders) {
564569 const int maxiters = 1000 ;
565570 cout << " -----" << endl;
0 commit comments