Scripts/Landcombsch.run
From TNT
Landcombsch
Author: Santiago A. Catalano.
Version: 1.0.
For: not provided.
Arguments: not provided.
Example: not provided.
Script
Scripts may not be displaying correctly here at present, use the script from the provided file in the archive.
Landcombsch.run macro=;
sil-con ; quote *
This script allows running tree seaches combining landmark data
with other sources of evidence. Each replicate starts from a Wagner
tree (RAS) and is followed by TBR. Only a single optimal tree is kept in memory.
You should specify one argument:
1st = stength ofthe run: modifies the number of replicates and
precision in landmark optimization
(0: lowest (fast) , 4: highest (slow). Default = 0)
if (argnumber < 1)
sil-con ;quote * Ups... You forgot the arguments!
1st = stength ofthe run: modifies the number of replicates and
precision in landmark optimization
(0: lowest (fast) , 4: highest (slow). Default = 0)
proc/ ; end tsave *all_trees.tre ; ts/ ; var: best_scor curr_scor rounds repls bescor bestre arbol escor level fact
sil=all ;
lm lowmem ;
macreport - ;
report - ;
tsave *all_trees.tre ;
k0 ;
if ( argnumber > 0 )
set level %1 ;
if ('level' == 0)
set repls 1 ;
lm notermpoints; lm cell 5 nest 0 ; lm iter ; end if ('level' == 1) set repls 3 ; lm notermpoints; lm cell 5 nest 1 2 ; lm iter ; end if ('level' == 2) set repls 3 ; lm termpoints; lm cell 5 nest 3 2 ; lm iter ; end if ('level' == 3) set repls 5 ; lm termpoints; lm cell 8 nest 4 2 ; lm iter ; end if ('level' == 4) set repls 5 ; lm termpoints; lm cell 10 nest 8 2 ; lm iter ;
end
else
set repls 1 ; /* change here the number of replicates to do */
end loop 0 ('repls'-1)
rseed 0 ;
ra 1 ;
set best_scor lmscore [ 0 ] ;
set best_scor ('best_scor' + score [0] );
macfloat 4 ;
report - ;
set rounds 1 ;
tbrit 0
progress percswap 100 Replicate #1 of 'repls' Score 'best_scor' ; progress= ; set rounds ++ ; set curr_scor lmscore [ 0 ] + score [0]; if ( 'curr_scor' < 'best_scor' ) set best_scor 'curr_scor' ; resetswap ; end
stop
save ;
end
sil=all ; k0 ;
stop ; ts/ ; p all_trees.tre ;
set bescor 100000 ;
loop=ar 0 ('repls'-1)
set arbol #ar ;
set escor lmscore ['arbol'] ;
set escor ('escor' + score [0]) ;
if ('escor' < 'bescor' )
set bescor 'escor' ;
set bestre 'arbol' ;
end
stop
tsave *best_tree.tre ; tch 'bestre' ; save ; ts/;
lquote= ; lquote [ ;
sil-buff ; quote * Best tree = replicate 'bestre'
Score = 'bescor' Optimal tree kept in memory and sent to best_tree.tre file Best tree of each run sent to all_trees.tre file;
progress/ ; sil=all ; report-;