@@ -405,14 +405,17 @@ void journalPaperExperiments(vector<SVector<bool>*>& vectors) {
405
405
// run TSVQ vs EM-tree convergence
406
406
if (false ) {
407
407
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
409
410
410
411
// TSVQ
411
- if (true ) {
412
+ if (false ) {
413
+ cout << " TSVQ convergence" << endl;
412
414
vector<double > rmse;
413
415
vector<int > clusters;
414
416
vector<double > seconds;
415
417
for (int maxiters = 1 ; maxiters <= iterRange; ++maxiters) {
418
+ srand (seed);
416
419
boost::timer::auto_cpu_timer all;
417
420
TSVQ<vecType, clustererType, distanceType, protoType> tsvq (m, depth, maxiters);
418
421
tsvq.cluster (vectors);
@@ -430,6 +433,7 @@ void journalPaperExperiments(vector<SVector<bool>*>& vectors) {
430
433
431
434
// EM-tree
432
435
if (true ) {
436
+ cout << " EM-tree convergence" << endl;
433
437
vector<double > rmse;
434
438
vector<int > clusters;
435
439
vector<double > seconds;
@@ -438,6 +442,7 @@ void journalPaperExperiments(vector<SVector<bool>*>& vectors) {
438
442
for (int i = 0 ; i < depth - 1 ; ++i) {
439
443
splits.push_back (m);
440
444
}
445
+ srand (seed);
441
446
boost::timer::auto_cpu_timer all;
442
447
EMTree<vecType, clustererType, distanceType, protoType> emt (m);
443
448
// seeding does first iteration
@@ -531,7 +536,7 @@ void journalPaperExperiments(vector<SVector<bool>*>& vectors) {
531
536
}
532
537
533
538
// run kmeans exerpiments
534
- if (true ) {
539
+ if (false ) {
535
540
int maxiters = 1000 ;
536
541
cout << " k-means maxiters=" << maxiters << endl;
537
542
vector<double > rmse;
@@ -557,9 +562,9 @@ void journalPaperExperiments(vector<SVector<bool>*>& vectors) {
557
562
}
558
563
559
564
// run K-tree experiments
560
- if (false ) {
565
+ if (true ) {
561
566
// 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};
563
568
for (int m : orders) {
564
569
const int maxiters = 1000 ;
565
570
cout << " -----" << endl;
0 commit comments