On May 11, 2:32 am, Paul Rubin <http://[EMAIL PROTECTED]> wrote:
> philly_bob <[EMAIL PROTECTED]> writes:
> > algs=['AlgA', 'AlgB', 'AlgC', 'AlgD', 'AlgE']
> > accs=[]
> > for alg in algs:
> >thi
"""
I have a population of five algorithms. Each Alg has a method,
Alg.accuracy(), which calculates its accuracy. Running the accuracy
method on each Alg, I end up with a list of accuracies like [0.75,
0.10, 0.45, 0.80, 0.45]
Now I want to store the algorithms and associated accuracies in a
file,
"""
I have a population of five algorithms. Each Alg has a method,
Alg.accuracy(), which calculates its accuracy. Running the accuracy
method on each Alg, I end up with a list of accuracies like [0.75,
0.10, 0.45, 0.80, 0.45]
Now I want to store the algorithms and associated accuracies in a
file,
On Apr 27, 8:05 am, philly_bob <[EMAIL PROTECTED]> wrote:
> In the sample program below, I want to send a random method to a class
> instance.
> In other words, I don't know which method to send until run-time. How
> can I send ch, which is my random choice, to the mycla
In the sample program below, I want to send a random method to a class
instance.
In other words, I don't know which method to send until run-time. How
can I send ch, which is my random choice, to the myclass instance?
Thanks,
Bob=
import random
class myclass(object):
def meth1(self):