Need a way to distinguish the final factor and parameters runs

Posted By: GPEngine

Need a way to distinguish the final factor and parameters runs - 05/28/15 06:19

I kill my Training if the Cycles are too slow, measured via timer() from INITRUN to EXITRUN.

There is a final cycle or two at the end of the Training phase. These cycles are special. They take a long time compared to the individual Training Cycles. Anyway, I'm willing to wait for them. Most of the costs of Training have already been spent by then.

I don't see how to distinguish them. TRAINMODE is true in both cases. At first I thought it was just the FACTORS run. But apparently there is another run after that, where parameter choices are being resolved. In that run, FACTORS is not set. How can I identify it? Through guess-and-check, I find it is possibly identified by

(is(TRAINMODE) and not is(FACTORS) and not is(RULES))

Yikes.
Posted By: jcl

Re: Need a way to distinguish the final factor and parameters runs - 05/28/15 09:12

Training is done by a simple state machine, with the state stored in g->nState. It should be always in one of those states:

#define RULES (1<<12) // generate rules only
#define FACTORS (1<<13) // generate factors only
#define PARAMETERS (1<<14) // generate parameters only
#define PARRULES (1<<15) // generate rules with parameters, first rule run
#define PARFINAL (1<<16) // generate rules with parameters, parameter selection
#define RULFINAL (1<<17) // generate rules with parameters, final rule run
#define RULEXT (1<<18) // External training with no parameters or rules
#define FACTORS1 (1<<19) // first FACTORS run
#define FACTORS2 (1<<20) // second FACTORS run

Posted By: GPEngine

Re: Need a way to distinguish the final factor and parameters runs - 05/28/15 14:31

Thanks. I can work with that. laugh
© 2024 lite-C Forums