def _get_model_and_training_data(input_transform=None, **tkwargs): train_X, train_Y = _get_random_mt_data(**tkwargs) model = MultiTaskGP(train_X, train_Y, task_feature=1, input_transform=input_transform) return model.to(**tkwargs), train_X, train_Y
def _get_fixed_prior_model(**tkwargs): train_X, train_Y = _get_random_mt_data(**tkwargs) sd_prior = GammaPrior(2.0, 0.15) sd_prior._event_shape = torch.Size([2]) model = MultiTaskGP(train_X, train_Y, task_feature=1, prior=LKJCovariancePrior(2, 0.6, sd_prior)) return model.to(**tkwargs)
def _get_given_covar_module_model(**tkwargs): train_X, train_Y = _get_random_mt_data(**tkwargs) model = MultiTaskGP( train_X, train_Y, task_feature=1, covar_module=RBFKernel(lengthscale_prior=LogNormalPrior(0.0, 1.0)), ) return model.to(**tkwargs)
def _get_model_single_output(**tkwargs): train_X, train_Y = _get_random_mt_data(**tkwargs) model = MultiTaskGP(train_X, train_Y, task_feature=1, output_tasks=[1]) return model.to(**tkwargs)
def _get_model(**tkwargs): train_X, train_Y = _get_random_mt_data(**tkwargs) model = MultiTaskGP(train_X, train_Y, task_feature=1) return model.to(**tkwargs)
def _get_model_single_output(**tkwargs): train_X, train_Y = _get_random_mt_data(**tkwargs) model = MultiTaskGP(train_X, train_Y, task_feature=1, output_tasks=[1]) return model.to(**tkwargs)
def _get_model(**tkwargs): train_X, train_Y = _get_random_mt_data(**tkwargs) model = MultiTaskGP(train_X, train_Y, task_feature=1) return model.to(**tkwargs)