easypheno.model.blup

Module Contents

Classes

Blup

Implementation of a class for BLUP.

class easypheno.model.blup.Blup(task, encoding=None)

Bases: easypheno.model._param_free_base_model.ParamFreeBaseModel

Implementation of a class for BLUP.

Attributes

Inherited attributes

See ParamFreeBaseModel for more information on the attributes.

Additional attributes

  • beta (np.array): best linear unbiased estimate (BLUE) of the fixed effects

  • u (np.array): best linear unbiased prediction (BLUP) of the random effects

Parameters
  • task (str) –

  • encoding (str) –

standard_encoding = 101
possible_encodings = ['101']
static reml(delta, n, eigenvalues, omega2)

Function to compute the restricted maximum likelihood

Parameters
  • delta (float) – variance component

  • n (int) – number of samples

  • eigenvalues (numpy.array) – eigenvalues of SHS

  • omega2 (numpy.array) – point-wise product of V_SHS*y with itself

Returns

restricted maximum likelihood

fit(self, X, y)

Implementation of fit function for BLUP.

See ParamFreeBaseModel for more information.

Parameters
  • X (numpy.array) –

  • y (numpy.array) –

Return type

numpy.array

predict(self, X_in)

Implementation of predict function for BLUP.

See ParamFreeBaseModel for more information.

Parameters

X_in (numpy.array) –

Return type

numpy.array