diurnal.models package

Subpackages

Submodules

diurnal.models.baseline module

Baseline models to ensure the validity of predictions.

This module contains models that predict the secondary structure of RNA molecules without any knowledge of the primary structure. For example, they may predict all nucleotides as unpaired or randomly assign a prediction to each nucleotide. The purpose of this module is to provide baseline results to demonstrate that predictive models offer higher performances than chance.

class diurnal.models.baseline.Majority[source]

Bases: diurnal.models.Basic

Baseline model that predicts a uniform vector whose elements are the most common element in the training data.

class diurnal.models.baseline.Random[source]

Bases: diurnal.models.Basic

Baseline model that makes random predictions.

class diurnal.models.baseline.Uniform(symbol)[source]

Bases: diurnal.models.Basic

Baseline model that predicts a uniform vector.

Module contents

RNA secondary structure prediction model package.

The package contains models designed to predict RNA secondary structures from primary structures. The models of the package inherit the class diurnal.models.Basic, which defines the following interface:

  • train(data) -> None Train a model with primary and secondary structures.

  • predict(primary_structure) -> secondary_structure Predict a secondary structure from a primary structure.

  • test(primary_structures, evaluation) -> list Evaluate the performance of the model.

  • save(directory) -> None Write the model into a directory.

  • load(directory) -> None Read a model from a directory.

Subclasses must implement the following methods:

  • _train(data) -> None (train the model)

  • _predict(primary) -> np.ndarray (make a prediction)

  • _save(directory) -> None (save the model)

  • _load(directory) -> None (load a model from files)

File information: