Logbook#

class pybrops.breed.op.log.Logbook.Logbook[source]#

Bases: object

Abstract class defining interfaces for logging statistics about an entire breeding program.

The purpose of this abstract class is to provide functionality for:
  1. Logging data on an entire breeding program.

Methods

log_evaluate

Record information directly after 'EvaluationOperator.evaluate' is called.

log_initialize

Record information directly after 'InitializationOperator.initialize' is called.

log_mate

Record information directly after 'MatingOperator.mate' is called.

log_pselect

Record information directly after 'ParentSelectionOperator.pselect' is called.

log_sselect

Record information directly after 'SurvivorSelectionOperator.sselect' is called.

reset

Reset Logbook internals.

write

Write Logbook to file

Attributes

data

Logbook data.

rep

Replicate number.

abstract property data: object#

Logbook data.

abstract log_evaluate(genome, geno, pheno, bval, gmod, t_cur, t_max, **kwargs)[source]#

Record information directly after ‘EvaluationOperator.evaluate’ is called.

Parameters:
  • genome (dict) – Dictionary of genomes for the breeding program.

  • geno (dict) – Dictionary of genotypes for the breeding program.

  • pheno (dict) – Dictionary of phenotypes for the breeding program.

  • bval (dict) – Dictionary of breeding values for the breeding program.

  • gmod (dict) – Dictionary of genomic models for the breeding program.

  • t_cur (int) – Current time in the breeding program.

  • t_max (int) – Deadline time for the breeding program.

  • kwargs (dict) – Additional keyword arguments.

Return type:

None

abstract log_initialize(genome, geno, pheno, bval, gmod, t_cur, t_max, **kwargs)[source]#

Record information directly after ‘InitializationOperator.initialize’ is called.

Parameters:
  • genome (dict) – Dictionary of genomes for the breeding program.

  • geno (dict) – Dictionary of genotypes for the breeding program.

  • pheno (dict) – Dictionary of phenotypes for the breeding program.

  • bval (dict) – Dictionary of breeding values for the breeding program.

  • gmod (dict) – Dictionary of genomic models for the breeding program.

  • t_cur (int) – Current time in the breeding program.

  • t_max (int) – Deadline time for the breeding program.

  • kwargs (dict) – Additional keyword arguments.

Return type:

None

abstract log_mate(genome, geno, pheno, bval, gmod, t_cur, t_max, **kwargs)[source]#

Record information directly after ‘MatingOperator.mate’ is called.

Parameters:
  • genome (dict) – Dictionary of genomes for the breeding program.

  • geno (dict) – Dictionary of genotypes for the breeding program.

  • pheno (dict) – Dictionary of phenotypes for the breeding program.

  • bval (dict) – Dictionary of breeding values for the breeding program.

  • gmod (dict) – Dictionary of genomic models for the breeding program.

  • t_cur (int) – Current time in the breeding program.

  • t_max (int) – Deadline time for the breeding program.

  • kwargs (dict) – Additional keyword arguments.

Return type:

None

abstract log_pselect(mcfg, genome, geno, pheno, bval, gmod, t_cur, t_max, **kwargs)[source]#

Record information directly after ‘ParentSelectionOperator.pselect’ is called.

Parameters:
  • mcfg (dict) – Dictionary of mating configurations for the breeding program.

  • genome (dict) – Dictionary of genomes for the breeding program.

  • geno (dict) – Dictionary of genotypes for the breeding program.

  • pheno (dict) – Dictionary of phenotypes for the breeding program.

  • bval (dict) – Dictionary of breeding values for the breeding program.

  • gmod (dict) – Dictionary of genomic models for the breeding program.

  • t_cur (int) – Current time in the breeding program.

  • t_max (int) – Deadline time for the breeding program.

  • kwargs (dict) – Additional keyword arguments.

Return type:

None

abstract log_sselect(genome, geno, pheno, bval, gmod, t_cur, t_max, **kwargs)[source]#

Record information directly after ‘SurvivorSelectionOperator.sselect’ is called.

Parameters:
  • genome (dict) – Dictionary of genomes for the breeding program.

  • geno (dict) – Dictionary of genotypes for the breeding program.

  • pheno (dict) – Dictionary of phenotypes for the breeding program.

  • bval (dict) – Dictionary of breeding values for the breeding program.

  • gmod (dict) – Dictionary of genomic models for the breeding program.

  • t_cur (int) – Current time in the breeding program.

  • t_max (int) – Deadline time for the breeding program.

  • kwargs (dict) – Additional keyword arguments.

Return type:

None

abstract property rep: int#

Replicate number.

abstract reset()[source]#

Reset Logbook internals.

Return type:

None

abstract write(filename)[source]#

Write Logbook to file

Parameters:

filename (str) – File name to which to write file.

Return type:

None