def fit(self, X=None, y=None, K0_train=None, K1_train=None, h2=None, mixing=None, count_A1=None):
    '\n        Method for training a :class:`FastLMM` predictor. If the examples in X, y, K0_train, K1_train are not the same, they will be reordered and intersected.\n\n        :param X: training covariate information, optional: \n          If you give a string, it should be the file name of a PLINK phenotype-formatted file.\n        :type X: a PySnpTools `SnpReader <http://fastlmm.github.io/PySnpTools/#snpreader-snpreader>`__ (such as `Pheno <http://fastlmm.github.io/PySnpTools/#snpreader-pheno>`__ or `SnpData <http://fastlmm.github.io/PySnpTools/#snpreader-snpdata>`__) or string.\n\n        :param y: training phenotype:\n          If you give a string, it should be the file name of a PLINK phenotype-formatted file.\n        :type y: a PySnpTools `SnpReader <http://fastlmm.github.io/PySnpTools/#snpreader-snpreader>`__ (such as `Pheno <http://fastlmm.github.io/PySnpTools/#snpreader-pheno>`__ or `SnpData <http://fastlmm.github.io/PySnpTools/#snpreader-snpdata>`__) or string.\n\n        :param K0_train: Must be None. Represents the identity similarity matrix.\n        :type K0_train: None\n\n        :param K1_train: Must be None. Represents the identity similarity matrix.\n        :type K1_train: `SnpReader <http://fastlmm.github.io/PySnpTools/#snpreader-snpreader>`__ or a string or `KernelReader <http://fastlmm.github.io/PySnpTools/#kernelreader-kernelreader>`__\n\n        :param h2: Ignored. Optional.\n        :type h2: number\n\n        :param mixing: Ignored. Optional.\n        :type mixing: number\n\n        :param count_A1: If it needs to read SNP data from a BED-formatted file, tells if it should count the number of A1\n             alleles (the PLINK standard) or the number of A2 alleles. False is the current default, but in the future the default will change to True.\n        :type count_A1: bool\n\n\n        :rtype: self, the fitted Linear Regression predictor\n        '
    self.is_fitted = True
    assert (K0_train is None)
    assert (K1_train is None)
    assert (y is not None), 'y must be given'
    y = _pheno_fixup(y, count_A1=count_A1)
    assert (y.sid_count == 1), 'Expect y to be just one variable'
    X = _pheno_fixup(X, iid_if_none=y.iid, count_A1=count_A1)
    (X, y) = intersect_apply([X, y])
    y = y.read()
    (X, covar_unit_trained) = X.read().standardize(self.covariate_standardizer, return_trained=True)
    X = SnpData(iid=X.iid, sid=FastLMM._new_snp_name(X), val=np.c_[(X.val, np.ones((X.iid_count, 1)))])
    lsqSol = np.linalg.lstsq(X.val, y.val[:, 0], rcond=(- 1))
    bs = lsqSol[0]
    r2 = lsqSol[1]
    D = lsqSol[2]
    N = y.iid_count
    self.beta = bs
    self.ssres = float(r2)
    self.sstot = ((y.val - y.val.mean()) ** 2).sum()
    self.covar_unit_trained = covar_unit_trained
    self.iid_count = X.iid_count
    self.covar_sid = X.sid
    self.pheno_sid = y.sid
    return self
Method for training a :class:`FastLMM` predictor. If the examples in X, y, K0_train, K1_train are not the same, they will be reordered and intersected.

:param X: training covariate information, optional: 
  If you give a string, it should be the file name of a PLINK phenotype-formatted file.
:type X: a PySnpTools `SnpReader <http://fastlmm.github.io/PySnpTools/#snpreader-snpreader>`__ (such as `Pheno <http://fastlmm.github.io/PySnpTools/#snpreader-pheno>`__ or `SnpData <http://fastlmm.github.io/PySnpTools/#snpreader-snpdata>`__) or string.

:param y: training phenotype:
  If you give a string, it should be the file name of a PLINK phenotype-formatted file.
:type y: a PySnpTools `SnpReader <http://fastlmm.github.io/PySnpTools/#snpreader-snpreader>`__ (such as `Pheno <http://fastlmm.github.io/PySnpTools/#snpreader-pheno>`__ or `SnpData <http://fastlmm.github.io/PySnpTools/#snpreader-snpdata>`__) or string.

:param K0_train: Must be None. Represents the identity similarity matrix.
:type K0_train: None

:param K1_train: Must be None. Represents the identity similarity matrix.
:type K1_train: `SnpReader <http://fastlmm.github.io/PySnpTools/#snpreader-snpreader>`__ or a string or `KernelReader <http://fastlmm.github.io/PySnpTools/#kernelreader-kernelreader>`__

:param h2: Ignored. Optional.
:type h2: number

:param mixing: Ignored. Optional.
:type mixing: number

:param count_A1: If it needs to read SNP data from a BED-formatted file, tells if it should count the number of A1
     alleles (the PLINK standard) or the number of A2 alleles. False is the current default, but in the future the default will change to True.
:type count_A1: bool


:rtype: self, the fitted Linear Regression predictor
def fit(self, X=None, y=None, K0_train=None, K1_train=None, h2=None, mixing=None, count_A1=None):
    '\n        Method for training a :class:`FastLMM` predictor. If the examples in X, y, K0_train, K1_train are not the same, they will be reordered and intersected.\n\n        :param X: training covariate information, optional: \n          If you give a string, it should be the file name of a PLINK phenotype-formatted file.\n        :type X: a PySnpTools `SnpReader <http://fastlmm.github.io/PySnpTools/#snpreader-snpreader>`__ (such as `Pheno <http://fastlmm.github.io/PySnpTools/#snpreader-pheno>`__ or `SnpData <http://fastlmm.github.io/PySnpTools/#snpreader-snpdata>`__) or string.\n\n        :param y: training phenotype:\n          If you give a string, it should be the file name of a PLINK phenotype-formatted file.\n        :type y: a PySnpTools `SnpReader <http://fastlmm.github.io/PySnpTools/#snpreader-snpreader>`__ (such as `Pheno <http://fastlmm.github.io/PySnpTools/#snpreader-pheno>`__ or `SnpData <http://fastlmm.github.io/PySnpTools/#snpreader-snpdata>`__) or string.\n\n        :param K0_train: Must be None. Represents the identity similarity matrix.\n        :type K0_train: None\n\n        :param K1_train: Must be None. Represents the identity similarity matrix.\n        :type K1_train: `SnpReader <http://fastlmm.github.io/PySnpTools/#snpreader-snpreader>`__ or a string or `KernelReader <http://fastlmm.github.io/PySnpTools/#kernelreader-kernelreader>`__\n\n        :param h2: Ignored. Optional.\n        :type h2: number\n\n        :param mixing: Ignored. Optional.\n        :type mixing: number\n\n        :param count_A1: If it needs to read SNP data from a BED-formatted file, tells if it should count the number of A1\n             alleles (the PLINK standard) or the number of A2 alleles. False is the current default, but in the future the default will change to True.\n        :type count_A1: bool\n\n\n        :rtype: self, the fitted Linear Regression predictor\n        '
    self.is_fitted = True
    assert (K0_train is None)
    assert (K1_train is None)
    assert (y is not None), 'y must be given'
    y = _pheno_fixup(y, count_A1=count_A1)
    assert (y.sid_count == 1), 'Expect y to be just one variable'
    X = _pheno_fixup(X, iid_if_none=y.iid, count_A1=count_A1)
    (X, y) = intersect_apply([X, y])
    y = y.read()
    (X, covar_unit_trained) = X.read().standardize(self.covariate_standardizer, return_trained=True)
    X = SnpData(iid=X.iid, sid=FastLMM._new_snp_name(X), val=np.c_[(X.val, np.ones((X.iid_count, 1)))])
    lsqSol = np.linalg.lstsq(X.val, y.val[:, 0], rcond=(- 1))
    bs = lsqSol[0]
    r2 = lsqSol[1]
    D = lsqSol[2]
    N = y.iid_count
    self.beta = bs
    self.ssres = float(r2)
    self.sstot = ((y.val - y.val.mean()) ** 2).sum()
    self.covar_unit_trained = covar_unit_trained
    self.iid_count = X.iid_count
    self.covar_sid = X.sid
    self.pheno_sid = y.sid
    return self