Print

Print


Hi Sean,
I have to say that I am surprised that crossover-prob has always only referred to uniform crossover per site probability. The parameter is in Tutorial1 for a reason, I would suppose, and that tutorial problem only uses one point crossover. I understand your point that if mutation-prob refers to per site probability, crossover-prob is consistent if it also refers to per site probability. I suppose that just goes against my expectation that even the simplest tutorial would show how to dial the crossover usage up and down. Anyone coming to ECJ after looking at other GA apps or reading the literature would expect that control to be easy and prominently displayed - I certainly did. Even your response below is in agreement with this.
I'm not at all surprised if I've made mistakes, but my purpose is simple. It is to run Tutorial1 without the warning and with the understanding of which parameters to vary in order to acheive an effect such as "invoke the crossover function on 50% of the new individuals, and the mutate function on 25% of the sites." I'm asking the question because it is not obvious from the code or documentation, and I hope it is clear that I've made a good faith effort to educate myself before asking the question.
I'm unclear how the likelihood parameter cannot be crossover specific, given the text of the warning message. If I build a breeding pipeline that has crossover, mutation and inversion operators, what does likelihood control and what doesn't it control?
On the subject of naming, if the parameter controls the probability of a function being invoked in a pipeline, I'd prefer something longer, such as breed-function-invocation-prob to likelihood. To me it is a question of coming back to a file after some time and trying to understand what it is meant to do, or like reading someone else's code. Terseness isn't a virtue, pace Strunk and White.
Cheers,David vun Kannon

> Date: Mon, 15 Jul 2013 06:03:55 -0400
> From: [log in to unmask]
> Subject: Re: Basic changes in parameter naming/function?
> To: [log in to unmask]
> 
> On Jul 15, 2013, at 5:09 AM, David vun Kannon wrote:
> 
> > Looking again at ECJ after some time away from it, I downloaded ECJ 21 and tried out Tutorial 1. I was surprised to see this warning:
> > 
> > The 'crossover-prob' parameter may only be used with any-point crossover.  It states the probability that a particular gene will be crossed over.  If you were looking for the probability of crossover happening at *all*, look at the 'likelihood' parameter.
> > PARAMETER: pop.subpop.0.species.crossover-prob
> >      ALSO: vector.species.crossover-prob
> 
> Shoot.  Looks like I missed the tutorial.
> 
> 
> > Crossover-prob has (probably) meant the same thing since the beginning of ECJ - the probability of calling the crossover function in a breeding pipeline.
> 
> I do not believe that the vector crossover function has ever had a probability of occurrence.  This is because normally such a thing would be done using MultiBreedingPipeline.  crossover-prob has *always* (well, at least since v.10, which is the earliest I checked) referred to uniform crossover.  The naming is consistent with mutation-prob.
> 
> 
> > 20 versions later, the meaning of the parameter is changed to 'uniform crossover per site probability'. To take the place of the original meaning, a new parameter is created, 'likelihood'.
> 
> Actually what I believe was done (by me last year) was to *add* the ability to do crossover probability, since it was so common a need and MultiBreedingPipeline is unweildy.
> 
> > (As an aside, the code for uniform crossover is problematic in that it is called "any point" crossover, even though the documentation shows that the author knows that uniform crossover is the more widely used term.)
> 
> Yep.  And the constants and parameters are called "any".  This was an early stupidity that should be cleaned up.
> 
> > Likelihood is a broad and vague term, and as a parameter name there is nothing to suggest that it relates to all crossover operations, more than the chances of the Mets winning the World Series.
> 
> The problem is that "probability" was already used, and I don't like reverting in ECJ.  I'm having a hard time coming up with another synonym.  Suggestions?
> 
> > There is lots not to like about likelihood. It is defined in BreedingPipeline, which seems the wrong place for something that is crossover specific.
> 
> It's not crossover specific.  
> 
> 
> > The comment in the code
> > 
> > /** Indicates the probability that the Breeding Pipeline will perform its mutative action instead of just doing reproduction. */
> > 
> > is just wrong. And if you take the generated warning (above) at face value and change crossover-prob to likelihood, you won't solve the problem.
> > 
> > pop.subpop.0.species.likelihood	= 7.0
> > 
> > doesn't throw the expected error. Varying likelihood from 1.0 to 0.0 has no effect on results. Obviously, the likelihood variable is being given the default value (1.0) because likelihood is misplaced in the parameter file.
> 
> David, your comments above have some mistakes in them.  Why are you doing pop.subpop.0.species.likelihood?  And actually the comment in the code is *exactly* what likelihood is supposed to be for.  Now it may be that I've not gotten likelihood running in all of the breeding operators in ECJ yet (I have to double-check) but that is indeed its purpose.  And it's the reason why it's in BreedingPipeline: it's general to all operators.
> 
> 
> Sean