def __init__(self, Y, identity_trick=False): """ init data term """ Y = assert_make_float_array(Y, 'Y') assert_finite_array(Y) self.Y = Y self.identity_trick=identity_trick self.clearFixedEffect()
def y(self,value): assert_finite_array(value) assert value.shape[1] == 1, 'MeanBase: phenotype has to be a one column vector' self._N = value.shape[0] self._P = 1 self._y = value # notify self._notify() self.clear_cache('Yres')
def __init__(self, K0, Kcross0=None): """ Args: K0: semi-definite positive matrix that defines the fixed-form covariance Kcross0: cross covariance between training and test samples (used only for out-of-sample predictions) """ Covariance.__init__(self) self._scale_act = True self.K0 = assert_make_float_array(K0, "K0") assert_finite_array(self.K0) if Kcross0 is not None: Kcross0 = assert_make_float_array(Kcross0, "Kcross0") assert_finite_array(Kcross0) self.Kcross0 = Kcross0 self.params = np.zeros(1)
def __init__(self, X, Xstar=None): """ X: [dim, 1] input matrix Xstar: [dim_star, 1] out-of-sample input matrix """ Covariance.__init__(self) self._scale_act = True self._length_act = True X = assert_make_float_array(X, "X") assert_finite_array(X) self.X = X if Xstar is not None: Xstar = assert_make_float_array(Xstar, "Xstar") assert_finite_array(Xstar) self.Xstar = Xstar self.params = np.zeros(2)
def __init__(self, X, Xstar=None): """ X: [dim, N] input matrix Xstar: [dim_star, N] out-of-sample input matrix """ Covariance.__init__(self) self._scale_act = True self._length_act = True X = assert_make_float_array(X, "X") assert_finite_array(X) self.X = X self.penalty_function = None if Xstar is not None: Xstar = assert_make_float_array(Xstar, "Xstar") assert_finite_array(Xstar) self.Xstar = Xstar self.params = np.zeros(2)