MeanPhenotypicBreedingValue#

class pybrops.breed.prot.bv.MeanPhenotypicBreedingValue.MeanPhenotypicBreedingValue(taxa_col, taxa_grp_col, trait_cols, **kwargs)[source]#

Bases: BreedingValueProtocol

Class implementing estimation of breeding values by taking the mean across all environments.

Constructor for the concrete class Mean MeanPhenotypicBreedingValue.

Calculate breeding values by taking the mean performance.

Parameters:
  • taxa_col (str) – Name of taxa column and/or names along which to group phenotypes along.

  • trait_col (str, Iterable) – Name of trait column(s) along which to take the mean.

  • kwargs (dict) – Additional keyword arguments.

Methods

estimate

Estimate breeding values by taking the mean performance.

Attributes

taxa_col

taxa_col.

taxa_grp_col

taxa_grp_col.

trait_cols

trait_col.

estimate(ptobj, gtobj=None, miscout=None, **kwargs)[source]#

Estimate breeding values by taking the mean performance.

Parameters:
  • ptobj (pandas.DataFrame) – An object containing phenotype data. Must be a phenotype data frame.

  • gtobj (GenotypeMatrix) – An object containing genotype data. Must be a genotype matrix. This genotype object is used to align taxa orders in the returned BreedingValueMatrix.

  • miscout (dict, None) – Pointer to a dictionary for miscellaneous user defined output. If dict, write to dict (may overwrite previously defined fields). If None, user defined output is not calculated or stored.

  • kwargs (dict) – Additional keyword arguments.

Returns:

out – A matrix of breeding values.

Return type:

BreedingValueMatrix

property taxa_col: str#

taxa_col.

property taxa_grp_col: str | None#

taxa_grp_col.

property trait_cols: list#

trait_col.