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

Class DifferentialSchemaFitness


Calculate fitness for schemas that differentiate between sequences.
Method Summary
  __init__(self, positive_seqs, negative_seqs, schema_evaluator)
Initialize with different sequences to evaluate
  calculate_fitness(self, genome)
Calculate the fitness for a given schema.

Method Details

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

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.

calculate_fitness(self, genome)

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.

Generated by Epydoc 2.1 on Wed Jan 31 09:57:59 2007 http://epydoc.sf.net