Package Bio :: Package NeuralNetwork :: Package Gene :: Module Schema :: Class DifferentialSchemaFitness
[hide private]
[frames] | no frames]

Class DifferentialSchemaFitness

source code

object --+
         |
        DifferentialSchemaFitness

Calculate fitness for schemas that differentiate between sequences.
    

Instance Methods [hide private]
 
__init__(self, positive_seqs, negative_seqs, schema_evaluator)
Initialize with different sequences to evaluate
source code
 
calculate_fitness(self, genome)
Calculate the fitness for a given schema.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, positive_seqs, negative_seqs, schema_evaluator)
(Constructor)

source code 
Initialize with different sequences to evaluate

Arguments:

o positive_seq - A list of SeqRecord objects which are the 'positive'
sequences -- the ones we want to select for.

o negative_seq - A list of SeqRecord objects which are the 'negative'
sequences that we want to avoid selecting.

o schema_evaluator - An Schema class which can be used to
evaluate find motif matches in sequences.

Overrides: object.__init__

calculate_fitness(self, genome)

source code 
Calculate the fitness for a given schema.

Fitness is specified by the number of occurances of the schema in
the positive sequences minus the number of occurances in the
negative examples.

This fitness is then modified by multiplying by the length of the
schema and then dividing by the number of ambiguous characters in
the schema. This helps select for schema which are longer and have
less redundancy.