Table of Contents

Class: DifferentialSchemaFitness Bio/NeuralNetwork/Gene/Schema.py

Calculate fitness for schemas that differentiate between sequences.

Methods   
__init__
calculate_fitness
  __init__ 
__init__ (
        self,
        positive_seqs,
        negative_seqs,
        schema_evaluator,
        )

Initialize with different sequences to evaluate

Arguments:

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

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

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

  calculate_fitness 
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.


Table of Contents

This document was automatically generated on Mon Jul 1 12:03:11 2002 by HappyDoc version 2.0.1